1

I'm trying to create a reverse proxy over the Tor network but am having some trouble. I have 2 hidden services setup on Nginx on seperate servers and I want hiddenservice1 to mirror hiddenservice2. I'm using polipo but everytime I try to view the hidden service it just shows the polipo homepage which has stumped me.

I'm working on a Debian 10 server

(Hiddenservice1: yd7tfcrlsbr32ywf.onion:80) > (Polipo:8123) > (Hiddenservice2: dvwi6l6zkvbgn5ny.onion:9050)

Hiddenservice2 works without fault I can access it direct through: dvwi6l6zkvbgn5ny.onion

Heres my tor config file (/etc/tor/torrc):

SocksPort 9050  Default: Bind to localhost:9050 for local connections.
HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 80 127.0.0.1:80

My nginx conf file (/etc/nginx/sites-available/default

server {

   listen 127.0.0.1:80;
    root /var/www/;
    client_max_body_size 99M;
    charset utf-8;
    index index.html;
 location / {
proxy_pass http://127.0.0.1:8123/;
        proxy_set_header Host "dvwi6l6zkvbgn5ny.onion"  ;

    proxy_set_header Accept-Encoding "";
    proxy_set_header Via "$host";

    subs_filter 'dvwi6l6zkvbgn5ny.onion' $host;

    }
}

and my polipo config (/etc/polipo/config)

socksParentProxy = "localhost:9050"
diskCacheRoot = ""
disableLocalInterface=true
socksProxyType = socks5
proxyaddress = 127.0.0.1
proxyport =  8123

logSyslog = true
logFile = /var/log/polipo/polipo.log

Any help would be greatly appreciated I'm really stuck :)

Thank you

2 Answers 2

0

Polipo does not support running as a reverse proxy, only as a direct (explicitly configured) proxy. While you might find some hacks that patch Polipo to do reverse proxying, they are not recommended, since Polipo is simply not designed to act as an efficient reverse proxy (there's a built-in assumption in Polipo that the client->proxy link is faster than the proxy->server link).

You'll find a number of high quality reverse proxy implementations, though. Off the top of my head, nginx, Varnish, HAProxy can act as reverse proxies.

0

Well, you can (ab)use host mapping feature, but I strongly recommend you to use NginX for this task

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .