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

feat: add support for HTTPS_PROXY #306

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

Open
denysvitali wants to merge 1 commit into fullstorydev:master
base: master
Choose a base branch
Loading
from swisscom:feature/add-https-proxy

Conversation

Copy link

@denysvitali denysvitali commented May 3, 2022

This commit adds support for the HTTPS_PROXY environment variable.
At the moment the NO_PROXY environment variable is ignored, please
be aware of that!

This should close #166

On top of that, this adds support for SOCKS_PROXY via the ProxyFromEnvironment method of golang.org/x/net/proxy

110y, simongellis-attentive, lazcamus, and pimterry reacted with thumbs up emoji
This commit adds support for the HTTPS_PROXY environment variable.
At the moment the NO_PROXY environment variable is ignored, please
be aware of that!
This should close fullstorydev#166 
Copy link

celloni commented May 3, 2022

Thanks a lot for the PR!
curl is also respecting lowercase https_proxy do you think it make sense to do this here as well?

denysvitali reacted with thumbs up emoji

Copy link
Member

Hi @denysvitali thanks for the contribution. Is there a reason we'd need a new third party lib instead of using Go's native proxying?

Copy link

CpuID commented Jul 5, 2022

can confirm this is working great for us - would love to see it merged 👍

Copy link
Author

Hi @denysvitali thanks for the contribution. Is there a reason we'd need a new third party lib instead of using Go's native proxying?

https://github.com/mwitkow/go-http-dialer README explains it:

Some enterprises have fairly restrictive networking environments. They typically operate HTTP forward proxies that require user authentication. These proxies usually allow HTTPS (TCP to :443) to pass through the proxy using the CONNECT method. The CONNECT method is basically a HTTP-negotiated "end-to-end" TCP stream... which is exactly what net.Conn is :)

net/proxy cannot be used here AFAIK because you can't have a dialer that uses TCP over HTTP. The only way to do it is to use a SOCKS5 proxy.

Copy link
Member

I think I'd be trivially fine with a patch to just change (&net.Dialer{}).DialContext(ctx, network, address) => proxy.Dial(ctx, network, address) which would solve at least some of the cases. But the http dialer stuff seems... very unusual and special case.

Copy link

denysvitali reacted with thumbs up emoji hasharslan reacted with heart emoji

Copy link

vpopescu commented Nov 15, 2024
edited
Loading

Hi, what exactly is the status of this patch?
I was using the 1.9.1, and could not get the http_proxy to work.
However downloading the version mentioned above (1.8.8) does work.

So was this patch not carried forward, or did it somehow change and require different configuration?

(Incidentally, the patch in 1.8.8 did not work on Windows)

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Option to add proxy

AltStyle によって変換されたページ (->オリジナル) /