-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add(app): Tor Socks Proxy #5333
base: master
Are you sure you want to change the base?
Changes from all commits
a56e54d
04b5f6f
f2e630e
e8bbb27
3f7e62f
f46eda3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "Tor Socks Proxy", | ||
"id": "tor-socks-proxy", | ||
"available": true, | ||
"short_desc": "Tor Socks5 proxy server inside a Docker container", | ||
"author": "PeterDaveHello", | ||
"port": 9180, | ||
"categories": ["network"], | ||
"description": "The super easy way to set up a Tor Socks5 proxy server inside a Docker container, without Tor relay/exit node function enabled.", | ||
"tipi_version": 1, | ||
"version": "v1.0.0", | ||
"source": "https://github.com/PeterDaveHello/tor-socks-proxy", | ||
"exposable": true, | ||
"supported_architectures": ["arm64", "amd64"], | ||
"created_at": 1729881000000, | ||
"updated_at": 1729881000000 | ||
} |
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,12 @@ | ||||||||||
version: "3.9" | ||||||||||
|
||||||||||
services: | ||||||||||
tor-socks-proxy: | ||||||||||
container_name: tor-socks-proxy | ||||||||||
image: peterdavehello/tor-socks-proxy:latest | ||||||||||
restart: unless-stopped | ||||||||||
ports: | ||||||||||
- ${APP_PORT}:9150/tcp | ||||||||||
Comment on lines
+8
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consider restricting port access to specific networks. The Tor SOCKS proxy port is currently exposed to all interfaces. For better security, consider binding to specific networks or localhost if possible. ports:
- - ${APP_PORT}:9150/tcp
+ - 127.0.0.1:${APP_PORT}:9150/tcp 📝 Committable suggestion
Suggested change
|
||||||||||
networks: | ||||||||||
- tipi_main_network | ||||||||||
|
||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix formatting issues. There are two formatting issues that should be addressed:
networks:
- - tipi_main_network
-
+ - tipi_main_network
+
🧰 Tools🪛 yamllint
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<p align="center"> | ||
<img width="300px" src="https://upload.wikimedia.org/wikipedia/commons/8/8f/Tor_project_logo_hq.png"> | ||
</p> | ||
|
||
# Tor-socks-proxy | ||
|
||
![license](https://img.shields.io/badge/license-GPLv3.0-brightgreen.svg?style=flat) | ||
[![Build Status](https://app.travis-ci.com/PeterDaveHello/tor-socks-proxy.svg?branch=master)](https://app.travis-ci.com/PeterDaveHello/tor-socks-proxy) | ||
[![Docker Hub pulls](https://img.shields.io/docker/pulls/peterdavehello/tor-socks-proxy.svg)](https://hub.docker.com/r/peterdavehello/tor-socks-proxy/) | ||
|
||
[![Docker Hub badge](http://dockeri.co/image/peterdavehello/tor-socks-proxy)](https://hub.docker.com/r/peterdavehello/tor-socks-proxy/) | ||
|
||
The super easy way to set up a [Tor](https://www.torproject.org) [SOCKS5](https://en.wikipedia.org/wiki/SOCKS#SOCKS5) [proxy server](https://en.wikipedia.org/wiki/Proxy_server) inside a [Docker](https://en.wikipedia.org/wiki/Docker_(software)) [container](https://en.wikipedia.org/wiki/Container_(virtualization)), without Tor relay/exit node function enabled. | ||
|
||
## Docker image Repository | ||
|
||
We push the built image to Docker Hub and GitHub Container Registry: | ||
|
||
- GitHub Container Registry: | ||
- `ghcr.io/peterdavehello/tor-socks-proxy` | ||
- <https://github.com/PeterDaveHello/tor-socks-proxy/pkgs/container/tor-socks-proxy> | ||
- Docker Hub: | ||
- `peterdavehello/tor-socks-proxy` | ||
- <https://hub.docker.com/r/peterdavehello/tor-socks-proxy/> | ||
|
||
Use the prefix `ghcr.io/` if you prefer to use GitHub Container Registry. | ||
|
||
## Usage | ||
|
||
### First-Time Setup | ||
|
||
```sh | ||
docker run -d --restart=always --name tor-socks-proxy -p 127.0.0.1:9150:9150/tcp peterdavehello/tor-socks-proxy:latest | ||
``` | ||
|
||
- `--restart=always`: This ensures the container automatically restarts whenever the system reboots. | ||
- `-p 127.0.0.1:9150:9150/tcp`: This binds the container to localhost, and you should not change this IP unless you want to expose the proxy to a local network or the Internet. | ||
- You can change the first `9150` to any available port. Please note that ports `9050`/`9150` may be occupied if you are running another Tor client like TorBrowser. | ||
|
||
### Start or stop an existing Instance manually | ||
|
||
```sh | ||
docker start tor-socks-proxy | ||
``` | ||
|
||
```sh | ||
docker stop tor-socks-proxy | ||
``` | ||
|
||
### Checking the Proxy Status and logs | ||
|
||
```sh | ||
docker logs tor-socks-proxy | ||
``` | ||
|
||
### Configuring a Client to Use the Proxy | ||
|
||
```sh | ||
curl --socks5-hostname 127.0.0.1:9150 https://ipinfo.tw/ip | ||
``` | ||
|
||
### Stopping the Proxy | ||
|
||
```sh | ||
docker stop tor-socks-proxy | ||
``` | ||
|
||
## IP Renewal | ||
|
||
By default, Tor automatically changes IPs every 10 minutes. You can manually renew the IP by restarting the container: | ||
|
||
```sh | ||
docker restart tor-socks-proxy | ||
``` | ||
|
||
## DNS over Tor | ||
|
||
Publish DNS port during setup to query DNS requests over Tor: | ||
|
||
```sh | ||
docker run -d --restart=always --name tor-socks-proxy -p 127.0.0.1:9150:9150/tcp -p 127.0.0.1:53:8853/udp peterdavehello/tor-socks-proxy:latest | ||
``` | ||
## Sponsor | ||
|
||
<a href="https://m.do.co/c/1fdd0a1d695a"><img src="https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/SVG/DO_Logo_horizontal_blue.svg" width="201px"></a> | ||
|
||
This project is now sponsored by DigitalOcean, providing us with a dedicated development and testing environment. | ||
|
||
For cloud VPS hosting with $200 in free credit, consider using my DigitalOcean referral link: https://m.do.co/c/1fdd0a1d695a | ||
|
||
## Support Tor Project | ||
|
||
Support the Tor project by [setting up Tor bridge/exit nodes](https://trac.torproject.org/projects/tor/wiki/TorRelayGuide) and [donating](https://donate.torproject.org/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pin the image to a specific version for security and stability.
Using
latest
tag can lead to unexpected changes and potential security issues. Consider pinning to a specific version.📝 Committable suggestion