登陆linux vps,首先安装go环境。然后,
git clone
https://github.com/reusee/gotunnel gotunnel-by-reusee
cd gotunnel-by-reusee
cd server
[root@host server]# ls config.go server.go [root@host server]# nano config.go
(你可以把 PORT的值改为其他的值,比如":38809". KEY的值,你要是想改,也可以
改一下) [root@host server]# go build -o gotunnel
(会在当前目录下,生成可执行文件gotunnel )
[root@host server]# nano /etc/systemd/system/gotunnel-by-reusee.service
其内容为:
[Unit]
After=network.target
[Service]
ExecStart=/root/gotunnel-by-reusee/server/gotunnel
Restart=always
[Install]
WantedBy=multi-user.target
然后,运行:
systemctl start gotunnel-by-reusee
systemctl enable gotunnel-by-reusee
服务器端搭建完成。
在本地机器mac上。首先安装go环境。然后,
git clone
https://github.com/reusee/gotunnel gotunnel-by-reusee
cd gotunnel-by-reusee
cd client
nano config.go
其内容如下:
package main
const (
PORT = ":8808"
SERVER = "vps-public-ip:38808"
KEY = "abcd1234qwer7890"
)
go build -o gotunnel
(会在当前目录下,生成可执行文件gotunnel )
./gotunnel
会显示:
listening on :8808
不要关闭此terminal.
然后,设置本地机器的浏览器的socks5代理服务器地址为127.0.0.1 ,端口为8808 ,
浏览器即可翻墙。
项目地址:https://github.com/reusee/gotunnel
相关帖子:https://briteming.blogspot.com/2013/08/android-gotunnel.html
https://briteming.blogspot.com/2018/10/gotunnel-by-codesaler.html
(gotunnel-by-codesaler是gotunnel-by-reusee的fork版,但是作出了改进)