Skip to content

[NO-JIRA] gamebox: tinyproxy fallback egress for devbox's TeamClaude - #1078

Merged
johnnymo87 merged 2 commits into
mainfrom
gamebox-tc-fallback-proxy
Dec 2, 2026
Merged

johnnymo87 merged 2 commits into
mainfrom
gamebox-tc-fallback-proxy

Conversation

@johnnymo87

Copy link
Copy Markdown
Owner

Description

  • Adds hosts/gamebox/tc-fallback-proxy.nix: a tinyproxy on gamebox that devbox's TeamClaude can use as its upstreamProxy while devbox's own route to Cloudflare-fronted api.anthropic.com is broken. On 2026-12-02, devbox's traffic landed on Cloudflare's Moscow site and went dark in 20–70 s clusters for about two hours.
  • Locked down: it serves only devbox's tailnet IP, only CONNECT, only api.anthropic.com:443 and platform.claude.com:443 (URL-mode anchored filter, default deny). It is reachable only over tailscale0, because the port is not opened on any other interface. TLS runs end to end, so gamebox never sees tokens or prompts.
  • Verified: the generated config was built and run on gamebox. An identical transient instance carried live TeamClaude traffic: all 5 accounts probed ok, 33 live requests went through, and there were 0 errors. Off-allowlist hosts, plain HTTP and other ports are refused.
  • Deploy note: this takes effect only at the next gamebox system switch. main's lock moves gamebox's nixpkgs (0dc498b → 9aa1957), so that switch is a broad one, and it must avoid a CI job in progress. Before switching, stop the transient stopgap that holds port 8888: systemctl --user stop tc-fallback-proxy on gamebox. If you forget, the system unit retries every 5 s until the port is free.

References

… api.anthropic.com, platform.claude.com)

devbox's route to Cloudflare-fronted api.anthropic.com went dark in 20-70 s
clusters for two hours on 2026-12-02 (Cloudflare DME site). gamebox egresses
from the US and reaches a different Cloudflare site, so it is an independent
path. CONNECT-only on 443, devbox's tailnet address only, anchored domain
allowlist; reachable only over tailscale0 (port not opened on other
interfaces). Bead workstation-dkts.3.
…, MaxClients 256

Listen 0.0.0.0 (explicit) so a failed v4 bind is fatal and restarts, instead of
tinyproxy coming up on [::] only. FilterURLs with host:443 patterns so plain
HTTP proxying is refused too (ConnectPort does not cover it). Bead
workstation-dkts.3.
@johnnymo87
johnnymo87 enabled auto-merge (squash) December 2, 2026 23:03
@johnnymo87
johnnymo87 merged commit 1ba32f0 into main Dec 2, 2026
2 checks passed
@johnnymo87
johnnymo87 deleted the gamebox-tc-fallback-proxy branch December 2, 2026 23:26
johnnymo87 added a commit that referenced this pull request Dec 2, 2026
…timeout, keep-old on switch (#1081)

#### Description

- Bumps the TeamClaude fork to johnnymo87/teamclaude#11, which adds an
optional **automatic egress fallback**. While devbox's direct connect to
api.anthropic.com fails, requests go through gamebox's tinyproxy
(#1078), with one same-account retry. It returns to direct after 15
minutes and 6 clean probes. It is inert until `fallbackProxy` is set in
`~/.config/teamclaude.json`.
- devbox unit:
`NODE_OPTIONS=--network-family-autoselection-attempt-timeout=3000`.
Node's default of 250 ms per address family declared a slow-but-working
route (~540 ms RTT) dead.
- devbox unit: **`X-SwitchMethod = keep-old`**. Without it, the
unattended pull-workstation home-manager switch would restart
TeamClaude, cutting every live agent turn, at whatever hour it ran.
switch-impact on this tree reports `Keeping old units:
teamclaude.service`. The new build and the env var take effect only at
an explicit restart, which will be scheduled at a quiet time and
announced.
- Mac: `home.darwin.nix` uses the same package, so the Mac's next
`home-switch` picks up the new TeamClaude. Its config has no
`fallbackProxy`, so nothing changes in behaviour there.

#### References

- Beads workstation-dkts.4 and .5; #1077 (monitor), #1078 (gamebox
proxy)
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.

1 participant