theseus/bundled-addons/vpn
Local Dev 3cb5081bdb vpn: sing-box on both ends, modern config schema, rebuild URL from catalogue
Three bugs, all found by driving the add-on in a real Theseus and
watching the egress IP rather than reasoning about it.

1. The generated config used pre-1.11 schema. `sniff` on an inbound and
   the `block` outbound type were deprecated in sing-box 1.11 and
   REMOVED in 1.13, so 1.14.1 refused the whole file and exited 1.
   Routing is now a bare `final`; rule `action` semantics changed in
   1.12 and the explicit inbound→outbound rule was never needed.

2. xray-core 26.3.27's REALITY would not complete a handshake with a
   sing-box client — and, after ruling out keys (three derivations, a
   fresh pair used verbatim), shortIds (explicit and empty), clock skew,
   dest reachability, TLS 1.3/X25519 on the dest, and xtls-rprx-vision,
   not with a correctly configured xray client either. sing-box against
   sing-box works first try. The exits now run sing-box, which is what
   the add-on already ships to every client, so there is no longer a
   cross-implementation surface at all. Migration script included; it
   keeps the port, the SNI and the existing uuid pool and only changes
   the Reality keypair.

   Worth recording separately: xray's REALITY inbound field is `dest`,
   not sing-box's `target`. That was wrong too, independently.

3. leaseEndpoint cached the full vless URL. The Reality key and short id
   live inside that URL, so re-keying an exit left every client failing
   against a stale copy for the whole 24h lease. It now caches only the
   uuid and rebuilds the URL from the current catalogue entry, so a
   re-key takes effect as soon as the catalogue refreshes.

Verified in Theseus over CDP: baseline 80.187.100.105, tunnel up
81.31.210.65 (the sm-1 exit), off restores the baseline, and sm-3 is
correctly refused to a free-tier caller.
2026-09-27 20:58:24 +02:00
..
addon.json vpn 0.1.3 → 0.1.4: an https:// paste imports as a subscription 2026-09-23 23:21:51 +02:00
binary-manifest.json vpn 0.1.0 → 0.1.1: pin sing-box 1.14.1 sha256s 2026-09-22 00:09:18 +02:00
DESIGN.md docs(vpn): runbook for the key-issuer, and the gap it leaves open 2026-09-27 19:06:58 +02:00
index.js vpn: sing-box on both ends, modern config schema, rebuild URL from catalogue 2026-09-27 20:58:24 +02:00
panel.html vpn 0.1.3 → 0.1.4: an https:// paste imports as a subscription 2026-09-23 23:21:51 +02:00
server-list.json vpn 0.1.3 → 0.1.4: an https:// paste imports as a subscription 2026-09-23 23:21:51 +02:00