-
Notifications
You must be signed in to change notification settings - Fork 248
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
CONNECT proxy is not working with downstream proxy enabled #300
Comments
After hours of debugging, I found sort of solution: I really don't understand what I did, but now it works. But I am sure that this is not proper fix. |
I guess that this bug is related to reading net.Conn twice. |
Well, seems the problem was caused by deadlock. Content-Length is undefined, so it writes response infinitely long until client's timeout. As far as I got it, we need to write body in dedicated goroutine. I used |
I've provided more proper fix, but now there is some mysterious deadlock in tests. I gave up 😞 |
I've been having the same issue and thought that MITM setup with a CA was the only way around this. I'll try to apply your fixes and see if it helps for now |
@AltFreq07 as a result I wrote from scratch my own solution. |
Do you have the code hosted anywhere? I would like to see how you forwarded the tunnels for an HTTP Connection method @L11r |
I'm also facing the same issue. |
This patch fixes and extends connectHTTP() implementation. We make separate CONNECT request to the downstream proxy to avoid copying everything we read from the wire. It may contain "per-proxy-hop" headers and other information we do not want to send as well as body. We send Proxy-Authorization header if UserInfo is provided. We do TLS handshake with HTTPS proxies. We fix the Content-Length -1 in CONNECT response issues. Fixes google#300
This patch fixes and extends connectHTTP() implementation. We make separate CONNECT request to the downstream proxy to avoid copying everything we read from the wire. It may contain "per-proxy-hop" headers and other information we do not want to send as well as body. We send Proxy-Authorization header if UserInfo is provided. We do TLS handshake with HTTPS proxies. We fix the Content-Length -1 in CONNECT response issues. Fixes google#300
This patch fixes and extends connectHTTP() implementation. We make separate CONNECT request to the downstream proxy to avoid copying everything we read from the wire. It may contain "per-proxy-hop" headers and other information we do not want to send as well as body. We send Proxy-Authorization header if UserInfo is provided. We do TLS handshake with HTTPS proxies. We fix the Content-Length -1 in CONNECT response issues. Fixes google#300
This patch fixes and extends connectHTTP() implementation. We make separate CONNECT request to the downstream proxy to avoid copying everything we read from the wire. It may contain "per-proxy-hop" headers and other information we do not want to send as well as body. We send Proxy-Authorization header if UserInfo is provided. We do TLS handshake with HTTPS proxies. We fix the Content-Length -1 in CONNECT response issues. Fixes google#300
This patch fixes and extends connectHTTP() implementation. We make separate CONNECT request to the downstream proxy to avoid copying everything we read from the wire. It may contain "per-proxy-hop" headers and other information we do not want to send as well as body. We send Proxy-Authorization header if UserInfo is provided. We do TLS handshake with HTTPS proxies. We fix the Content-Length -1 in CONNECT response issues. Fixes google#300
It works ok with HTTP-only sites.
Curl output:
I tried different proxies (own squid, mcafee web gateway, etc).
The text was updated successfully, but these errors were encountered: