HTTP/1.x reverse proxy to consume onion endpoints without installing a tor client
Everything that comes to proxy.tdex.network/<onion_public_key> is redirected to <onion_public_key>.onion
-
Move it into a folder in your PATH (eg.
/usr/local/bin
) and rename astorproxy
-
Give executable permissions. (eg.
chmod a+x /usr/local/bin/torproxy
)
By default you should have a Tor client running on the canonical 9050
port. You can change that with --socks5-hostname
and --socks5-port
or use the embedded tor client with --use-tor
- Run cleartext on default port :7070
$ torproxy start --insecure --registry '[{"endpoint": "http://somewherefaraway.onion:80"}]'
- Run with SSL
$ torproxy start --domain mywebsite.com --registry '[{"endpoint": "http://somewherefaraway.onion:80"}]'
- Load registry from a remote URL
$ torproxy start --domain mywebsite.com --registry https://raw.githubusercontent.com/tdex-network/tdex-registry/master/registry.json
With a URL, the proxy will refetch the registry every 12 hours in order to auto-update the set of endpoints to redirects.
- Load registry from local path to file
$ torproxy start --domain mywebsite.com --registry ./registry.json
- Use embedded tor client
$ torproxy start --domain mywebsite.com --registry ./registry.json --use-tor
- Build
$ docker build -t ghcr.io/tdex-network/torproxy .
- Run
$ docker run -it -d -p 443:443 -p 80:80 --name proxy --restart unless-stopped ghcr.io/tdex-network/torproxy start --use-tor --domain proxy.tdex.network --email [email protected] --registry https://raw.githubusercontent.com/tdex-network/tdex-registry/master/registry.json