The login window can route through a configurable egress proxy - #279
Merged
Conversation
czpython
force-pushed
the
eng-browser-egress
branch
from
August 18, 2026 06:19
e00b90b to
5bae2a2
Compare
Some sites reject a login when it arrives from a datacenter IP. Give the browser login window an optional HTTP proxy so the login step can egress from a different IP. Only the login window uses it — borrows keep the box IP, which is enough once a session is minted. The proxy is an authless address authored as sandbox.browser_login_proxy; what sits behind it is deploy config, so no proxy secret enters the app. login.py injects it into the launcher's environment; session-launch passes it to Playwright and, with a proxy set, blocks the WebRTC UDP leak. Empty keeps the box IP.
czpython
force-pushed
the
eng-browser-egress
branch
from
August 18, 2026 06:24
5bae2a2 to
24cf81a
Compare
czpython
enabled auto-merge (squash)
August 18, 2026 06:24
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.
Some sites reject a login when it arrives from a datacenter IP. This gives the browser login window an optional HTTP proxy so the login step can egress from a different IP.
Only the login window uses it. A session keeps working when later used from the box's own IP, so only the login step needs the proxy — borrows are unchanged.
Change
settings.py—Sandbox.browser_login_proxy, authored assandbox.browser_login_proxyin the config file.setup_env.py— added to_KNOWN_TOML_KEYS["sandbox"]and the default template, so setup accepts it (a[sandbox]key not in the known set is otherwise treated as a provider table).browser/login.py— injects the proxy into thesession-launchenvironment, only when set and shell-quoted. The borrow launcher insessions.pyis untouched.deploy/browser/session-launch— reads it, passes Playwright'sproxy: { server }, and blocks the WebRTC UDP leak when a proxy is set.The value is an authless address (e.g.
http://172.17.0.1:8888); what sits behind it is deploy config, so no proxy secret enters the app. Empty keeps today's behavior. A fixed proxy fails closed: an unreachable exit errors the login browser rather than falling back to the box IP.Verification
Built the browser image and confirmed on a running container: with the proxy set, the browser launches with
--proxy-serverand its egress IP is the proxy's; unset, no proxy flag and egress is the box IP. Unit tests cover the login command — proxy injected when set, omitted when unset, and shell-quoted so a bad value can't inject.