Skip to content

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

Merged
joker23 merged 4 commits into
mainfrom
skz/sdk-2508/socks-proxy-example
Jul 6, 2026
Merged

fix: add SOCKS proxy example and fixes warning logging and proxyAuth reporting#1786
joker23 merged 4 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
Changes are limited to Node-specific networking/diagnostics behavior, documentation, and CI; no auth or data-path redesign beyond more accurate diagnostic flags when using custom agents.

Overview
Adds a custom SOCKS proxy example for the Node server SDK that wires SocksProxyAgent into proxyAgent, plus Dante-based proxy assets and a CI job that runs the example and checks proxy logs for real traffic.

Fixes proxyAgent handling: strip it from options passed into shared LDClientImpl so it is not logged as an unknown config option, and treat a supplied proxyAgent as a best-effort signal for proxy auth in diagnostics (usingProxyAuth() / _hasProxyAuth), matching SOCKS URLs with embedded credentials. Tests and LDOptions docs are updated accordingly; the example is registered in workspaces, release-please, and excluded from the main SDK tsconfig build.

Reviewed by Cursor Bugbot for commit 55e41b9. 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[bot]

This comment was marked as resolved.

@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
@joker23
joker23 requested a review from kinyoklion July 6, 2026 17:38
@joker23
joker23 merged commit a5b42ca into main Jul 6, 2026
55 checks passed
@joker23
joker23 deleted the skz/sdk-2508/socks-proxy-example branch July 6, 2026 18:19
@github-actions github-actions Bot mentioned this pull request Jul 6, 2026
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