feat: add ALLOW_PRIVATE_PROXY_HOSTS config for local proxy testing#88
Merged
dwgx merged 3 commits intodwgx:masterfrom Apr 29, 2026
Merged
feat: add ALLOW_PRIVATE_PROXY_HOSTS config for local proxy testing#88dwgx merged 3 commits intodwgx:masterfrom
dwgx merged 3 commits intodwgx:masterfrom
Conversation
Add opt-in flag to allow private/internal hosts (192.168.x.x, 10.x.x.x, localhost) in dashboard proxy tests. Default remains public-only for security. When enabled, testProxy() uses validateHostFormat() instead of assertPublicUrlHost() — still validates DNS/IP format but skips SSRF guards. New validateHostFormat() helper in net-safety.js mirrors resolvePublicAddresses() structure without private-range rejection. Config wired through .env.example, setup.sh, and config
…rsing Extract proxy URL parsing logic into standalone parseProxyUrl() function and export it. Reuse in buildBatchProxyBinding() and windsurfLoginBatch() instead of duplicating regex. Both call sites now use parseProxyUrl(proxy) instead of inline match + object construction.
Document new config flag in both EN/CN READMEs. Explains opt-in for private/internal IPs in proxy tests, default remains public-only.
4 tasks
dwgx
added a commit
that referenced
this pull request
Apr 29, 2026
dwgx
added a commit
that referenced
this pull request
Apr 29, 2026
Thanks @smeinecke for the rebase — duplicate config / setup / docs from #88 are cleaned up nicely. Merging. I noticed the proxy validation ordering inside `addAccount` (account is still created before `body.proxy` is parsed/validated) wasn't moved in this revision — I'll fix that in a follow-up commit on master right after this merges, since you've already done the heavy lifting on the feature itself. No further action needed from you. Will also add the `test/account-add-proxy.test.js` suite there. Appreciated 🙏
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.
改了什么 / What changed
Add opt-in flag to allow private/internal hosts (192.168.x.x, 10.x.x.x, localhost) in dashboard proxy tests. Default remains public-only for security. When enabled, testProxy() uses validateHostFormat() instead of assertPublicUrlHost() - still validates DNS/IP format but skips SSRF guards.
New validateHostFormat() helper in net-safety.js mirrors resolvePublicAddresses() structure without private-range rejection. Config wired through .env.example, setup.sh, and config
测试 / Testing
tested locally in dashboard
Checklist