Conversation
| } | ||
| if proxyURL != nil { | ||
| dialer, err := proxy_FromURL(proxyURL, netDialerFunc(netDial)) | ||
| dialer, err := proxy_FromURL(proxyURL, &netDialer{d.ProxyConnectHeader, netDial}) |
There was a problem hiding this comment.
Should check if the header is set before using it.
There was a problem hiding this comment.
Custom header information, can be empty
proxy.go
Outdated
| func init() { | ||
| proxy_RegisterDialerType("http", func(proxyURL *url.URL, forwardDialer proxy_Dialer) (proxy_Dialer, error) { | ||
| return &httpProxyDialer{proxyURL: proxyURL, forwardDial: forwardDialer.Dial}, nil | ||
| p, _ := forwardDialer.(*netDialer) |
There was a problem hiding this comment.
We really should not just discard errors here.
7ce4db9 to
aa46640
Compare
|
LGTM but someone else must approve. Just a quick comment: force pushing on a PR makes it difficult to review your new changes to the PR; I'd suggest just pushing followup commits and if you want to squash them after review that's a good idea. In this case it was easy enough to scroll through and find the change but it can be quite cumbersome in large PRs. |
|
Yes, thanks for the kind reminder |
|
LGTM - if the merge conflicts can be resolved then we can merge this PR :) |
|
@AllenX2018, do you have time to update the PR? |
Fixes #479. Add a field
ProxyConnectHeaderinDialerfor user to costomize the proxy headers