npm / npm/cli

[BUG] *.domain.tld not recognized in NO_PROXY env

Open
#5,594 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement
Dominant language
JavaScript
Stars
10.1k
Forks
4.7k
Avg merge
2d 2h
Merged PRs (30d)
19

Description

Is there an existing issue for this?
  • I have searched the existing issues
This issue exists in the latest npm version
  • I am using the latest npm
Current Behavior

Currently, only .domain.tld is interpreted in NO_PROXY, wildcard *.domain.tld seem to be handled as actual char.

Expected Behavior

*.domain.tld should match all subdomains.
This should be standardized according to: https://about.gitlab.com/blog/2021/01/27/we-need-to-talk-no-proxy/#standardizing-no_proxy

Steps To Reproduce
  1. Have HTTPS_PROXY and HTTP_PROXY set to a proxy (yourproxy.tld) and NO_PROXY="*.domain.tld" to reach a registry.
  2. Run npx http-server
  3. See error...
Environment
  • npm: v8.15.0 (LTS, but same for latest)
  • Node.js: v16.17.0 (LTS, but same for latest)
  • OS Name: Windows 10
  • npm config:
registry=https://server.domain.tld/nexus/repository/npm/

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior with HTTPS_PROXY, HTTP_PROXY, NO_PROXY="*.domain.tld", and the npx http-server entry point on Windows. Trace npm CLI's proxy and NO_PROXY handling, then locate its existing tests or implementation; done means wildcard subdomains match without breaking the existing .domain.tld behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
cli, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.