This may not the the best place to ask, because it's more of a networking question, but I wanted to try here first. (If I should also post on NetworkEngineering or ServerFault, please tell me :) )

I have been running a relay on ports 80 and 443 on a raspberry for a while now, but recently I got myself another raspberry for Sonarr and Radarr. I wanted to be able to access them as sonarr.mydomain.com without using ports and I found a solution would be using nginx as a reverse-proxy.

I believed I could also include the tor relay in nginx and have tor.mydomain.com and redirect ports 80 and 443. This would be great because I would only have nginx listening on the ports and redirect traffic based on the subdomain.

I configured nginx with:

server {
    listen 80;
    listen [::]:80

    server_name tor.mydomain.com

    location / {
        proxy_pass host:80;

and similarly for port 443.

I got an error and I had to change the proxy_pass to proxy_pass http://host:80. This works for nginx, but the tor relay doesn't. Now I don't know what protocol tor uses for relays (I know that the client uses SOCKS), and I didn't manage to find it. Besides the protocol used, is nginx capable of proxy-ing it?

As an additional note: I have a router running OpenWrt, perhaps it can be configured to route tor traffic straight to the relay?


| improve this question | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.