Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
AllenX2018 wants to merge2 commits intogorilla:main
base:main
Choose a base branch
Loading
fromAllenX2018:fix-issue-479

Conversation

@AllenX2018
Copy link

Fixes#479. Add a fieldProxyConnectHeader inDialer for user to costomize the proxy headers

}
ifproxyURL!=nil {
dialer,err:=proxy_FromURL(proxyURL,netDialerFunc(netDial))
dialer,err:=proxy_FromURL(proxyURL,&netDialer{d.ProxyConnectHeader,netDial})

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.

Copy link
Author

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)

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.

Copy link
Author

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
Copy link

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
Copy link
Author

Yes, thanks for the kind reminder

@ghostghost changed the titlefix issue #479Add Dialer.ProxyConnectHeaderDec 19, 2021
@jaitaiwan
Copy link
Contributor

LGTM - if the merge conflicts can be resolved then we can merge this PR :)

@michel-laterman
Copy link

@AllenX2018, do you have time to update the PR?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@IngCr3at1onIngCr3at1onIngCr3at1on requested changes

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

Projects

Status: No status

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Support custom HTTP headers for CONNECT proxy request

5 participants

@AllenX2018@IngCr3at1on@jaitaiwan@michel-laterman@coreydaley

[8]ページ先頭

©2009-2025 Movatter.jp