Skip to content

proxy quirks #635

@aep-sunlife

Description

@aep-sunlife
  • I don't see the node-proxy-agent dependency registered in package.json. Is this truly the HTTP client framework that corepack uses to download components when running corepack install?
  • node-proxy-agent is a dead project with a successor "proxy-agents". When can we replace the dead proxy dependency with a live one?
  • Despite both corepack and node-proxy-agent documenting uppercase HTTP_PROXY, HTTPS_PROXY environment variables, on my machine only the lowercase ones http_proxy, https_proxy have any effect on whether package installation occurs through a proxy or not.
  • Unlike many other applications, including NPM, corepack fails when presented with the proxy URL's http:// or https:// (no address). The user's intention here is to indicate that no proxy should be used. And these URL values make larger configuration scripting a lot easier.
  • Why not use the same HTTP client as NPM, so that proxy configuration at least behaves identically? Then any questions about configuration can simply link to official NPM documentation. Smaller technology stack, smaller attack surface, less maintenance.

Activity

aduh95

aduh95 commented on Feb 6, 2025

@aduh95
Contributor

Why not use the same HTTP client as NPM […] Smaller technology stack, smaller attack surface

I very much doubt using npm stack would decrease the size of bundle and the attack surface, quite the contrary.

  • I don't see the node-proxy-agent dependency registered in package.json. Is this truly the HTTP client framework that corepack uses to download components when running corepack install?

corepack install is not a thing (yet), but no, we moved away from it with #365.
I've opened #636 to address this.

  • Despite both corepack and node-proxy-agent documenting uppercase HTTP_PROXY, HTTPS_PROXY environment variables, on my machine only the lowercase ones http_proxy, https_proxy have any effect on whether package installation occurs through a proxy or not.
  • Unlike many other applications, including NPM, corepack fails when presented with the proxy URL's http:// or https:// (no address). The user's intention here is to indicate that no proxy should be used. And these URL values make larger configuration scripting a lot easier.

That feels something that should be reported upstream, but I'm not opposed to fix it downstream if someone sends a PR.

aduh95

aduh95 commented on Feb 7, 2025

@aduh95
Contributor
  • Unlike many other applications, including NPM, corepack fails when presented with the proxy URL's http:// or https:// (no address). The user's intention here is to indicate that no proxy should be used. And these URL values make larger configuration scripting a lot easier.

BTW any reason you're not using NO_PROXY for that?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @aduh95@aep-sunlife

      Issue actions

        proxy quirks · Issue #635 · nodejs/corepack