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