Skip to content

zx3777/gost-heroku-1

 
 

Repository files navigation

部署

本地客户端执行: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代理。

go-getting-started

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.

Running Locally

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.

Deploying to Heroku

$ heroku create
$ git push heroku master
$ heroku open

or

Deploy

Documentation

For more information about using Go on Heroku, see these Dev Center articles:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 75.2%
  • Dockerfile 23.8%
  • Makefile 1.0%