-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
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
使http outbound支持连接https与http/2代理服务器 #18
Conversation
Please update the code |
1. Enables http outbound to set up a HTTP tunnel above HTTP/1.1, HTTP/1.1 over TLS, or HTTP/2 over TLS. Previously it only works for plain HTTP/1.1 2. In setting up CONNECT tunnel, replaces handcrafted request with standard http.Request
Have rebased upon current master. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code looks good to me.
I see description mentioned only Caddy with ForwardProxy
, how about tests with
some other common http server like Squid, Privoxy.
Squid or Privoxy, in my knowledge, doesn't yet support CONNECT tunnel over H2. Squid has a wiki page saying it's in designing phase(https://wiki.squid-cache.org/Features/HTTP2). My patch can handle both HTTP/1.1 and H2, so it still works with Squid/Privoxy as before. Besides Caddy forwardproxy, HAProxy also support H2 CONNECT method. So in theory any HTTP proxy server can support H2 by simply fronting it with a HAProxy. I've tested it with HAProxy + tinyproxy and it works fine. There is a sample HAProxy config for this purpose at https://github.com/klzgrad/naiveproxy/wiki/HAProxy-Setup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this PR is ready to be merged. However, Http2 proxy currently does not have any test and is a user-facing feature, which can be troublesome if we want to modify it later.
v2ray/v2ray-core#2488
v2ray/v2ray-core#2521