直接上代碼:
- 安裝
sudo apt-get install privoxy
- 編輯配置文件
nano /etc/privoxy/config
- 添加一行其中(
127.0.0.1:1080
)是本地socks5地址和端口
forward-socks5 / 127.0.0.1:1080 .
- 保存退出,重啓服務
systemctl restart privoxy
然後
export http_proxy=http://127.0.0.1:8118/
在當前終端有效,如果想要開機有效就加到bashrc文件裏面。