Limnoria icon indicating copy to clipboard operation
Limnoria copied to clipboard

Support SOCKS proxy for HTTP traffic

Open Mikaela opened this issue 6 years ago • 3 comments

I am curious in putting HTTP traffic through Tor network and it only supports socks proxy. However I cannot as supybot.protocols.http.proxy is the option used for HTTP traffic such as Web title/fetch and only takes HTTP proxy and the other configs appear to be IRC network-specific.

I next thought of setting up a local HTTP proxy, but the options appear to be Polipo that hasn't been maintained since at least 2016 or Privoxy which had the latest update at SourceForge in January 2017. This doesn't encourage me to set up either and I thought that maybe I should open an issue to Limnoria.

<urlopen error Tunnel connection failed: 501 Tor is not an HTTP Proxy>

The current (running) version of this Limnoria is 2018.09.09, running on Python 3.6.5 (default, Apr 1 2018, 05:46:30) [GCC 7.3.0]. The newest versions available online are 2018.09.09 (in master), 2018.09.16 (in testing).

  • Ubuntu 18.04.1 LTS

Mikaela avatar Sep 16 '18 15:09 Mikaela

privoxy is fine if it only listens on localhost; it simply provides a means (natively to the proxy server) to direct HTTP traffic through the built-in Tor SOCKS proxy. The only alternative to that, really, is to roll your own. No doubt it can be done with Twisted or asyncio, maybe even with requests but it'd be annoying and time consuming.

Hasimir avatar Sep 16 '18 15:09 Hasimir

The only alternative to that, really, is to roll your own. No doubt it can be done with Twisted or asyncio, maybe even with requests but it'd be annoying and time consuming.

Does this mean that it's very different from supybot.networks.NETWORK.socksproxy or what makes it annoying and time consuming? I see PySocks in requirements.txt and Googling requests seems to support socks proxies (Advanced use socks), but I imagine adding depedencies isn't desirable.

Mikaela avatar Sep 16 '18 15:09 Mikaela

Tor has since gotten the option HTTPTunnelPort or if it existed back in 2018, I didn't know of it, but that has separate issue of https://github.com/ProgVal/Limnoria/issues/1349.

I still see this as a valid issue for cases like Mullvad socks5 proxy though.

Mikaela avatar May 27 '21 14:05 Mikaela