feat(tls,reality): port xray TLS/REALITY fields, cert-hash helpers, fallback UX

TLS: add verifyPeerCertByName (vcn) to inbound settings + emit in both share-link generators (frontend + Go sub) and outbound parser; the allowInsecure replacement xray removed after 2026-06-01. Add server-side curvePreferences, masterKeyLog, echSockopt (passthrough + form) at tlsSettings top-level so they survive the panel-only settings strip.

REALITY: add limitFallbackUpload/Download (afterBytes/bytesPerSec/burstBytesPerSec) with per-field tooltips, plus masterKeyLog. Verified field names/semantics against pinned xray v1.260327.1 (bytesPerSec=0 disables).

Hosts: fix verify_peer_cert_by_name column bool->string (xray expects comma-separated names) with an idempotent, history-gate-free migration (SQLite typeof blank; Postgres ALTER once); emit vcn for hosts/external proxies.

Server: add getCertHash (local cert DER SHA-256) and getRemoteCertHash (xray tls ping) endpoints + api-docs; wire pinned-cert field buttons. Drop the meaningless random-hash button.

Xray UI: metrics endpoint (listen/tag) config in Basics; import/export for routing rules and outbounds.

Fallbacks card: compact empty state, header-aligned actions, responsive labeled grid rows.

i18n: add all new keys to every locale; drop unused generateRandomPin.
This commit is contained in:
MHSanaei
2026-06-21 15:51:50 +02:00
parent 315ecc2588
commit 7c8889466b
48 changed files with 1316 additions and 173 deletions
+98 -6
View File
@@ -1474,7 +1474,7 @@
"type": "integer"
},
"verifyPeerCertByName": {
"type": "boolean"
"type": "string"
},
"vlessRoute": {
"description": "VlessRoute is a free-form port/range routing spec (e.g. \"53,443,1000-2000\");\nstored verbatim, format-validated on the frontend.",
@@ -4408,6 +4408,98 @@
}
}
},
"/panel/api/server/getCertHash": {
"post": {
"tags": [
"Server"
],
"summary": "Compute the hex SHA-256 of a certificate (DER) for pinning (pinnedPeerCertSha256). Provide either a server file path or inline PEM/DER content.",
"operationId": "post_panel_api_server_getCertHash",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"msg": {
"type": "string"
},
"obj": {}
}
},
"example": {
"success": true,
"obj": [
"e8e2d3..."
]
}
}
}
}
}
}
},
"/panel/api/server/getRemoteCertHash": {
"post": {
"tags": [
"Server"
],
"summary": "Run `xray tls ping` against a remote server and return its live leaf-certificate SHA-256 hash(es) for pinning (pinnedPeerCertSha256).",
"operationId": "post_panel_api_server_getRemoteCertHash",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"msg": {
"type": "string"
},
"obj": {}
}
},
"example": {
"success": true,
"obj": [
"e8e2d3..."
]
}
}
}
}
}
}
},
"/panel/api/server/clientIps": {
"get": {
"tags": [
@@ -7259,7 +7351,7 @@
""
],
"updatedAt": 0,
"verifyPeerCertByName": false,
"verifyPeerCertByName": "",
"vlessRoute": ""
}
]
@@ -7351,7 +7443,7 @@
""
],
"updatedAt": 0,
"verifyPeerCertByName": false,
"verifyPeerCertByName": "",
"vlessRoute": ""
}
}
@@ -7446,7 +7538,7 @@
""
],
"updatedAt": 0,
"verifyPeerCertByName": false,
"verifyPeerCertByName": "",
"vlessRoute": ""
}
]
@@ -7586,7 +7678,7 @@
""
],
"updatedAt": 0,
"verifyPeerCertByName": false,
"verifyPeerCertByName": "",
"vlessRoute": ""
}
}
@@ -7698,7 +7790,7 @@
""
],
"updatedAt": 0,
"verifyPeerCertByName": false,
"verifyPeerCertByName": "",
"vlessRoute": ""
}
}