Skip to content

Conversation

prigaux
Copy link

@prigaux prigaux commented Jul 2, 2025

NB: i have replaced the Axios calls for things I could easily test.

If someone is interested, I could remove the remaining Axios calls.

needed since Axios https_proxy support is buggy, cf axios/axios#4531

ref: sapics#28
@prigaux
Copy link
Author

prigaux commented Jul 2, 2025

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 )

@sapics
Copy link
Owner

sapics commented Jul 2, 2025

Thanks! This looks great!

Currently, this module supports Node.js v14, and Readable.fromWeb is only available starting from v17.
We'll consider merging this once we update the minimum supported Node.js version.

@sapics
Copy link
Owner

sapics commented Jul 4, 2025

Could you try setting the http_proxy or https_proxy environment variable with the current version?

It might work, since axios also supports proxy configuration via environment variables, as described in their documentation:
https://github.com/axios/axios?tab=readme-ov-file#request-config

  // `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'
    }
  },

@sapics sapics mentioned this pull request Aug 31, 2025
@sapics
Copy link
Owner

sapics commented Aug 31, 2025

The issue should now be resolved in v4, following the same approach suggested in this PR.
I handled it through another issue at the time and forgot to follow up on this PR, my apologies.
Thank you again for your contribution!

@sapics sapics closed this Sep 3, 2025
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.

2 participants