fork: security=tls (self-signed + pinnedPeerCertSha256) becomes the default hop transport

reverse-over-REALITY is broken on xray >= 26.7 (Rvs control channel never
registers; XTLS/Xray-core #6242/#6248 family). Verified loopback e2e with
hub-generated configs on 26.11.9<->26.11.9 and 26.11.9<->26.7.28: portal
entry-* -> reverse mux -> router-admin redirect = HTTP 200 over pinned TLS.

- hub: OWRT_REMOTE_TRANSPORT=tls|reality|none (default tls); generates
  self-signed cert (openssl) + exposes pin; serves tls streamSettings.
- agent: uci tls_sni/tls_pin, validation, tls branch in render_client_config.
- CGI: reality_short_id/tls_sni/tls_pin fields; uci config lines extended.
- docs: REALITY_TRANSPORT.md extended with the bisect results and pitfalls
  (freedom finalRules for reverse egress, bridge registers ~2s late,
  legacy reverse objects removed).
This commit is contained in:
cyril committed 2026-11-22 12:28:43 +03:00
1 parent d482ed97c4
commit 05972f8c24
6 files changed
+151 -11

No files matched your search

+38
View File
@@ -45,3 +45,41 @@ env хаба: `OWRT_REMOTE_REALITY_DEST=download.windowsupdate.com`, реста
роутера продолжит писать `security=none`, роутер-агент умеет оба).
Старые агенты (без полей security) не работают с reality-hub — роутер нужно обновить
(установить ipk/файлы этого форка).
## 22.11.2026: reverse + REALITY is broken on modern cores — `security=tls` is now the default
Bisect matrix (xray 26.7.28 / 26.11.9, all four pairs, loopback e2e):
* the REALITY hop itself authenticates and tunnels user traffic fine
(shortId MUST be present in the client `realitySettings`; camo dest
`www.microsoft.com` is dead because Microsoft now serves post-quantum
cert chains — use `www.cloudflare.com`);
* BUT the tag-form VLESS reverse (Rvs control channel, PR #5101) never
registers when the bridge transport is REALITY: portal logs the reality
handshake (`hs.c.conn == conn: true`) and then silence — no
`v1.rvs.cool` request is ever dispatched. Upstream reports of the same
family: XTLS/Xray-core #6242 / #6248 ("reverse broken since 26.5,
works on 26.4.25"). Our repro: relay hex-dump shows the bridge's Rvs
request on the wire, portal never responds.
Working alternative shipped as `OWRT_REMOTE_TRANSPORT=tls` (default):
self-signed hub cert (hub generates it with openssl) + `pinnedPeerCertSha256`
on the router (xray removed `allowInsecure`), ALPN `h2,http/1.1`, uTLS
`fingerprint: chrome`. Verified end-to-end through hub-generated configs:
portal `entry-*` -> reverse mux -> router `router-admin` freedom redirect
= HTTP 200 on 26.11.9<->26.11.9 and 26.11.9<->26.7.28.
Pitfalls discovered along the way:
* freedom outbounds behind the reverse bridge need explicit
`finalRules: [{action: allow, network: tcp, port: ...}]` — newer cores
blackhole reverse egress by default (see also 3x-ui 6f6c7fc);
* the Rvs bridge registers ~2 s after the router xray starts (monitor
interval), healthcheck scripts must wait, or they see
`non existing outTag`;
* legacy `reverse.bridges/portals` config objects were REMOVED in 26.x —
only the tag form works.
REALITY stays selectable (`OWRT_REMOTE_TRANSPORT=reality`) for the hub
panel hop style until upstream fixes reverse-over-REALITY.