登陆linux vps.
搭建go环境,然后,
cd $GOPATH
go get -u -v github.com/cybozu-go/usocksd/cmd/usocksd
可执行文件usocksd就会出现在$GOPATH/bin/里面。
把$GOPATH/bin添加到环境变量:
echo 'export PATH=$PATH:$GOPATH/bin' >> /etc/profile && source /etc/profile
nano /etc/usocksd.toml
内容为:
[incoming]
port = 35678
addresses = ["0.0.0.0"]
然后,
usocksd -f /etc/usocksd.toml
不过命令:usocksd -f /etc/usocksd.toml是在前台运行的,容易退出,我们可利用systemd来把它运行为service:
nano /etc/systemd/system/usocksd.service
内容为:
搭建go环境,然后,
cd $GOPATH
go get -u -v github.com/cybozu-go/usocksd/cmd/usocksd
可执行文件usocksd就会出现在$GOPATH/bin/里面。
把$GOPATH/bin添加到环境变量:
echo 'export PATH=$PATH:$GOPATH/bin' >> /etc/profile && source /etc/profile
nano /etc/usocksd.toml
内容为:
[incoming]
port = 35678
addresses = ["0.0.0.0"]
然后,
usocksd -f /etc/usocksd.toml
不过命令:usocksd -f /etc/usocksd.toml是在前台运行的,容易退出,我们可利用systemd来把它运行为service:
nano /etc/systemd/system/usocksd.service
内容为:
[Unit]
After=network.target
[Service]
ExecStart=/root/go/gopath/bin/usocksd -f /etc/usocksd.toml
Restart=always
[Install]
WantedBy=multi-user.target
然后运行:
systemctl start usocksd
systemctl enable usocksd
服务器端搭建完成。
在客户机器上。
利用chrome+switchyomega还是可以打开www.youtube.com的。
所以chrome+switchyomega其实比ff更好用,更能抗‘dns污染’。
所以chrome+switchyomega其实比ff更好用,更能抗‘dns污染’。
项目地址:github.com/cybozu-go/usocksd
No comments:
Post a Comment