From 90633367788163b295fdf548de3533a160bf3128 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Fri, 9 Jun 2023 16:48:50 +0330 Subject: [PATCH] new - Reject Unknown SNI - thanks to @sudospaes --- web/assets/js/model/xray.js | 4 ++++ web/html/xui/form/tls_settings.html | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js index b627570fc..255577dfc 100644 --- a/web/assets/js/model/xray.js +++ b/web/assets/js/model/xray.js @@ -468,6 +468,7 @@ class TlsStreamSettings extends XrayCommonClass { minVersion = TLS_VERSION_OPTION.TLS12, maxVersion = TLS_VERSION_OPTION.TLS13, cipherSuites = '', + rejectUnknownSni = false, certificates=[new TlsStreamSettings.Cert()], alpn=[ALPN_OPTION.H2,ALPN_OPTION.HTTP1], settings=new TlsStreamSettings.Settings()) { @@ -476,6 +477,7 @@ class TlsStreamSettings extends XrayCommonClass { this.minVersion = minVersion; this.maxVersion = maxVersion; this.cipherSuites = cipherSuites; + this.rejectUnknownSni = rejectUnknownSni; this.certs = certificates; this.alpn = alpn; this.settings = settings; @@ -503,6 +505,7 @@ class TlsStreamSettings extends XrayCommonClass { json.minVersion, json.maxVersion, json.cipherSuites, + json.rejectUnknownSni, certs, json.alpn, settings, @@ -515,6 +518,7 @@ class TlsStreamSettings extends XrayCommonClass { minVersion: this.minVersion, maxVersion: this.maxVersion, cipherSuites: this.cipherSuites, + rejectUnknownSni: this.rejectUnknownSni, certificates: TlsStreamSettings.toJsonArray(this.certs), alpn: this.alpn, settings: this.settings, diff --git a/web/html/xui/form/tls_settings.html b/web/html/xui/form/tls_settings.html index 58edf992a..227c5466b 100644 --- a/web/html/xui/form/tls_settings.html +++ b/web/html/xui/form/tls_settings.html @@ -35,7 +35,6 @@ - @@ -85,9 +84,14 @@ [[ value ]] +
+
+ + +