在heroku上部署gost代理服务端

时间:2024-05-07 21:35:50
gost ( https://github.com/ginuerzh/gost ) 

gost 的 websocket tunnel 功能使用 WebSocket 协议,相较 HTTP 协议能做更多事,如作 dnsforwarder 的前置代理实现远程 DNS 查询以防 DNS 污染。

部署步骤
====== 参考帖子 https://code.google.com/p/*/issues/detail?id=22048#c10 a. 注册一个Heroku账号: https://signup.heroku.com/signup/dc b. 安装:Heroku toolbelt部署工具包: https://devcenter.heroku.com/articles/getting-started-with-python#set-up c. 打开 CMD 窗口依次运行下面的命令: heroku login 输入注册邮箱
输入账号密码 登录成功:Authentication successful. 接着运行下面的命令: git clone https://github.com/ginuerzh/gost.git
cd gost 进入 gost 目录,将 https://copy.com/ZMjYfwGWiYyIAOEN/gost_heroku.7z 中的文件夹和文件复制到 gost 目录里,打开 Procfile 修改其中的密码为你自己的任意一个密码,并保存 回到 CMD 窗口,运行下面的命令
heroku create
创建一个app,并记住app的名称 接着运行下面的命令:
git add . -A
git commit -am "make it better"
git push heroku master 出现类似下面的信息,表示部署完成: Counting objects: 16, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (14/14), 3.32 KiB | 0 bytes/s, done.
Total 14 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Go app detected
remote: -----> Checking Godeps/Godeps.json file.
remote: -----> Installing go1.4.2... done
remote: -----> Running: godep go install -tags heroku ./...
remote: -----> Discovering process types
remote: Procfile declares types -> web, worker
remote:
remote: -----> Compressing... done, 2.2MB
remote: -----> Launching... done, v5
remote: https://fierce-everglades-1629.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy.... done.
To https://git.heroku.com/fierce-everglades-1629.git
bde7e61..1b53d2d master -> master 输入 heroku open 若浏览器中显示 Bad Request 则部署成功 d. 本机客户端设置 1. 下载 https://copy.com/9ePBLONYrJB7a9Dd/gost_with_launcher.7z 2. 解压,编辑 gost.bat 修改其中的 your_password 和 your_app_name 分别为您的密码和您的 Heroku 应用的名字 3. 运行 gostLauncher.exe (修改自 Phus Lu 的 *.exe , 所用的工具是 ResHacker, 您也可以用它把图标修改为自己喜欢的) 以后若想升级 gost , 去 https://github.com/ginuerzh/gost 下载最新版提供 gost.exe 即可。 e. 设置浏览器代理服务器地址为 127.0.0.1:1280 ,类型为 socks5 或 http / https