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 @@
-
-
-
-
diff --git a/web/locale/locale.go b/web/locale/locale.go
index 3b24f7f5..483ac63b 100644
--- a/web/locale/locale.go
+++ b/web/locale/locale.go
@@ -48,10 +48,10 @@ func InitLocalizer(i18nFS embed.FS, settingService SettingService) error {
return nil
}
-func createTemplateData(params []string, seperator ...string) map[string]interface{} {
+func createTemplateData(params []string, separator ...string) map[string]interface{} {
var sep string = "=="
- if len(seperator) > 0 {
- sep = seperator[0]
+ if len(separator) > 0 {
+ sep = separator[0]
}
templateData := make(map[string]interface{})