Convert Shadowsocks into an HTTP proxy

备用,不解释

socks5 to http proxy

1、 首先安装 polipo, 设置parent proxy to Ss:

1
2
3
apt-get install polipo
service polipo stop
polipo socksParentProxy=localhost:1080 &

macosx运行

1
2
brew install polipo
polipo socksParentProxy=localhost:1080 &

设置全局http proxy:

1
2
3
http_proxy=http://localhost:8123 apt-get update
http_proxy=http://localhost:8123 curl www.google.com
http_proxy=http://localhost:8123 wget www.google.com

对于git:

1
2
3
4
5
git config --global http.proxy 127.0.0.1:8123
git clone https://github.com/xxx/xxx.git
git xxx
git xxx
git config --global --unset-all http.proxy

glide mirror

1
2
3
4
5
6
7
8
9
$ rm -rf ~/.glide
$ mkdir -p ~/.glide
$ glide mirror set https://golang.org/x/mobile https://github.com/golang/mobile --vcs git
$ glide mirror set https://golang.org/x/crypto https://github.com/golang/crypto --vcs git
$ glide mirror set https://golang.org/x/net https://github.com/golang/net --vcs git
$ glide mirror set https://golang.org/x/tools https://github.com/golang/tools --vcs git
$ glide mirror set https://golang.org/x/text https://github.com/golang/text --vcs git
$ glide mirror set https://golang.org/x/image https://github.com/golang/image --vcs git
$ glide mirror set https://golang.org/x/sys https://github.com/golang/sys --vcs git