|
6 months ago | |
---|---|---|
Dockerfile | 6 months ago | |
README.md | 6 months ago | |
svc-hostname | 6 months ago | |
tor.sh | 6 months ago |
This is a Tor Proxy Docker container for "torifying" other Docker-based services in a Docker Compose project. It creates a Tor Hidden Service with an onion hostname that persists as long as it's underlying storage volume. The Tor Hidden Service listens on the specified port and proxies traffic to the specified target host:port.
SVC_LISTEN_PORT
: Port that the Tor hidden service will listen on for requests from the Tor networkSVC_TARGET_HOST
: Target host for Tor trafficSVC_TARGET_PORT
: Target port on the target hostdocker-compose.yml
docker-compose.yml
:
...
mysvc_tor_proxy:
build:
context: ./tor-proxy
args:
- SVC_LISTEN_PORT=80
- SVC_TARGET_HOST=mysvc
- SVC_TARGET_PORT=8080
volumes:
- mysvc_config:/var/lib/tor
depends_on:
- mysvc
restart: unless-stopped
...
You can get the onion hostname of the proxy using the following command:
[email protected]:~$ docker-compose exec mysvc_tor_proxy svc-hostname