ss客户端 首先,要有一个ss,这里使用的就是shadowsocks客户端(sslocal)yaourt -S community/shadowsocks
或者sudo pacman -S shadowsocks
编辑配置文件 1 2 3 4 5 6 7 8 9 10 11 12 13 sudo touch /etc/shadowsocks/config.json sudo gedit /etc/shadowsocks/config.json { "server" :"remote-shadowsocks-server-ip-addr" , "server_port" :443, "local_address" :"127.0.0.1" , "local_port" :1080, "password" :"your-passwd" , "timeout" :300, "method" :"aes-256-cfb" , "fast_open" :false , "workers" :1 }
测试ss启动(可忽略) sslocal -c /etc/shadowsocks/config.json
守护进程 1 2 3 systemctl start shadowsocks-server@config systemctl enable shadowsocks-server@config
使用delegate转发端口协议 yaourt -S community/delegate
建立这个文件 /etc/systemd/system/delegate-shadowsocks.service
1 2 3 4 5 6 7 8 9 10 11 12 13 [Unit] Description=Delegate daemon for forwarding http requests to shadowsocks Requires=shadowsocks@config.service After=network.target shadowsocks@config.service [Service] Type=forking User=nobody ExecStart=/usr/bin/delegated -P10801 SERVER=http SOCKS=127.0.0.1:1080 [Install] WantedBy=multi-user.target
之后就是enable它了
systemctl enable delegate-shadowsocks.service
再转发https 再来一个文件咯..
1 2 3 4 5 6 7 8 9 10 11 12 13 [Unit] Description=Delegate daemon for forwarding http requests to shadowsocks Requires=shadowsocks@config.service After=network.target shadowsocks@config.service [Service] Type=forking User=nobody ExecStart=/usr/bin/delegated -P10802 SERVER=https SOCKS=127.0.0.1:1080 [Install] WantedBy=multi-user.target
systemctl enable delegate-shadowsocks-2.service
这样本地的10801就是http,10802是https了~
附上delegated简单使用方法 开启服务:delegated -P< 要使用的端口> SERVER=http SOCKS=127.0.0.1:<shadowsocks 端口>
停止服务:delegated -P< 要使用的端口> -Fkill