tor-proxy/README.md

43 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

2022-01-05 07:32:46 +00:00
Tor Proxy
===========================
2022-01-05 08:06:47 +00:00
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.
2022-01-05 07:32:46 +00:00
2022-01-05 07:59:57 +00:00
## Usage
### Arguments
- `SVC_LISTEN_PORT`: Port that the Tor hidden service will listen on for requests from the Tor network
- `SVC_TARGET_HOST`: Target host for Tor traffic
- `SVC_TARGET_PORT`: Target port on the target host
### Sample `docker-compose.yml`
2022-01-05 07:32:46 +00:00
`docker-compose.yml`:
```
...
mysvc_tor_proxy:
build:
2022-01-05 07:59:57 +00:00
context: ./tor-proxy
2022-01-05 07:32:46 +00:00
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
...
```
2022-01-05 07:59:57 +00:00
### Service Onion Hostname
You can get the onion hostname of the proxy using the following command:
```
user@host:~$ docker-compose exec mysvc_tor_proxy svc-hostname
```