下載軟件
apt install polipo
配置軟件
vim /etc/polipo/config
加入下面內容
socksParentProxy = "127.0.0.1:1080"
socksProxyType = socks5
chunkHighMark = 50331648
objectHighMark = 16384
serverMaxSlots = 64
serverSlots = 16
serverSlots1 = 32
proxyAddress = "0.0.0.0"
proxyPort = 8123
使用方法
- 提前開啓代理,代理設置爲
127.0.0.1:1080
- 打開polipo
service polipo start
- 打開終端
- 終端的命令前面鍵入
http_proxy=http://localhost:8123
- 例如:
http_proxy=http://localhost:8123 curl http://github/3333/
如何配置
瀏覽器中輸入http://127.0.0.1:8123/
便可以進入到Polipo的使用說明和配置界面
簡便方法
- 打開終端,鍵入
export http_proxy=http://localhost:8123
- 此後該終端的所有命令都會使用代理,其他終端無效
- 取消代理
unset http_proxy
該命令使得終端恢復原始代理