fixes for servers with no internet access, relying on https_proxy#29
fixes for servers with no internet access, relying on https_proxy#29prigaux wants to merge 1 commit intosapics:mainfrom
Conversation
needed since Axios https_proxy support is buggy, cf axios/axios#4531 ref: sapics#28
|
NB: with this change, it works out of the box with Node.js >= 24 if you use "NODE_USE_ENV_PROXY" (cf nodejs/node#57165 ) |
|
Thanks! This looks great! Currently, this module supports Node.js v14, and |
|
Could you try setting the It might work, since // `proxy` defines the hostname, port, and protocol of the proxy server.
// You can also define your proxy using the conventional `http_proxy` and
// `https_proxy` environment variables. If you are using environment variables
// for your proxy configuration, you can also define a `no_proxy` environment
// variable as a comma-separated list of domains that should not be proxied.
// Use `false` to disable proxies, ignoring environment variables.
// `auth` indicates that HTTP Basic auth should be used to connect to the proxy, and
// supplies credentials.
// This will set an `Proxy-Authorization` header, overwriting any existing
// `Proxy-Authorization` custom headers you have set using `headers`.
// If the proxy server uses HTTPS, then you must set the protocol to `https`.
proxy: {
protocol: 'https',
host: '127.0.0.1',
// hostname: '127.0.0.1' // Takes precedence over 'host' if both are defined
port: 9000,
auth: {
username: 'mikeymike',
password: 'rapunz3l'
}
}, |
|
The issue should now be resolved in v4, following the same approach suggested in this PR. |
NB: i have replaced the Axios calls for things I could easily test.
If someone is interested, I could remove the remaining Axios calls.