Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How convert Socks to HTTP in Mac OSX?

Tags:

proxy

I am using Mac OSX with Socks5 proxy. I would like to config my command line to export http_proxy = XXXX to accelerate my downloading. Are there any tools that can achieve this conversion? I've heard Provixy can do it, but I'm not sure how yet. Can you show me how please?

Thanks.

Jimmy

like image 963
Jimmy Li Avatar asked Feb 11 '23 06:02

Jimmy Li


2 Answers

You could try polipo.

I use it under ubuntu (it should be also available on Mac) and find it can work with the socks proxy either created by ssh -D ... or shadowsocks.

apt-get install polipo
service polipo start //start polipo service
polipo socksParentProxy=localhost:1080  // your SOCKS local port
export http_proxy=http://localhost:8123
like image 158
leodream Avatar answered Mar 04 '23 21:03

leodream


You can install it with brew:

brew install polipo

And open a config file:

vim ~/.poliporc

Fill it with the content:

# your SOCKS local port
socksParentProxy = 127.0.0.1:1080
socksProxyType = socks5

# default port is 8123
# proxyAddress = '::0'
# proxyPort = 9743

Start polipo with polipo -c ~/.poliporc and now polipo established a http proxy based on your socks5 proxy.

like image 34
Hustlion Avatar answered Mar 04 '23 21:03

Hustlion