Repository navigation
fix(sandbox): keep a session's transparent egress up on its own - #4552
Merged
Merged
Conversation
yannickmonney
force-pushed
the
fix/sandbox-session-egress-recovery
branch
from
October 9, 2026 02:40
2e930b2 to
77a0c73
Compare
yannickmonney
enabled auto-merge
October 9, 2026 02:40
yannickmonney
force-pushed
the
fix/sandbox-session-egress-recovery
branch
from
October 9, 2026 02:40
77a0c73 to
1465e76
Compare
A session resolved the egress proxy's name once at boot. When the egress container was restarting or not yet registered with Docker's resolver, that one miss left the session without transparent egress for its whole life: proxy-ignorant clients (Node's fetch, raw sockets, nested containers) failed until the container was recreated. The boot now asks again for up to about five seconds (1, 2 and 2 s apart) before giving up; the first answer is still used at once. The OUTPUT redirect sends every public connection to redsocks, which was started once in the background: a redsocks that died left the session with no transparent egress and nothing noticed. It now runs under a restart loop, as the redsocks uid itself so no root process stays behind, with a delay doubling from 1 s to 30 s and back to 1 s after a minute's good run.
The automation coverage map now keeps one file per suite, so parallel changes stop appending to the same lines; this change's rows move there, after their own anchor row.
yannickmonney
force-pushed
the
fix/sandbox-session-egress-recovery
branch
from
October 9, 2026 02:57
1465e76 to
8c31645
Compare
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.
On the default session path (runc + transparent egress), two single points of failure left a session silently without egress for its whole life: one failed name lookup of the egress proxy at boot, and a redsocks process that exited.
Changes
fix(sandbox): keep a session's transparent egress up on its own
A session resolved the egress proxy's name once at boot. When the egress
container was restarting or not yet registered with Docker's resolver,
that one miss left the session without transparent egress for its whole
life: proxy-ignorant clients (Node's fetch, raw sockets, nested
containers) failed until the container was recreated. The boot now asks
again for up to about five seconds (1, 2 and 2 s apart) before giving up;
the first answer is still used at once.
The OUTPUT redirect sends every public connection to redsocks, which was
started once in the background: a redsocks that died left the session
with no transparent egress and nothing noticed. It now runs under a
restart loop, as the redsocks uid itself so no root process stays behind,
with a delay doubling from 1 s to 30 s and back to 1 s after a minute's
good run.
Verification
session-egress-recovery.test.ts(4 tests: first answer used at once, retries until the name resolves, bounded give-up, redsocks restarted after it exits) fails 3/4 against the previous entrypoint;inner-docker-network.test.ts,build-cache-startup.test.ts,entrypoint-dispatch.test.tspass (the fake redsocks there now ends its restart loop so the tests'waitreturns).@tale/sandbox-runtime-daemontypecheck and lint clean; lint:manual ok.Part of the sandbox footprint and robustness pass (#4533, #4538 and siblings).