部署
点击 ,一键部署到heroku
本地客户端执行:gost -L=:1080 -F=quic+wss://xxxxx.herokuapp.com:443
挂ngrok的方法如下:
sudo apt-get install heroku
git clone https://github.com/xuiv/gost-heroku.git
cd gost-heroku
在app.json中添加如下内容:
"env": {
"AUX_PORT": {
"description": "gost socket5 port",
"value": "9090"
},
"NGROK_API_TOKEN": {
"description": "ngrok authtoken",
"value": "4bzM2n2AJwEH3jD2mTxWP_6Vmy6iihkUa2HaDmCmv80" <-- 此处换成你的ngrok认证字符串
},
"NGROK_COMMAND": {
"description": "ngrok protocol",
"value": "tcp"
},
"NGROK_OPTS": {
"description": "other ngrok command options",
"value": ""
}
},
修改Procfile为:
web: with_ngrok gost-heroku -L=quic+ws://:$PORT -L=socks5://:9090
接下来执行:
heroku login
heroku create yourappid
heroku config:set NGROK_API_TOKEN=4bzM2n2AJwEH3jD2mTxWP_6Vmy6iihkUa2HaDmCmv80 -a yourappid
heroku config:set AUX_PORT=9090 -a yourappid
heroku config:set NGROK_COMMAND=tcp -a yourappid
heroku buildpacks:add https://github.com/xuiv/heroku-buildpack-ngrok.git -a yourappid
heroku buildpacks:add https://github.com/heroku/heroku-buildpack-go.git -a yourappid
git push heroku master
去ngrok查看转发的域名和端口,这个是直接的soket5代理。
A barebones Go app, which can easily be deployed to Heroku.
This application supports the Getting Started with Go on Heroku article - check it out.
Make sure you have Go and the Heroku Toolbelt installed.
$ go get -u github.com/heroku/go-getting-started
$ cd $GOPATH/src/github.com/heroku/go-getting-started
$ heroku local
Your app should now be running on localhost:5000.
You should also install govendor if you are going to add any dependencies to the sample app.
$ heroku create
$ git push heroku master
$ heroku open
or
For more information about using Go on Heroku, see these Dev Center articles: