- Notifications
You must be signed in to change notification settings - Fork3.6k
Add Dialer.ProxyConnectHeader#605
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
| } | ||
| ifproxyURL!=nil { | ||
| dialer,err:=proxy_FromURL(proxyURL,netDialerFunc(netDial)) | ||
| dialer,err:=proxy_FromURL(proxyURL,&netDialer{d.ProxyConnectHeader,netDial}) |
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.
Should check if the header is set before using it.
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.
Custom header information, can be empty
proxy.go Outdated
| funcinit() { | ||
| proxy_RegisterDialerType("http",func(proxyURL*url.URL,forwardDialerproxy_Dialer) (proxy_Dialer,error) { | ||
| return&httpProxyDialer{proxyURL:proxyURL,forwardDial:forwardDialer.Dial},nil | ||
| p,_:=forwardDialer.(*netDialer) |
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.
We really should not just discard errors here.
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.
Yes, i fix it
IngCr3at1on commentedSep 11, 2020
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. |
AllenX2018 commentedSep 14, 2020
Yes, thanks for the kind reminder |
jaitaiwan commentedJun 19, 2024
LGTM - if the merge conflicts can be resolved then we can merge this PR :) |
michel-laterman commentedMay 28, 2025
@AllenX2018, do you have time to update the PR? |
Fixes#479. Add a field
ProxyConnectHeaderinDialerfor user to costomize the proxy headers