{"id":21238696,"url":"https://github.com/shahradelahi/docker-torproxy","last_synced_at":"2025-04-05T01:03:37.176Z","repository":{"id":279459963,"uuid":"573662220","full_name":"shahradelahi/docker-torproxy","owner":"shahradelahi","description":"🕵️‍♂️ Tor Proxy + DNS Resolver","archived":false,"fork":false,"pushed_at":"2025-03-26T03:44:36.000Z","size":102,"stargazers_count":186,"open_issues_count":8,"forks_count":2,"subscribers_count":4,"default_branch":"canary","last_synced_at":"2025-03-29T00:04:30.285Z","etag":null,"topics":["docker","proxy","shadowsocks","socks5","tor"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/shahradel/torproxy","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shahradelahi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-03T02:55:31.000Z","updated_at":"2025-03-18T03:38:02.000Z","dependencies_parsed_at":"2025-03-13T08:22:36.425Z","dependency_job_id":"533391a4-43ea-42cf-9fc6-82d8b4c8ea00","html_url":"https://github.com/shahradelahi/docker-torproxy","commit_stats":null,"previous_names":["shahradelahi/docker-torproxy"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahradelahi%2Fdocker-torproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahradelahi%2Fdocker-torproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahradelahi%2Fdocker-torproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahradelahi%2Fdocker-torproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shahradelahi","download_url":"https://codeload.github.com/shahradelahi/docker-torproxy/tar.gz/refs/heads/canary","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271515,"owners_count":20911587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","proxy","shadowsocks","socks5","tor"],"created_at":"2024-11-21T00:37:46.765Z","updated_at":"2025-04-05T01:03:37.156Z","avatar_url":"https://github.com/shahradelahi.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker TorProxy\n\n\u003e A stable version of Tor for with tools for creating a proxy server.\n\n---\n\n- [Features](#features)\n- [Build locally](#build-locally)\n- [Image](#image)\n- [Environment variables](#environment-variables)\n- [Ports](#ports)\n- [Usage](#usage)\n  - [Docker Compose](#docker-compose)\n  - [Kubernetes](#kubernetes)\n  - [Command line](#command-line)\n  - [Testing](#testing)\n- [Upgrade](#upgrade)\n- [Tor Control Port](#tor-control-port)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Features\n\n- Support for a variety of proxy servers (`Socks5`, `HTTP`, `Shadowsocks` and more)\n- Preinstalled the popular `Lyrebird`, `Meek`, and `Snowflake` pluggable transports\n- Default use of Tor DNS resolver\n- Multi-platform image\n\n## Build locally\n\nBuild time can time up to 10 minutes, depending on your system.\n\n```shell\ngit clone https://github.com/shahradelahi/docker-torproxy\ncd docker-torproxy\n\n# Build image and output to docker (default)\ndocker buildx bake\n\n# Build multi-platform image\ndocker buildx bake image-all\n```\n\n## Image\n\n| Registry                                                                                               | Image                           |\n| ------------------------------------------------------------------------------------------------------ | ------------------------------- |\n| [Docker Hub](https://hub.docker.com/r/shahradel/torproxy/)                                             | `shahradel/torproxy`            |\n| [GitHub Container Registry](https://github.com/users/shahradelahi/packages/container/package/torproxy) | `ghcr.io/shahradelahi/torproxy` |\n\nFollowing platforms for this image are available:\n\n```\n$ docker run --rm mplatform/mquery shahradel/torproxy:latest\nImage: shahradel/torproxy:latest\n * Manifest List: Yes\n * Supported platforms:\n   - linux/amd64\n   - linux/arm/v6\n   - linux/arm/v7\n   - linux/arm64\n   - linux/386\n   - linux/s390x\n```\n\n## Ports\n\nThis section depend on your configuration but for the most part, the default ports are:\n\n- `53`: Tor DNS\n- `1080`: `Socks5` proxy\n- `8080`: `HTTP` proxy\n\n## Environment variables\n\nTo configure the Tor config file you can mount the configs to `/etc/tor/torrc.d` directory or prefix the environment\nvariables with `TOR_`. For example, if you can set SocksPort option you have to add `TOR_SOCKS_PORT=1080` to the\nenvironment variables.\n\n| Option               | Description                                                        |\n| -------------------- | ------------------------------------------------------------------ |\n| `TOR_CONTROL_PASSWD` | Automatically will be hashed and used as password of control port. |\n| `TOR_*`              | For configuring the Tor config file.                               |\n\n\u003e 💡 For more information about Tor config file see [Offical Tor Manual](https://2019.www.torproject.org/docs/tor-manual.html.en).\n\n## Usage\n\n### Docker Compose\n\nDocker compose is the recommended way to run this image. You can use the following\n[docker compose template](docker-compose.yml), then run the container:\n\n```bash\ndocker compose up -d\ndocker compose logs -f\n```\n\n### Kubernetes\n\nTo install on a Kubernetes cluster, you can use the following [kubernetes deployment template](kubernetes.yml), then create the deployment:\n\n```bash\nkubectl apply -f kubernetes.yml\n```\n\n### Command line\n\nBy default, the image is started with two password-less `socks5` and `http` proxies and image can be run by a minimal\ncommand:\n\n```bash\n$ docker run -d --name torproxy \\\n  -p 1080:1080 -p 8080:8080 \\\n  shahradel/torproxy\n```\n\nTo configure the proxy servers you can add flags to the command:\n\n```bash\n$ docker run -d --name torproxy \\\n  -p 1080:1080 -p 8080:8080 -p 8338:8338 \\\n  shahradel/torproxy \\\n  -L \"http://:8080\" \\\n  -L \"socks5://\u003cusername\u003e:\u003cpassword\u003e@:1080\" \\\n  -L \"ss://AES-256-CFB:\u003cusername\u003e:\u003cpassword\u003e@:8338\"\n```\n\n### Testing\n\n```bash\n# Socks5\ncurl -x socks5://localhost:1080 https://check.torproject.org/api/ip\n\n# HTTP\ncurl -x http://localhost:8080 https://check.torproject.org/api/ip\n```\n\n## Upgrade\n\nRecreate the container whenever I push an update:\n\n```bash\ndocker compose pull\ndocker compose up -d\n```\n\n## Tor Control Port\n\nBy default, the control port is not exposed and for security reasons, it can be enabled by setting\nthe `TOR_CONTROL_PORT` and `TOR_HASHED_CONTROL_PASSWORD` environment variables.\n\n```bash\n$ docker run -d --name torproxy \\\n  -p 9060:9060 \\\n  -e TOR_CONTROL_PORT=9060 \\\n  -e TOR_CONTROL_PASSWD=\"super-secure-password\" \\\n  shahradel/torproxy\n```\n\nNow tor control port is available on port `9060` and you can use tools such as [nyx](https://nyx.torproject.org/) to\nmonitor the tor instance.\n\n```bash\n$ docker exec -it torproxy nyx -i 9060\n```\n\n## Contributing\n\nWant to contribute? Awesome! To show your support is to star the project, or to raise issues\non [GitHub](https://github.com/shahradelahi/docker-torproxy).\n\nThanks again for your support, it is much appreciated! 🙏\n\n## License\n\n[GPL-3.0](/LICENSE) © [Shahrad Elahi](https://github.com/shahradelahi)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshahradelahi%2Fdocker-torproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshahradelahi%2Fdocker-torproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshahradelahi%2Fdocker-torproxy/lists"}