fix(3x-ui): restore reality443Forwarding — T10 removal broke Xray REALITY

Owner: 'reality443Forwarding точно ли стоило удалять? xray по прежнему
не работает, несмотря на то, что ssh и pubray1.zeroq.su работают.'

T10/C5 decision (б) was WRONG. modules/vds/nginx.nix was never touched
and still routes:
  pubray1.zeroq.su  → 127.0.0.1:2049  (panel)
  pubrayx1.zeroq.su → 127.0.0.1:15380 (Xray REALITY)
  default           → 127.0.0.1:15380 (fallback)

Removing the container mapping 127.0.0.1:15380:443/tcp made the nginx
stream forward TLS to a dead port → Xray REALITY unreachable. SSH and
pubray1.zeroq.su kept working because they do NOT depend on 15380.

Restored (exact pre-T10 code from 61b3724):
- modules/options.nix: reality443Forwarding option
- modules/vds/default.nix: reality443Forwarding = true
- modules/containers/3x-ui.nix: realityPorts binding + ports = basePorts ++ realityPorts
- manifest.json T10 → status 'pending' (reopened with corrected notes)

Verified: nix eval .#nixosConfigurations.otreca...3xui_app.ports =
  [..., '127.0.0.1:15380:443/tcp']
This commit is contained in:
2026-10-10 17:54:18 +03:00
parent 37b4956a25
commit 07a0437c13
4 changed files with 30 additions and 9 deletions
+19 -4
View File
@@ -58,9 +58,24 @@
container at /root/cert/fullchain.pem and key.pem.
'';
};
# reality443Forwarding was removed (T10/C5, 2026-10-10). The
# option's purpose was lost after the c8d4a12 revert (manifest:177-178);
# nginx stream on otreca still works without it. See ADR-0002
# in .agent/decisions/ for the decision record.
# Publish host:15380 → container:443. Only nodes that host an
# Xray REALITY inbound on container:443 need this (so nginx
# stream can forward TLS to Xray via 127.0.0.1:15380 while Xray
# itself sees incoming connections on its configured port 443).
# Set false on nodes that only run the 3x-ui panel.
#
# RESTORED 2026-10-10: this option was wrongly removed by T10/C5.
# modules/vds/nginx.nix still routes pubrayx1.zeroq.su/default →
# 127.0.0.1:15380, so without this mapping the nginx stream points
# at a dead port and Xray REALITY is unreachable.
reality443Forwarding = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
When true, publish host:15380 → container:443 so Xray
inside the container can serve REALITY on its real
configured port 443 (nginx stream forwards 443 → 15380).
'';
};
};
}