-
-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
I'm opening this here to start discussion and see if there's a workaround. I imagine this might be an issue for Node.js itself, but it's worth considering if we can do anything in userland or what what exactly Node would need to expose.
Repro:
➜ export GLOBAL_AGENT_HTTP_PROXY=http://127.0.0.1:9000
➜ node
Welcome to Node.js v18.0.0.
Type ".help" for more information.
> require('global-agent').bootstrap();
true
> require('http').get('http://example.org') // Goes via proxy
...
> fetch('http://example.org') // Ignores proxy and always gets sent directly
...
Notably it is possible to configure Undici to always send requests via a proxy (using its setGlobalDispatcher method) but that doesn't seem to be accessible in Node anywhere.
Any ideas?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels