登陆linux vps.首先安装go环境。然后,
cd $GOPATH
go get -u -v github.com/asche910/flynet/cmd/server/
cd ~
git clone https://github.com/asche910/flynet
cd flynet/cmd/server/
go run server.go
go run server.go --mode socks5-tcp --listen 7777 -m aes-256-cfb --password mypassword
此命令是运行在前台的,可以利用joker把它运行为daemon:
joker go run server.go --mode socks5-tcp --listen 7777 -m aes-256-cfb --password mypassword
每次重启服务器后,记得运行:
joker go run ~/flynet/cmd/server/server.go --mode socks5-tcp --listen 7777 -m aes-256-cfb --password mypassword
还要开放一下7777端口:
iptables -I INPUT -p tcp -m tcp --dport 7777 -j ACCEPT
服务器端搭建完成。
在本地机器mac上。首先安装go环境。然后,
cd $GOPATH
go get -u -v github.com/asche910/flynet/cmd/client/
cd ~
git clone https://github.com/asche910/flynet
cd flynet/cmd/client/
go run client.go
go run client.go --mode socks5-tcp --listen 8848 --server vps-public-ip:7777 -m aes-256-cfb --password mypassword
保持此terminal不要关闭。设置本地机器的浏览器的socks5代理服务器为127.0.0.1 ,端口为8848 ,浏览器即可翻墙。
此方案的客户端程序能维持较长时间的运行。
如果翻墙失败,请重新运行客户端命令。
用flynet翻墙,要时不时的刷新一下页面,方能翻墙。
项目地址:https://github.com/asche910/flynet
flynet还有其他功能,请自行研究。
---------------------------
此法的翻墙速度慢,建议使用socks5-proxy-by-yuanrenguang715,详见: