Repository navigation
feat: add optional TCP/UDP relay companion - #20
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Summary
Clients that address an HTTP compatibility API and a second protocol at the same IP currently reach only HTTP. Add an opt-in IPv4 TCP/UDP relay companion through
ruby bin/acl-with-relay, with a fixed configured upstream and bounded exchanges. The HTTP engine, HTTP mapping schema, default command, and runtime gem dependencies remain unchanged.The supervisor stops both children on termination or when either service exits. For privileged listen ports, a separate Ruby interpreter copy grants only
NET_BIND_SERVICEto the relay; HTTP runs with inherited capabilities cleared andno-new-privilegesenabled. High ports work with all capabilities dropped.Related issues
None.
Validation
bundle exec rspec --format progress: 205 examples, 0 failures. The 21 focused companion examples also passed after the final test-harness cleanup adjustment.bundle exec rubocop --force-exclusion --cache false: 27 files, no offenses.bundle exec bundler-audit check --update: no vulnerable Ruby dependencies reported by the updated database.script/validate-image api-compatibility-layer:dns-relay-reviewpassed. This includes the existing HTTP smoke test and shared-address HTTP/DNS write/read tests on TCP/UDP ports 1053 and 53, concurrent clients, TCP framing, SIGTERM/SIGINT cleanup, unchanged non-root UIDs, and per-child capability checks.script/trivy-gatepassed: 163 reported findings in total, with zero fixable HIGH/CRITICAL findings. Reports were retained locally; this is not a claim that the image has no findings.bash -n script/validate-image,git diff --check, and a synthetic-data check passed.Compatibility and documentation
Activation is explicit. Existing HTTP-only deployments continue using
ruby bin/acl. README documents the companion variables, IPv4-only forwarding, five-second exchange/connection lifetime, 32-client limit, low-port capability requirements, and an isolated synthetic deployment example.The relay forwards bytes without interpreting DNS or adding records, caching, or recursive resolution. Its DNS test upstream supplies complete CNAME/address replies; correct upstream records and CNAME resolution remain deployment requirements. No claim is made that an existing mock server's DNS semantics are repaired by forwarding alone. Known consumer limitation: Mockly v0.13.1 matches the requested DNS record type directly and does not resolve an A/AAAA query through a CNAME-only record. That upstream behavior needs a separate solution before the original consumer flow can pass end to end. No running consumer environment was reconfigured, and no release or image publication was performed.
Checklist