Skip to content

Auto-set NODE_USE_ENV_PROXY and NO_PROXY for Node.js proxy support with ownership cleanup. Added compatibility matrix. - #9

Merged
cvl merged 6 commits into
mainfrom
feat/compat-matrix
Aug 12, 2026
Merged

Auto-set NODE_USE_ENV_PROXY and NO_PROXY for Node.js proxy support with ownership cleanup. Added compatibility matrix.#9
cvl merged 6 commits into
mainfrom
feat/compat-matrix

Conversation

@cvl

@cvl cvl commented Aug 12, 2026

Copy link
Copy Markdown
Contributor
  • fix: consistent test dates in compatibility matrix
  • fix: glob-safe NO_PROXY union, production script tests, version corrections
  • fix: union NO_PROXY/no_proxy, correct Node versions, end-to-end tests
  • fix: NO_PROXY for direct mode, ownership cleanup, correct Node versions
  • feat: auto-set NODE_USE_ENV_PROXY=1 for Node.js proxy support
  • feat: add tested compatibility matrix

cvl added 6 commits August 12, 2026 09:59
16 clients tested on macOS 15.5 with shellroute 0.1.0:
- automatic: curl, wget, Requests, HTTPX, urllib, Go default transport
- explicit configuration: aiohttp (trust_env), Node fetch (env opt-in), Playwright, Puppeteer
- explicit command: SSH (/ssh helper)
- not transparent: HTTPX (trust_env=False), aiohttp default, Node fetch default, Go custom transport
- conditional: npm test runner

README updated to link compatibility matrix and correct Node fetch claim.

Signed-off-by: contra <vytautas@civilis.lt>
Shellroute now injects NODE_USE_ENV_PROXY=1 in both direct and
interactive mode, making Node's built-in fetch, http, and https
modules respect HTTP_PROXY automatically.

- Only set if the user hasn't explicitly configured it (respects opt-out)
- Unset on disconnect and failure (same as HTTP_PROXY)
- Works on Node v20.18+, v22.8+; silently ignored on older versions
- Compatibility matrix updated: Node fetch changes from explicit
  configuration to automatic

Signed-off-by: contra <vytautas@civilis.lt>
P1: direct mode now sets NO_PROXY/no_proxy with localhost,127.0.0.1,::1
merged with user entries. Interactive mode merges instead of overwriting.

P2: tests use production buildProxyEnv/mergeNoProxy/envLookup functions,
not reimplementations. TUI tests source actual writeCleanupHelper output
and verify /disconnect and /connect DISCONNECTED paths call cleanup.

Corrected Node version claims: fetch Node 24.0+, http/https 24.5+,
backported to 22.21+. Node 20 does not support NODE_USE_ENV_PROXY.

Axios >=1.18.1 wording changed to avoid untested 'works correctly' claim.

Signed-off-by: contra <vytautas@civilis.lt>
P1: NO_PROXY and no_proxy are unioned (not merged independently).
Both variables receive the identical deduplicated result containing
all user entries + loopback. Prevents Node lowercase-precedence from
losing uppercase-only entries. Applies to direct and interactive mode.

P2: Node version claims corrected — supported on 24.0+ (fetch),
24.5+ (http/https), 22.21+ (backport). Node 20/21/23 unsupported.
Node fetch default row replaced with NODE_USE_ENV_PROXY=0 opt-out.
Axios wording unchanged (not tested).

P2: Tests exercise production code and emitted shell scripts. Added:
uppercase-only NO_PROXY, lowercase-only no_proxy, both-set union,
deduplication, controller NO_PROXY union script in bash, controller
NODE_USE_ENV_PROXY ownership in bash, /rotate DISCONNECTED cleanup.

Signed-off-by: contra <vytautas@civilis.lt>
…ctions

P1: NO_PROXY tokenizer uses parameter expansion (h=combined%%,*)
instead of for-in loop. Handles NO_PROXY=* and wildcard domains
without bash glob expansion. Works in bash and zsh.

Both NO_PROXY and no_proxy are unioned into one deduplicated list
and assigned identically to both variables.

P2: Shell scripts extracted to session.NoProxyUnionScript and
session.NodeProxyOwnershipScript constants. Tests import and execute
the production constants under both bash and zsh. Added: NO_PROXY=*,
wildcard-domain, differing-lists, /rotate cleanup path.

P2: Matrix metadata updated — version marked unreleased (post-0.1.0),
date 2026-08-11. Node version ranges corrected: 22.0-22.20 and
24.0-24.4 explicitly listed as unsupported. Node fetch default
replaced with NODE_USE_ENV_PROXY=0 in methodology.

Signed-off-by: contra <vytautas@civilis.lt>
Signed-off-by: contra <vytautas@civilis.lt>
@cvl
cvl requested a review from a team as a code owner August 12, 2026 06:59
@cvl
cvl merged commit 92f7d9b into main Aug 12, 2026
2 checks passed
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.

1 participant