HiveMinds / SSL4Tor

Creates self-signed SLL/https certificates for your own tor website/onion domain.
GNU Affero General Public License v3.0
2 stars 1 forks source link

Support multiple onion services for different local ports. #3

Closed a-t-0 closed 1 year ago

a-t-0 commented 1 year ago

Source: https://stackoverflow.com/questions/64646146/how-can-i-have-multiple-tor-onions-pointing-to-the-same-listening-port

It is possible to create multiple onion services that point to the same port/application. To do this, create multiple HiddenService configurations with different data directories pointing to the same port:

torrc

# Hidden service instance 1
HiddenServiceDir /var/lib/tor/hs-1/
HiddenServiceVersion 3
HiddenServicePort 80 127.0.0.1:8080

# Hidden service instance 2
HiddenServiceDir /var/lib/tor/hs-2/
HiddenServiceVersion 3
HiddenServicePort 80 127.0.0.1:8080

For each HiddenServiceDir/HiddenServicePort combination you create that points to the same port, you will get a different onion address which ultimately point to the same service.

Then also generate mutliple ssl certs per service.