Expose local docker as onion service. N-grok alternative with Tor (no centralized servers for spying).
First you must create a network (bridge) that will connect the onion container with your service container.
sudo docker network create --driver=bridge onionet
Now connect the network to the service container you want to exhibit.
sudo docker network connect onionet jekyll
Let's go up the onion service (example: jekyll container running on local port 4000)
sudo docker run -it --rm -e LISTEN_PORT=80 \
-e REDIRECT=jekyll:4000 --network=onionet \
marlluslustosa/docker-to-onion
it will show an onion address (in green) after the command
ONION_PART_NAME
- Name pattern to generate the onion address (Shallot)LISTEN_PORT
- Port that onion service will listen toREDIRECT
- To where the Tor will redirect the traffic (your server), in the formatcontainer:port
.PROXY_PORT
- If you want to enable Tor Proxy Socks, use this variable to set which port you want tor listening to.
sudo docker run -it --rm -e ONION_PART_NAME=^test -e LISTEN_PORT=80 -e REDIRECT=wordpress:80 --network=onionet marlluslustosa/docker-to-onion
This pattern will generate an address starting with test
, by testm4lgosy5lgsd.onion
. Click here for details on performance in the generation of onion addresses.
- Tor Onion v3 Vanity Address support oniongen-go?.
Bug reports and pull requests are welcome on GitHub at marlluslustosa/docker-to-onion
.
It is. Questions and suggestions, open an issue or a PR.
😉