fix: run VLESS Reality on Xray instead of sing-box for v2rayN

sing-box Hy2 stays on 8443+; port 443 VLESS uses Xray which pairs reliably with v2rayN/Xray-core clients.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-16 11:56:22 +08:00
parent 5685b869dc
commit c9895133cb
9 changed files with 305 additions and 39 deletions
+1 -25
View File
@@ -44,7 +44,6 @@ def load_nodes(db_path: Path) -> list[dict]:
def build_config(env: dict[str, str], nodes: list[dict]) -> dict:
required = [
"REALITY_PRIVATE_KEY",
"REALITY_SHORT_ID",
"REALITY_SERVER_NAME",
"DOMAIN",
@@ -53,32 +52,9 @@ def build_config(env: dict[str, str], nodes: list[dict]) -> dict:
if not env.get(key):
raise SystemExit(f".env 缺少 {key}")
vless_users = [{"uuid": n["uuid"], "flow": "xtls-rprx-vision"} for n in nodes]
hy2_base_port = 8443
inbounds: list[dict] = [
{
"type": "vless",
"tag": "vless-reality-in",
"listen": "0.0.0.0",
"listen_port": 443,
"users": vless_users,
"tls": {
"enabled": True,
"server_name": env["REALITY_SERVER_NAME"],
"reality": {
"enabled": True,
"handshake": {
"server": env["REALITY_SERVER_NAME"],
"server_port": 443,
},
"private_key": env["REALITY_PRIVATE_KEY"],
"short_id": ["", env["REALITY_SHORT_ID"]],
"max_time_difference": "1m",
},
},
},
]
inbounds: list[dict] = []
for index, node in enumerate(nodes):
inbounds.append(
{