I use an application which uses the http protocol for communication between instances.
I set up an onion site for one side of it.
Tor Browser shows it and can interact with it. But I want the local binary to communicate with the binary at the onion site.
The app in question can connect to an http proxy but not SOCKS.
Using only nc and/or ssh (I donât have socat or netcat) can someone please show how to forward a port to Tor Browserâs SOCKS port?
I thought Iâd run nc or ssh and have it listen on an open port, say 8008. Then the app would connect to 127.0.0.1:8008 and the connection would go over tor to the instance at the onion site.
I was hoping I could use nc to both listen and send that to the SOCKS port. nc -l -k 33330 | nc -n -X 5 -x 127.0.0.1:9150 $site $port
Then in another terminal window Iâd run my program and point it at http://127.0.0.1:33330. But the above nc line tells me ânc: connection failed, SOCKSv5 error: Connection refused.â
Open this port to listen for proxy connections using the âHTTP CONNECTâ protocol instead of SOCKS. Set this to 0 if you donât want to allow âHTTP CONNECTâ connections. Set the port to âautoâ to have Tor pick a port for you. This directive can be specified multiple times to bind to multiple addresses/ports. If multiple entries of this option are present in your configuration file, Tor will perform stream isolation between listeners by default. See SocksPort for an explanation of isolation flags. (Default: 0)
For years I have used Polipo (deprecated) and currently Privoxy to provide an HTTP proxy pointing to Torâs SOCKS5 port, and these worked well. Privoxy provides advanced filtering capabilities so I used that to create an additional whitelisting proxy server to keep an old Windows virtual machine in check.
I like the stream isolation advantage of HTTPTunnelPort, and I began testing HTTPTunnelPort with wget. I am using shell variables to only adjust the proxy for wget, but I noticed something unexpected.
HTTPTunnelPort appears to only work as an https_proxyâŚnot as an http_proxy.
For example, this works as expected:
export https_proxy=âhttp://127.0.0.1:9100/â && wget (insert URL here)
For example, this does not work as expected:
export http_proxy=âhttp://127.0.0.1:9100/â && wget (insert URL here)
The version of wget I am using (1.21.2) does not support SOCKS5. I think that was a recent development.
I think the version of wget I am using either prefers an https_proxy, does not work with http_proxy, or HTTPTunnelPort provides https_proxy.
Hopefully these notes will help @abc in troubleshooting.
Thank you @atari Iâll look at those. But Iâm mainly trying to figure out a routine for non-tech folks to use, so involving software thatâs not part of a default OS install is going to be a challenge.
Maybe thereâs a trustworthy crate which can go into arti to provide it with a more robust HTTP Proxy capability.