起因:

在18年11月7号一节课上,突然发现translate-shell无法使用,发现是shadowsocks-qt5
客户端停止工作,后来发现电脑无法翻墙,因此开始折腾。
(现在怀疑是ss-qt5的客户端与版本不兼容导致的,以后要注意这方面的问题以免耽误太多时间)

解决过程:

1) $ sudo apt install privoxy
2) $ sudo vi /etc/privoxy/config 
   
1.modify the listen-address as 127.0.0.1/localhost:8118 or hostIP as 192.168.1.1:8118
    2.delete the comment of  forward-socks5t /  localhost:1080 . and modify the port as 1080
3) $ sudo apt-get install shadowsocks
4) $ config ss in /etc/shadowsocks.json

    {
        \"server\":\"********\",
        \"server_port\":443,
        \"local_address\":\"127.0.0.1\",
        \"local_port\":1080,
        \"password\":\"********\",
        \"timeout\":300,
        \"method\":\"AES-256-CFB\"
    }

    1.note that the remote server port is 443
    2.local port is 1080

5) start privoxy: sudo service privoxy restart
6) start ss: use sslocal rather than ssserver

# put two lines below in ~/.profile
export http_proxy=127.0.0.1:8118
export https_proxy=127.0.0.1:8118

Then

7) $ source ~/.profile

test: wget www.google.com 

整理概念:

1) localhost就是127.0.0.1
2) 8118是本地监听端口
3) forward-socks5t 将8118端口监听到的内容发送到127.0.0.1:1080,然后由ss服务器解析本地
接受的到的内容。

 

收藏 打印