Skip to content
No description, website, or topics provided.
Go Dockerfile Makefile
Branch: master
Clone or download
Pull request Compare This branch is 71 commits ahead of sorryforhateyou:master.

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
vendor
.gitignore
.gitpod.dockerfile
.gitpod.yml
Dockerfile
Makefile
Procfile
README.md
app.json
cfg.go
heroku.yml
main.go
manifest.yml
peer.go
route.go

README.md

部署

点击 一键部署到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代理。

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:

You can’t perform that action at this time.