├── Godeps
├── Godeps.json
└── Readme
├── Procfile
├── README.md
├── app.json
├── bootstrap
├── deploy.sh
├── doc
├── 1.png
├── 2.1.png
├── 2.2.png
├── 2.3.png
├── 2.4.png
├── 2.5.png
├── 2.6.png
├── 2.7.png
└── 2.png
├── heroku.yml
├── main.go
├── proxy
└── release.sh
/Godeps/Godeps.json:
--------------------------------------------------------------------------------
1 | {
2 | "ImportPath": "goproxy",
3 | "GoVersion": "go1.10",
4 | "GodepVersion": "v80",
5 | "Packages": [
6 | "./..."
7 | ],
8 | "Deps": []
9 | }
10 |
--------------------------------------------------------------------------------
/Godeps/Readme:
--------------------------------------------------------------------------------
1 | This directory tree is generated automatically by godep.
2 |
3 | Please do not edit.
4 |
5 | See https://github.com/tools/godep for more information.
6 |
--------------------------------------------------------------------------------
/Procfile:
--------------------------------------------------------------------------------
1 | web: ./bootstrap
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## gorpxoy-heroku
2 |
3 | ### Heroku 是一个支持多种编程语言的云平台即服务,gorpxoy-heroku 则是可部署在 Heroku 平台的 gorpxoy 服务。gorpxoy-heroku 使用的 WebSocket 代替原本的 sockets 作为底层传输。
4 |
5 | #### 下面的部署方法,前提是你已经拥有一个heroku账号。
6 |
7 | 1.注册 Heroku 帐号
8 |
9 | Heroku 提供免费账号,部分介绍如下:
10 |
11 | 512 MB RAM per dyno
12 |
13 | Free apps sleep automatically after 30 mins of inactivity to conserve your dyno hours
14 |
15 | Free apps wake automatically when a web request is received
16 |
17 | https://devcenter.heroku.com/articles/limits
18 |
19 | https://devcenter.heroku.com/articles/free-dyno-hours#usage
20 |
21 | 注册地址:https://signup.heroku.com/ (注册和部署过程可能需要梯子)
22 |
23 |
24 | ## 部署方法一(简单)
25 |
26 | 本方法为快速部署。
27 |
28 | 一、在heroku上的部署
29 |
30 | 1、登陆https://dashboard.heroku.com/login
31 |
32 | 2、登陆好后,点击
33 |
34 | [](https://heroku.com/deploy?template=https://github.com/snail007/goproxy-heroku)
35 |
36 | 3、执行以下三个步骤,见下图:
37 |
38 | (1)输入App name.例如`test1-goproxy`
39 |
40 | (2)Choose a region:选择一个.例如United States
41 |
42 | (3)点击:Deploy app
43 |
44 |
45 |
46 | 4、执行完成以后,这是就完成了部署。
47 |
48 |
49 |
50 | 二、在客户端上执行
51 |
52 | 独立goproxy客户端:
53 |
54 | `proxy.exe http -t tcp -p :6600 -T wss -P test1-goproxy.herokuapp.com:443 --parent-ws-password pass -q 8.8.8.8:53 --timeout 30000`
55 |
56 | 在浏览器上设置代理:127.0.0.1:6600 http
57 |
58 | 安卓客户端:
59 |
60 | 安卓 [goproxy-ss-plugin](https://github.com/snail007/goproxy-ss-plugin-android) 插件配置可以写:
61 |
62 | ```text
63 | 主机:test1-goproxy.herokuapp.com
64 |
65 | 端口:443
66 |
67 | 加密方法:aes-256-cfb
68 |
69 | 密码:123
70 |
71 | 插件参数:
72 | ```
73 |
74 | `-S http -j 123 -h aes-256-cfb -T wss -P test1-goproxy.herokuapp.com:443 --parent-ws-password pass --timeout 30000`
75 |
76 | 注意:本次部署中需要调整的就是`test1-goproxy`改为你自己的名称。
77 |
78 | ## 部署方法二
79 |
80 | 该方法相对方法一步骤多一些,但是可以自己设置加密密码,修改启动参数。
81 |
82 | 本方法是fork项目后,可以修改相关的参数,再在heroku上部署。
83 |
84 | 一、在github上fork该项目并修改相关参数
85 |
86 | (1)fork项目:https://github.com/snail007/goproxy-heroku
87 |
88 | (2)修改配置参数,具体就是修改bootstrap里的内容,点击该文件
89 |
90 |
91 |
92 | 修改第7行内容,详细参考:https://snail007.github.io/goproxy/posts/http_cdn_ws/
93 |
94 | 二、在heroku上部署
95 |
96 | 1、登陆https://dashboard.heroku.com/apps
97 |
98 | 2、选择New -> Create new app
99 |
100 |
101 |
102 | 3、执行以下三个步骤,见下图:
103 |
104 | (1)输入App name.例如`test2-goproxy`
105 |
106 | (2)Choose a region:选择一个.例如United States
107 |
108 | (3)点击:Create app
109 |
110 |
111 |
112 | 选择Deploy->GitHub Connect to github
113 |
114 |
115 |
116 | 4、连接到自己的github,搜索goproxy-heroku项目,点击连接Connect
117 |
118 |
119 |
120 | 5、手动部署Manual deploy -> Deploy Branch, 部署成功。
121 |
122 |
123 |
124 |
125 |
126 | 三、在客户端上执行(默认不修改代码)
127 |
128 | 独立goproxy客户端:
129 |
130 | `proxy.exe http -t tcp -p :6600 -T wss -P test2-goproxy.herokuapp.com:443 --parent-ws-password pass -q 8.8.8.8:53 --timeout 30000`
131 |
132 | 在浏览器上设置代理:127.0.0.1:6600 http
133 |
134 | 安卓客户端:
135 |
136 | 安卓 [goproxy-ss-plugin](https://github.com/snail007/goproxy-ss-plugin-android) 插件配置可以写:
137 |
138 | ```text
139 | 主机:test2-goproxy.herokuapp.com
140 |
141 | 端口:443
142 |
143 | 加密方法:aes-256-cfb
144 |
145 | 密码:123
146 |
147 | 插件参数:
148 | ```
149 | `-S http -j 123 -h aes-256-cfb -T wss -P test2-goproxy.herokuapp.com:443 --parent-ws-password pass --timeout 30000`
150 |
151 | 注意:本次部署中需要修改test2-goproxy为你自己的名称。
152 |
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "goproxy server"
3 | }
--------------------------------------------------------------------------------
/bootstrap:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | pwd
3 | echo "#####################"
4 | ls -al
5 | echo "#####################"
6 | cd /app
7 | ./proxy http -p :$PORT -t ws --local-ws-password pass
8 |
--------------------------------------------------------------------------------
/deploy.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | cd ~
3 |
4 | rm -rf goproxy-heroku
5 |
6 | git clone https://github.com/snail007/goproxy-heroku.git
7 |
8 | cd goproxy-heroku
9 |
10 | rm -rf .git
11 |
12 | git init .
13 |
14 | heroku create
15 |
16 | chmod +x bootstrap proxy release.sh
17 |
18 | ./release.sh
19 |
--------------------------------------------------------------------------------
/doc/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snail007/goproxy-heroku/a5415dfaab7daad076ca455eb825bc77d637a5eb/doc/1.png
--------------------------------------------------------------------------------
/doc/2.1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snail007/goproxy-heroku/a5415dfaab7daad076ca455eb825bc77d637a5eb/doc/2.1.png
--------------------------------------------------------------------------------
/doc/2.2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snail007/goproxy-heroku/a5415dfaab7daad076ca455eb825bc77d637a5eb/doc/2.2.png
--------------------------------------------------------------------------------
/doc/2.3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snail007/goproxy-heroku/a5415dfaab7daad076ca455eb825bc77d637a5eb/doc/2.3.png
--------------------------------------------------------------------------------
/doc/2.4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snail007/goproxy-heroku/a5415dfaab7daad076ca455eb825bc77d637a5eb/doc/2.4.png
--------------------------------------------------------------------------------
/doc/2.5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snail007/goproxy-heroku/a5415dfaab7daad076ca455eb825bc77d637a5eb/doc/2.5.png
--------------------------------------------------------------------------------
/doc/2.6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snail007/goproxy-heroku/a5415dfaab7daad076ca455eb825bc77d637a5eb/doc/2.6.png
--------------------------------------------------------------------------------
/doc/2.7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snail007/goproxy-heroku/a5415dfaab7daad076ca455eb825bc77d637a5eb/doc/2.7.png
--------------------------------------------------------------------------------
/doc/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snail007/goproxy-heroku/a5415dfaab7daad076ca455eb825bc77d637a5eb/doc/2.png
--------------------------------------------------------------------------------
/heroku.yml:
--------------------------------------------------------------------------------
1 | # https://devcenter.heroku.com/articles/heroku-yml-build-manifest
2 | # Officially unsupported, but works.
3 | build:
4 | languages:
5 | - go
6 |
7 | run:
8 | web: ./bootstrap
9 |
--------------------------------------------------------------------------------
/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | func main(){
4 | }
5 |
--------------------------------------------------------------------------------
/proxy:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snail007/goproxy-heroku/a5415dfaab7daad076ca455eb825bc77d637a5eb/proxy
--------------------------------------------------------------------------------
/release.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | git add .
3 | git commit -a -m a
4 | git push heroku master
5 |
--------------------------------------------------------------------------------