Polipo - Use tor over http and access git on windows


Hi, I am your host Abhas.

And we have a particularly common problem in our college networks - nefarious draconian stop-everything proxy (namely, squid). All non-http-https ports are blocked alongwith url and content blocking. But hey, that should never stop you from useful stuffs like git access (using git urls). Obviously, just use the mighty TOR.

BUT, its a SOCKS5 proxy - which is not a huge problem in itself, but usually requires explicit support from applications. For eg, everyones favourite youtube-dl doesnt seem to support this. But most allow http or https proxy. Shit, only if we could use TOR over http !!

Enters Polipo, advertised simply as "a caching web proxy"

But it has other super powers too. You can forward you other http/https/socks proxy though it over http. So, how to use it?

Actual steps :

  1. Install Polipo. [ For windows: I used this, but other versions should work too ]
  2. Unzip, edit config.sample to incorporate this changes:

    proxyAddress = ""
    socksParentProxy = ""
    socksProxyType = socks5

    where socksParentProxy is your tor proxy

  3. Run polipo as polipo.exe -c "config.sample" and with a few warnings, it should just run.

  4. Now go ahead and use as your http_proxy, everything should pass through tor.

Notes :

  1. You should theoritically be able to put the config file in ~/.polipo and call polipo without the -c parameter. But my initial tries didnt result in any success, so I tried doing it the easy way.
  2. Reading parts of its manual page, I think its pretty powerful with custom access control, offline dns + page caching and header changing capabilities. Maybe, I will give those some try later, looks very interesting to me. For eg. if we save a html file (along with its linked content like css,js in a folder, the default behaviour) and tell this proxy to redirect live links from that offline html page to saved contents. Basically, fix the reason why a saved webpage almost never works offline.