Conversation
Set HTTPS_PROXY, HTTP_PROXY, or ALL_PROXY to a socks5://, socks5h://, socks4://, or socks4a:// URL to route outbound requests through a SOCKS proxy instead of a plain HTTP proxy. NO_PROXY exclusions do not apply to SOCKS proxies. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rebased onto main's toolchain migration (nulab#167): regenerate the lockfile, move the fetch-socks>undici override into the overrides section (it had landed under peerDependencyRules during the rebase's auto-merge), satisfy the new tsgolint prefer-nullish-coalescing rule, and drop the now-redundant vi.clearAllMocks() (clearMocks is on by default under vite-plus/test). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
socks5://,socks5h://,socks4://, orsocks4a://URL inHTTPS_PROXY/HTTP_PROXY(falling back to a newALL_PROXY/all_proxy) and route requests through a SOCKS dispatcher instead ofEnvHttpProxyAgentwhen one is set.fetch-socks(MIT), which builds directly on undici'sDispatcher/connector API, composing with the existing logging interceptor the same wayEnvHttpProxyAgentdoes today.overridespin (fetch-socks>undici) sincefetch-socksdepends on undici with the unpinned range>=7, which otherwise resolves a second, incompatible undici major inside the workspace.environment-variables.mdx, including a SOCKS5-over-SSH-tunnel example.NO_PROXYexclusions apply only to the HTTP(S) proxy path; SOCKS proxies route unconditionally.Closes #164.
Test plan
vp check(format, lint, type check) passesvp test— full suite passes (797 tests), including 6 new tests covering SOCKS5/SOCKS4a detection, default port, credentials parsing,HTTPS_PROXY/ALL_PROXYprecedence, and invalid-URL fallbackvp run --filter @nulab/bee build— confirmedfetch-socks/socksbundle correctly into the built CLIHTTPS_PROXY=socks5://127.0.0.1:1and confirmed (via debug logging) the request is routed throughSocksClientand fails withECONNREFUSEDat the proxy, not the API host — proving the SOCKS path is wired up end-to-end🤖 Generated with Claude Code