Skip to content

dev2-edge: route unrouted Moshpit names to the c0mpute edge - #252

Merged
ralyodio merged 1 commit into
masterfrom
dev2-edge-c0mpute
Nov 9, 2026
Merged

ralyodio merged 1 commit into
masterfrom
dev2-edge-c0mpute

Conversation

@ralyodio

@ralyodio ralyodio commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

dev2's :443 belongs to the nginx stream SNI router and no fleet box has a free IPv4 :443, so the c0mpute edge (moshpit-proxy, profullstack/moshpit-proxy#32) runs on dev2 behind it.

  • Stream map: real TLDs (dev2/edge/iana-tlds.txt, IANA 2026110900) are .tld wildcard entries to nginx :8444, and a short regex ~^[a-z0-9-]+\.[a-z0-9-]+$ sends the remaining two-label (Moshpit) names to the edge on 127.0.0.1:8456. Exact names (Caddy's Moshpit sites, keep_on_nginx) still win. One 4 KiB nginx token cannot hold a negative lookahead over 1,437 TLDs, hence the include.
  • The edge (EDGE_PROXY_PROTOCOL=1, EDGE_FALLBACK=127.0.0.1:8444) terminates only names the registry says are c0mpute sites and splices everything else back to nginx, PROXY header included, so deadman.switch, watch.wallet and the other nginx-served Moshpit names answer as before.
  • Port 80: conf.d/c0mpute-edge-http.conf, a regex server for the same names: ACME passthrough, https upgrade for real TLDs, proxy to the edge's http port, and the edge's 421 (not a c0mpute site) parks the name exactly like the userdirs catch-all. Reuses $moshpit_parked from root-ubuntu.sh.
  • edge-box installs the new files on apply (the TLD map on route too) and removes the :80 file again if a re-apply fails.
  • alt.2600 leaves Caddy: it now points at a c0mpute site.

nginx -t of the rendered stream and http blocks passes on dev2. vitest dev2-edge 15/15.

🤖 Generated with Claude Code

Every label.ending SNI with no route of its own and an ending that is not an
IANA TLD goes to moshpit-proxy's c0mpute edge on 127.0.0.1:8456, which serves
c0mpute sites and splices every other connection back to nginx :8444. Real
TLDs are wildcard entries from dev2/edge/iana-tlds.txt, so no ICANN apex takes
the hop. Port 80 gains a regex server proxying the same names to the edge's
http port, parking the ones it answers 421 for, exactly as the catch-all did.
alt.2600 leaves Caddy: it is now a c0mpute site.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

ThreatCrush Security Scan

41 finding(s)

HIGH/CRITICAL: 15 | MEDIUM: 12 | LOW: 14

Severity Rule Location
HIGH py-ssrf-outbound-request dev2/dev2-site:151
HIGH py-ssrf-outbound-request dev2/dev2-site:1099
HIGH py-ssrf-outbound-request dev2/dev2-site:1903
HIGH sh-remote-script-execution root-ubuntu.sh:3262
HIGH sh-remote-script-execution root-ubuntu.sh:3263
HIGH sh-remote-script-execution root-ubuntu.sh:5168
HIGH sh-remote-script-execution root-ubuntu.sh:5172
HIGH sh-remote-script-execution root-w3bs-os.sh:3639
HIGH sh-remote-script-execution root-w3bs-os.sh:3640
HIGH sh-remote-script-execution root-w3bs-os.sh:5569
HIGH sh-remote-script-execution root-w3bs-os.sh:5579
HIGH sh-remote-script-execution root-w3bs-os.sh:5586
HIGH sh-remote-script-execution root-w3bs-os.sh:5602
HIGH sh-remote-script-execution root-w3bs-os.sh:5607
HIGH sh-plaintext-download root-w3bs-os.sh:6289
MEDIUM sql-template-interpolation dev2/dev2-site:1334
MEDIUM sql-template-interpolation dev2/dev2-site:1411
MEDIUM sh-remote-script-execution root-ubuntu.sh:5376
MEDIUM redos-nested-quantifier src/domain-free.ts:56
MEDIUM redos-nested-quantifier src/emoji.ts:167
MEDIUM redos-nested-quantifier src/icon.ts:166
MEDIUM redos-nested-quantifier src/mail.ts:1060
MEDIUM sql-template-interpolation src/users-dump.ts:487
MEDIUM sql-string-concatenation src/users-dump.ts:507
MEDIUM sql-template-interpolation src/users-dump.ts:540
MEDIUM sql-string-concatenation src/users-dump.ts:574
MEDIUM redos-nested-quantifier src/wcag.ts:556
LOW secret-generic-credential src/credentials.ts:41
LOW secret-generic-credential src/credentials.ts:58
LOW secret-generic-credential src/credentials.ts:61
LOW secret-generic-credential src/credentials.ts:66
LOW secret-generic-credential src/user-export.ts:689
LOW secret-generic-credential src/user-export.ts:695
LOW secret-generic-api-key test/credentials.test.ts:208
LOW secret-generic-credential test/mail.test.ts:141
LOW secret-generic-credential test/proxy.test.ts:69
LOW secret-generic-credential test/proxy.test.ts:85
LOW secret-generic-credential test/shorten.test.ts:36
LOW secret-database-url test/users-dump.test.ts:108
LOW secret-database-url test/users-dump.test.ts:119
LOW secret-database-url test/users-dump.test.ts:120

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit 406e3bc into master Nov 9, 2026
5 checks passed
@ralyodio
ralyodio deleted the dev2-edge-c0mpute branch November 9, 2026 10:07
ralyodio added a commit that referenced this pull request Nov 9, 2026
…probe (#253)

restore_live ran extractall inside the new 'remove the :80 file' branch, after
the tar was closed, so a failed re-apply restored nothing (#252). And
probe_one called edge-sweep with /dev/null, which the usage check rejected
before EDGE_SWEEP_ONE was looked at, so every re-probe read 000/000/000.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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