Repository navigation
feat(computer): a browser alone routing sites goes out only through the site proxy's forward port (FD-4934) - #541
Merged
earakely-scale merged 5 commits intoNov 9, 2026
Conversation
…he site proxy's forward port (FD-4934) - The shared site proxy listens on 127.0.0.1:3128 as a forward proxy. A CONNECT to a site's name tunnels into TLS with the site's certificate from the deploy's CA and on to its route, as the transparent listeners send it; a request naming a site's URL is served as the HTTP listener serves it, a real name sent to HTTPS and a .localhost one kept on HTTP; responses stream; any other host, loopback among them, is refused at once with 403 and a log line. - A browser computer that routes sites boots with AGENTENV_SITE_PROXY naming the port, which runs out of the agent's reach as the rest of the site proxy does. The headless base's stand-in moves to 3129 and serves only a browser computer that routes no sites. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he e2e acts on its own computer - A request through the forward port naming a site's URL over plain HTTP was sent to HTTPS without its query string. - The forward port e2e found the computer to kill the proxy in by scanning Docker; it now takes the deployed computer's own container from the local provider. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd its e2e covers a reset - The site proxy listens on the forward port only for a computer with no display, a browser alone's. A desktop computer, where nothing points at it, no longer binds 3128, so an app of its own there can't stop the whole proxy from starting. - The forward port e2e resets the browser computer and checks that it serves the sites, refuses the rest and starts its tabs again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e's stand-in stays as it was on 3128 A browser computer that routes no sites now changes not at all, and the base image isn't touched: the stand-in keeps 3128, and a computer that routes sites names the forward port, 127.0.0.1:3129, to its browser through AGENTENV_SITE_PROXY. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…4-m55-the-site-proxys-forward-proxy
earakely-scale
deleted the
edgararakelyan/fd-4934-m55-the-site-proxys-forward-proxy
branch
November 9, 2026 00:23
earakely-scale
added a commit
that referenced
this pull request
Nov 9, 2026
…ting branch Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 and why
M5.5 (FD-4934): a browser alone that routes sites goes out only through the shared site proxy's forward port,
127.0.0.1:3129, which enforces the site table and runs out of the agent's reach. Until now the headless base's stand-in on 3128 forwarded every request, refusing nothing, and ran as the session user, so the agent could stop it. This unblocks M5.7, M8.13, M8.20 and M8.21.The decisions are on FD-4934. Decision 1: the base's stand-in stays, untouched, for a browser computer that routes no sites, so the forward port takes 3129. Decision 2, revised to b: the port listens only on a browser computer.
site_proxy.py,SiteProxy.handle_forward), listening only on a browser computer (sites.route, for a computer with no display). In a desktop computer nothing points at it, and an app there already on that port would otherwise stop the whole site proxy from starting:CONNECTto a site's name tunnels into TLS with that site's certificate from the deploy's CA, then on to its route exactly as the transparent listeners send it (X-Forwarded-Host,X-Forwarded-Proto, the site root header)..localhostname over HTTP, a real name sent to HTTPS with a 308 that keeps the path and query.403and a line in the site proxy's log, loopback included. The browser alone sends loopback through its proxy (<-loopback>), so this keeps an agent's browser off the computer's own control ports. Outside hosts come back with M8.21.serve, which drops tonobodyand whichkeeprestarts as root, as the listeners do. The session user can't stop it.AGENTENV_SITE_PROXYnaming the port (sites.browser_environment, for a base with no display).127.0.0.1:3128, and a browser computer that routes no sites goes out through it as before. It can go once M8.21 gives the port a rule for outside hosts.How it was tested
ruff check: clean.Unit tests (
test_computer_site_proxy.py):CONNECTtunnels through the site's certificate to its route, two requests on one tunnel;.localhostURL is served over HTTP, and a real name's is sent to HTTPS with its query;CONNECTand by URL, are refused at once with a log line and nothing sent upstream;servethe port.Unit tests elsewhere:
test_computer_sites.pychecks that only a computer with no display gets the port in its config and is named it;test_computer_env.pychecks that a desktop computer routing sites isn't.tst/unit/env,tst/unit/providersandtst/unit/bundle, on the branch with main (feat(multi): computers as child envs of a multi env (FD-4935) #539) merged in: 5210 passed. The 2test_disk_recipefailures fail on macOS only.VM e2e, agent-environments-admin, amd64 and arm64:
browser_computer_test.pyruns whole..localhostone, from this machine. It checks that:example.comand loopback, byCONNECTand by URL, are refused with 403 and logged;pkillleaves the port serving;kill -9ofserve, in the deployed computer's own container, brings it back on a new pid;On 632ceaf:
pip installon arm64. That's the same failure M5.12's arm64 runs deselected, and nothing in it touches this change. The forward-port test passed on both arches.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no new actionable issue was established.Summary
Adds a site-only forward proxy for browser computers.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR Browser[Browser routing sites] --> Forward[Forward proxy on 3129] Forward --> Check{Configured site?} Check -->|Yes| Route[Configured upstream route] Check -->|No| Refuse[403 and log entry]Reviews (5) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile