Skip to content

fix: add SOCKS proxy example and fixes warning logging and proxyAuth reporting#1786

Open
joker23 wants to merge 3 commits into
mainfrom
skz/sdk-2508/socks-proxy-example
Open

fix: add SOCKS proxy example and fixes warning logging and proxyAuth reporting#1786
joker23 wants to merge 3 commits into
mainfrom
skz/sdk-2508/socks-proxy-example

Conversation

@joker23

@joker23 joker23 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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

  1. proxyAgent option will no longer log a "unknown property" warning
  2. setting a proxyAgent will also report proxyAuth usage to diagnostic event

Note

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 proxyAgent behaviors: LDClientNode strips proxyAgent from options passed to the shared client so it is not logged as an unknown config option, and NodeRequests treats a supplied proxyAgent as a best-effort signal for proxy auth in diagnostics (same rationale as usingProxy()), 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.

joker23 added 2 commits July 1, 2026 13:46
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().
@joker23 joker23 requested a review from a team as a code owner July 1, 2026 17:53

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ 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.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 26365 bytes
Compressed size limit: 29000
Uncompressed size: 129044 bytes

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 179504 bytes
Compressed size limit: 200000
Uncompressed size: 831427 bytes

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 38747 bytes
Compressed size limit: 39000
Uncompressed size: 212249 bytes

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 32027 bytes
Compressed size limit: 34000
Uncompressed size: 114248 bytes

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@joker23 joker23 force-pushed the skz/sdk-2508/socks-proxy-example branch from 1933703 to 30421d6 Compare July 1, 2026 18:31

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is a reasonable option I would think a container that ran a more standard socks proxy would potentially be better.

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.

2 participants