From 57d437dff82f8756bb53186c26114c0c898f06be Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Mon, 2 Feb 2026 16:22:21 +0100 Subject: [PATCH] corrections --- web/assets/js/model/inbound.js | 4 ---- web/assets/js/model/outbound.js | 12 ++++++++---- web/html/xui/form/outbound.html | 9 +++++++-- web/html/xui/form/tls_settings.html | 6 ------ web/locale/locale.go | 6 +++--- 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/web/assets/js/model/inbound.js b/web/assets/js/model/inbound.js index 5c5d3811..9d951f93 100644 --- a/web/assets/js/model/inbound.js +++ b/web/assets/js/model/inbound.js @@ -596,7 +596,6 @@ class TlsStreamSettings extends XrayCommonClass { maxVersion = TLS_VERSION_OPTION.TLS13, cipherSuites = '', rejectUnknownSni = false, - pinnedPeerCertSha256 = [], disableSystemRoot = false, enableSessionResumption = false, certificates = [new TlsStreamSettings.Cert()], @@ -611,7 +610,6 @@ class TlsStreamSettings extends XrayCommonClass { this.maxVersion = maxVersion; this.cipherSuites = cipherSuites; this.rejectUnknownSni = rejectUnknownSni; - this.pinnedPeerCertSha256 = pinnedPeerCertSha256; this.disableSystemRoot = disableSystemRoot; this.enableSessionResumption = enableSessionResumption; this.certs = certificates; @@ -645,7 +643,6 @@ class TlsStreamSettings extends XrayCommonClass { json.maxVersion, json.cipherSuites, json.rejectUnknownSni, - json.pinnedPeerCertSha256 || [], json.disableSystemRoot, json.enableSessionResumption, certs, @@ -663,7 +660,6 @@ class TlsStreamSettings extends XrayCommonClass { maxVersion: this.maxVersion, cipherSuites: this.cipherSuites, rejectUnknownSni: this.rejectUnknownSni, - pinnedPeerCertSha256: this.pinnedPeerCertSha256.length > 0 ? this.pinnedPeerCertSha256 : undefined, disableSystemRoot: this.disableSystemRoot, enableSessionResumption: this.enableSessionResumption, certificates: TlsStreamSettings.toJsonArray(this.certs), diff --git a/web/assets/js/model/outbound.js b/web/assets/js/model/outbound.js index 99456913..37d0fda3 100644 --- a/web/assets/js/model/outbound.js +++ b/web/assets/js/model/outbound.js @@ -345,7 +345,8 @@ class TlsStreamSettings extends CommonClass { fingerprint = '', allowInsecure = false, echConfigList = '', - verifyPeerCertByName = [] + verifyPeerCertByName = 'cloudflare-dns.com', + pinnedPeerCertSha256 = '', ) { super(); this.serverName = serverName; @@ -353,7 +354,8 @@ class TlsStreamSettings extends CommonClass { this.fingerprint = fingerprint; this.allowInsecure = allowInsecure; this.echConfigList = echConfigList; - this.verifyPeerCertByName = Array.isArray(verifyPeerCertByName) ? verifyPeerCertByName.join(",") : verifyPeerCertByName; + this.verifyPeerCertByName = verifyPeerCertByName; + this.pinnedPeerCertSha256 = pinnedPeerCertSha256; } static fromJson(json = {}) { @@ -363,7 +365,8 @@ class TlsStreamSettings extends CommonClass { json.fingerprint, json.allowInsecure, json.echConfigList, - json.verifyPeerCertByName + json.verifyPeerCertByName, + json.pinnedPeerCertSha256, ); } @@ -374,7 +377,8 @@ class TlsStreamSettings extends CommonClass { fingerprint: this.fingerprint, allowInsecure: this.allowInsecure, echConfigList: this.echConfigList, - verifyPeerCertByName: this.verifyPeerCertByName.length > 0 ? this.verifyPeerCertByName.split(",") : undefined, + verifyPeerCertByName: this.verifyPeerCertByName, + pinnedPeerCertSha256: this.pinnedPeerCertSha256 }; } } diff --git a/web/html/xui/form/outbound.html b/web/html/xui/form/outbound.html index 32b65215..41847dee 100644 --- a/web/html/xui/form/outbound.html +++ b/web/html/xui/form/outbound.html @@ -586,8 +586,13 @@ - - + + + + + + diff --git a/web/html/xui/form/tls_settings.html b/web/html/xui/form/tls_settings.html index 58696ee5..2aa2d642 100644 --- a/web/html/xui/form/tls_settings.html +++ b/web/html/xui/form/tls_settings.html @@ -58,12 +58,6 @@ - - - -