-
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
got 407 when fetching https with downstream proxy #269
Comments
after monitor network traffic, I found not Proxy-Authorization in headers fields of the CONNECT method to downstream proxy. pbw := bufio.NewWriter(conn)
pbr := bufio.NewReader(conn)
if p.proxyURL.User != nil {
req.Header.Add("Proxy-Authorization", "Basic "+base64.StdEncoding.EncodeToString([]byte(p.proxyURL.User.String())))
}
req.Write(pbw)
pbw.Flush() and this results stucking at tls handshakes |
The problem may be the usage of http.ReadResponse for CONNECT res, err := http.ReadResponse(pbr, req) When it write response back, "Connection: close" is added automatically. |
skiloop
added a commit
to skiloop/martian
that referenced
this issue
Oct 8, 2018
skiloop
added a commit
to skiloop/martian
that referenced
this issue
Oct 8, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My remote proxy which is password protected and supports https, when applies to martian as downstream proxy, 407 is got.
then comes the following result:
< HTTP/1.1 407 Proxy Authentication Required
< Connection: close
< Content-Type: text/html
< Server: someproxy
<
curl: (56) Received HTTP code 407 from proxy after CONNECT
The text was updated successfully, but these errors were encountered: