Skip to content
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

feat: auto setup proxy for http requests #69

Merged
merged 3 commits into from
Apr 7, 2022
Merged

Conversation

Djaler
Copy link
Contributor

@Djaler Djaler commented Nov 19, 2021

Resolves #67

sources/httpUtils.ts Outdated Show resolved Hide resolved
@Djaler
Copy link
Contributor Author

Djaler commented Dec 14, 2021

I don't want to annoy, but I really need this feature, because for now we can't use corepack on work computers

@arcanis
Copy link
Contributor

arcanis commented Jan 19, 2022

Hey @Djaler, apologies for the delay, I should have given feedback sooner 🙁

While global-agent does work, I'd tend to prefer to avoid global mutation of the environment (at the moment we use spawn to spawn the underlying package managers, but it could be conceivable to use require instead to avoid part of the boot overhead). Would there be any chance we could do this by having a custom agent (created and local to httpUtils) that we could manually pass to https.get?

@Djaler
Copy link
Contributor Author

Djaler commented Feb 14, 2022

@arcanis sorry for a big delay too.

Looks like I found a good way to do this without global mutations, yeah

@Djaler
Copy link
Contributor Author

Djaler commented Feb 14, 2022

About type error - I don't know why it fails. proxy-agent provides typings https://github.com/TooTallNate/node-proxy-agent/blob/master/index.d.ts

@julioz
Copy link

julioz commented Feb 22, 2022

I'm sorry to be "that person" but like @Djaler, the lack of support for https proxying is what prevents us from using Corepack as well. @arcanis @Djaler is there something I can do to help move this PR forward?

@Djaler
Copy link
Contributor Author

Djaler commented Feb 22, 2022

@julioz you can manually test it, so I can be more sure that everything is working well

@Djaler
Copy link
Contributor Author

Djaler commented Apr 5, 2022

Hey, @arcanis so what about it?

@jeremy-london
Copy link

Looking forward to this feature as well - currently blocking some yarn v1 to yarn v3 migrations we are doing.. can't install yarn behind our proxy

Happy to be a tester if needed!

@arcanis arcanis merged commit 876ce02 into nodejs:main Apr 7, 2022
@arcanis
Copy link
Contributor

arcanis commented Apr 7, 2022

LGTM, thanks @Djaler !

@Djaler
Copy link
Contributor Author

Djaler commented May 7, 2022

@arcanis any chance to release this feature soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Install package manager behind a corporative proxy
4 participants