Closed general

Web Hydrogen: forwarded ports as subdomains so framed local web apps render (Antigravity side bar); desktop fixed in 1.0.223

John Lauer · 1mo ago ·closed by John Lauer

For Colby (Web Hydrogen, the cloud container)

Hydrogen Desktop 1.0.223 fixed Google Antigravity's side-bar panel by switching code-server to subdomain port proxying (--proxy-domain localhost:7380, so asExternalUri returns http://<port>.localhost:7380/) plus a Host rewrite in code-server's domainProxy (Host: localhost:<port> upstream). Root cause: the Antigravity hub's page uses absolute asset paths, which 404 under the path proxy /proxy/<port>/, and its server refuses non-localhost Host headers.

Web Hydrogen path-proxies ports (https://<slug>.adom.cloud/proxy/<port>/, per the golden-image parity rule), so the same panel is blank there. The fix needs wildcard subdomains for forwarded ports (https://<port>-<slug>.adom.cloud/ or similar, with TLS) and --proxy-domain pointed at that, plus the same Host rewrite, which is infrastructure on your side. Until then the adom/antigravity dashboard detects VSCODE_PROXY_URI and, under a path proxy, opens Antigravity's UI as a tab instead of the panel, so users are not stuck.

Upstream note for Google: a <base href> on the hub page (or relative asset paths) would make the panel work behind any path proxy, no infrastructure needed.

2 Replies

John Lauer · 1mo ago

Correction to the design above (2026-09-06, later the same day). Hydrogen Desktop does NOT ship the code-server --proxy-domain switch or the domainProxy.js Host patch described here; 1.0.223 was never released. John's constraints: no patches to code-server (an upgrade erases them) and no golden-image change.

What actually shipped in Hydrogen Desktop 1.0.224 (insiders):

  • Hydrogen's own reverse proxy (the hyper server behind ADOM_HYDROGEN_URL) gained a Host-based route: Host: <port>.localhost[:n] proxies to the container port with the path untouched, a loopback Host upstream, and websocket passthrough. Chromium resolves *.localhost to loopback natively.
  • ah writes VSCODE_PROXY_URI=http://{{port}}.localhost:<proxy port>/ into the config it already rewrites every launch (~/.bashrc, /etc/profile.d/hd-env.sh, and the code-server systemd drop-in hd-env.conf). code-server only defaults VSCODE_PROXY_URI when the env is absent, so a preset value is honored: the workbench's proxyEndpointTemplate and every extension host take it.
  • The path proxy /proxy/<port>/ still works everywhere (golden-image invariant 1 untouched).
  • Verified live: the Antigravity side bar renders in ah 1.0.224 on stock code-server 4.123.0 and the unmodified image.

The ask for Web Hydrogen is unchanged in substance: hand out a subdomain-shaped VSCODE_PROXY_URI for forwarded ports (for example https://<port>-<slug>.adom.cloud/ or https://<slug>.adom.cloud with a port prefix, whatever the ingress can route) with a loopback Host sent upstream. The mechanism does not need to touch code-server: set the env on the code-server process and route the subdomain at the edge. Until then the Antigravity dashboard falls back to opening the hub as a tab on Web Hydrogen, and adom-antigravity status reports proxy.mode: path.

John Lauer · 1mo ago

Closing on the desktop side: Hydrogen Desktop 1.0.224 serves forwarded ports as subdomains through its own proxy, no code-server patch and no image change. The Web Hydrogen half is Colby's and has been handed over as its own request on adom-inc/hydrogen.

Log in to reply.