onionize-docker
onionize-docker copied to clipboard
Feature: Onionservice port different from exposed port
Current Situation
One can specify ONIONSERVICE_PORT in case a web service container has multiple ports exposed. This will result in the following line in torrc:
HiddenServicePort <ONIONSERVICE_PORT> <IP>:<ONIONSERVICE_PORT>
If one accesses the onion service, one has to append ":<ONIONSERVICE_PORT>" to the onion link.
Feature Request
It would be great to have two environment variables for web service containers that go into the generated torrc file:
VIRTUAL_PORT- If set, use this port of to connect with the service. Useful if a service has more than one port exposed. If this is not set but just one port is exposed, use that port.
ONIONSERVICE_PORT- If
ONIONSERVICE_PORTis set, one can access the onionservice via this port. If it is not set, use the chosen virtual port instead.
- If
Benefits
The above line in torrc would change to:
HiddenServicePort <ONIONSERVICE_PORT> <IP>:<VIRTUAL_PORT>
Even if VIRTUAL_PORT is e.g. 4040, one can still specify ONIONSERVICE_PORT=80 and visit the onion service just with the blank onion link.