Convert Socks Proxy To Http Proxy: Using Polipo

 ·  · 

Convert socks proxy to http proxy using Polipo.


1. Install

1.1 Mac

$ sudo port install polipo

1.2 Ubuntu/Debian

$ sudo apt-get install polipo


2. Usage

Assume that there is a socks proxy listening on port 1080 at localhost. The socks proxy can be created by either ssh -D or shadowsocks.

2.1 Quick Usage

$ polipo socksParentProxy=localhost:1080

After executing above command, Polipo will convert the socks proxy to a http proxy at with following hint.

Established listening socket on port 8123.

2.2 Configuration

On Mac:

$ sudo cp /opt/local/etc/polipo/config.sample /opt/local/etc/polipo/config 

On Ubuntu/Debian:

$ sudo cp /etc/polipo/config.sample /etc/polipo/config

Change the configuration:

# Mac: /opt/local/etc/polipo/config
# Ubuntu: /etc/polipo/config

socksParentProxy = “″
socksProxyType = socks5
proxyAddress = "::0"        # both IPv4 and IPv6
# or IPv4 only
# proxyAddress = ""
proxyPort = 8123

Launch Polipo with the configuration file:

$ polipo -c /opt/local/etc/polipo/config

2.3 Test

Test the http proxy using curl

$ curl --proxy