Repository navigation
c0mpute edge: share :443 behind an SNI router (PROXY protocol + fallback) - #32
Merged
Merged
Conversation
…ack) EDGE_PROXY_PROTOCOL reads a PROXY v1/v2 header off each https connection and EDGE_FALLBACK splices every TLS connection that is not a c0mpute name to the origin that owned it, header included. Lets the edge run on a box whose :443 already belongs to an nginx stream SNI router. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
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.
No fleet box has a free IPv4 :443, so the edge has to run behind dev2's nginx stream SNI router. The router cannot know which Moshpit names are c0mpute sites (holders change that at any time), so it sends the edge every Moshpit-shaped name it has no route for, and the edge sorts them.
lib/sni-front.ts: a plain TCP front that reads an optional PROXY v1/v2 header and the ClientHello SNI without terminating TLS. c0mpute names (per the registry) go to the edge's TLS server with the header stripped; everything else is spliced byte for byte, header included, toEDGE_FALLBACK.EDGE_PROXY_PROTOCOL,EDGE_FALLBACK,EDGE_HOSTdocumented in the README c0mpute edge section.Without either variable the edge behaves exactly as before.
🤖 Generated with Claude Code