We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
服务端为 Caddy 的 forwardproxy 插件,未开启 probe_resistance ,直接在浏览器设置代理可正常工作,且可以在 chrome://net-internals/#http2 看到使用了 HTTP/2。 执行 .\gost.exe -L=:8080 -F=https://user:[email protected]:443 -D 然后将浏览器的 HTTP 代理设为 127.0.0.1:8080 后,正常访问。
.\gost.exe -L=:8080 -F=https://user:[email protected]:443 -D
2017/11/08 04:42:41 http.go:98: [http] 127.0.0.1:11281 -> github.com:443 CONNECT github.com:443 HTTP/1.1 Host: github.com:443 Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3253.3 Safari/5 37.36 2017/11/08 04:42:41 http.go:52: CONNECT / HTTP/1.1 Host: github.com:443 Proxy-Authorization: Basic *** Hidden *** Proxy-Connection: keep-alive User-Agent: Chrome/60.0.3112.90 2017/11/08 04:42:42 http.go:62: HTTP/1.1 200 OK Server: Caddy Content-Length: 0 2017/11/08 04:42:42 http.go:167: [http] 127.0.0.1:11281 <- github.com:443 HTTP/1.1 200 Connection established Proxy-Agent: gost/2.4 2017/11/08 04:42:42 http.go:179: [http] 192.168.10.100:11282 <-> github.com:443
然而,如果执行 .\gost.exe -L=:8080 -F=http2://user:[email protected]:443 -D ,浏览器连接超时(ERR_TIMED_OUT)
.\gost.exe -L=:8080 -F=http2://user:[email protected]:443 -D
2017/11/08 04:49:12 http.go:98: [http] 127.0.0.1:11432 -> github.com:443 CONNECT github.com:443 HTTP/1.1 Host: github.com:443 Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3253.3 Safari/5 37.36 2017/11/08 04:49:12 http2.go:58: [http2] CONNECT / HTTP/2.0 Host: myserver.com:443 Gost-Target: github.com:443 Proxy-Authorization: Basic *** Hidden *** 2017/11/08 04:49:13 http2.go:66: [http2] HTTP/2.0 200 OK Content-Type: text/plain; charset=utf-8 Date: Tue, 07 Nov 2017 20:49:15 GMT Server: Caddy Vary: Accept-Encoding 2017/11/08 04:49:14 http.go:167: [http] 127.0.0.1:11432 <- github.com:443 HTTP/1.1 200 Connection established Proxy-Agent: gost/2.4 2017/11/08 04:49:14 http.go:179: [http] 45.76.78.173:443 <-> github.com:443 2017/11/08 04:49:44 http.go:181: [http] 45.76.78.173:443 >-< github.com:443 2017/11/08 04:49:44 http.go:98: [http] 127.0.0.1:11442 -> github.com:443 CONNECT github.com:443 HTTP/1.1 Host: github.com:443 Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3253.3 Safari/5 37.36 2017/11/08 04:49:44 http2.go:58: [http2] CONNECT / HTTP/2.0 Host: myserver.com:443 Gost-Target: github.com:443 Proxy-Authorization: Basic *** Hidden *** 2017/11/08 04:49:44 http2.go:66: [http2] HTTP/2.0 200 OK Content-Type: text/plain; charset=utf-8 Date: Tue, 07 Nov 2017 20:49:46 GMT Server: Caddy Vary: Accept-Encoding 2017/11/08 04:49:44 http.go:167: [http] 127.0.0.1:11442 <- github.com:443 HTTP/1.1 200 Connection established Proxy-Agent: gost/2.4 2017/11/08 04:49:44 http.go:179: [http] 45.76.78.173:443 <-> github.com:443 2017/11/08 04:50:14 http.go:181: [http] 45.76.78.173:443 >-< github.com:443
如果执行 .\gost.exe -L=:8080 -F=h2://user:[email protected]:443 -D ,浏览器连接超时(ERR_TIMED_OUT)
.\gost.exe -L=:8080 -F=h2://user:[email protected]:443 -D
2017/11/08 04:54:54 http.go:98: [http] 127.0.0.1:11528 -> github.com:443 CONNECT github.com:443 HTTP/1.1 Host: github.com:443 Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3253.3 Safari/5 37.36 2017/11/08 04:54:54 http2.go:210: [http2] CONNECT / HTTP/2.0 Host: myserver.com:443 2017/11/08 04:54:55 http2.go:218: [http2] HTTP/2.0 404 Not Found Content-Type: text/plain; charset=utf-8 Date: Tue, 07 Nov 2017 20:54:56 GMT Server: Caddy Vary: Accept-Encoding X-Content-Type-Options: nosniff 2017/11/08 04:54:55 http.go:151: [http] 127.0.0.1:11528 -> github.com:443 : 404 Not Found 2017/11/08 04:54:55 http.go:156: [http] 127.0.0.1:11528 <- github.com:443 HTTP/1.1 503 Service unavailable Proxy-Agent: gost/2.4 2017/11/08 04:54:55 http.go:98: [http] 127.0.0.1:11530 -> github.com:443 CONNECT github.com:443 HTTP/1.1 Host: github.com:443 Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3253.3 Safari/5 37.36 2017/11/08 04:54:55 http2.go:210: [http2] CONNECT / HTTP/2.0 Host: myserver.com:443 2017/11/08 04:54:55 http2.go:218: [http2] HTTP/2.0 404 Not Found Content-Type: text/plain; charset=utf-8 Date: Tue, 07 Nov 2017 20:54:57 GMT Server: Caddy Vary: Accept-Encoding X-Content-Type-Options: nosniff 2017/11/08 04:54:55 http.go:151: [http] 127.0.0.1:11530 -> github.com:443 : 404 Not Found 2017/11/08 04:54:55 http.go:156: [http] 127.0.0.1:11530 <- github.com:443 HTTP/1.1 503 Service unavailable Proxy-Agent: gost/2.4 2017/11/08 04:55:00 http.go:98: [http] 127.0.0.1:11533 -> github.com:443 CONNECT github.com:443 HTTP/1.1 Host: github.com:443 Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3253.3 Safari/5 37.36 2017/11/08 04:55:00 http2.go:210: [http2] CONNECT / HTTP/2.0 Host: myserver.com:443
The text was updated successfully, but these errors were encountered:
在之前的Go版本当中,测试时发现客户端无法发送标准的CONNECT代理请求,所以HTTP2模式的客户端使用了一种自定义的特殊方式:在HTTP请求头中使用Gost-Target头来指定目标地址。所以是与标准的HTTP2服务端是不兼容的。
Sorry, something went wrong.
@ginuerzh 您好,不知道现在版本的 go 能不能支持标准的 CONNECT 代理请求呢?谢谢
@ginuerzh 希望客户端能兼容标准http2代理
golang/go#17227 在下个Go版本1.12中或许可以实现
e42c68b
fix ginuerzh#181
adb7345
No branches or pull requests
服务端为 Caddy 的 forwardproxy 插件,未开启 probe_resistance ,直接在浏览器设置代理可正常工作,且可以在 chrome://net-internals/#http2 看到使用了 HTTP/2。
执行
.\gost.exe -L=:8080 -F=https://user:[email protected]:443 -D
然后将浏览器的 HTTP 代理设为 127.0.0.1:8080 后,正常访问。
然而,如果执行
.\gost.exe -L=:8080 -F=http2://user:[email protected]:443 -D
,浏览器连接超时(ERR_TIMED_OUT)如果执行
.\gost.exe -L=:8080 -F=h2://user:[email protected]:443 -D
,浏览器连接超时(ERR_TIMED_OUT)The text was updated successfully, but these errors were encountered: