fix: add SOCKS proxy example and fixes warning logging and proxyAuth reporting#1786
fix: add SOCKS proxy example and fixes warning logging and proxyAuth reporting#1786joker23 wants to merge 3 commits into
Conversation
The SDK cannot inspect a caller-supplied proxyAgent to know whether it carries its own credentials (for example a SOCKS URL's embedded username/password), so usingProxyAuth() now reports true for any supplied proxyAgent rather than only when proxyOptions.auth is set, matching the existing best-effort reasoning for usingProxy().
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1933703. Configure here.
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/browser size report |
|
@launchdarkly/js-client-sdk-common size report |
|
@launchdarkly/js-client-sdk size report |
1933703 to
30421d6
Compare
There was a problem hiding this comment.
If there is a reasonable option I would think a container that ran a more standard socks proxy would potentially be better.

This PR mainly adds an example for how to use SOCKS proxy agent in node server sdk
Additionally this PR will pull in fixes that were not included in the previous PR
proxyAgentoption will no longer log a "unknown property" warningproxyAgentwill also reportproxyAuthusage to diagnostic eventNote
Low Risk
Small SDK behavior tweaks around option validation and diagnostic flags, plus docs/examples and CI; no auth or data-path redesign.
Overview
Adds a custom SOCKS proxy example for the Node server SDK (
proxyAgent+SocksProxyAgent), including an in-process demo SOCKS5 server, e2e checks that traffic was relayed, workspace wiring, and a CI job that runs the example.Fixes two
proxyAgentbehaviors:LDClientNodestripsproxyAgentfrom options passed to the shared client so it is not logged as an unknown config option, andNodeRequeststreats a suppliedproxyAgentas a best-effort signal for proxy auth in diagnostics (same rationale asusingProxy()), with tests and doc updates to match.Reviewed by Cursor Bugbot for commit 30421d6. Bugbot is set up for automated code reviews on this repo. Configure here.