Skip to content

Commit ceb1217

Browse files
committed
serverNameToVerify to verifyPeerCertInNames #2662
1 parent e754523 commit ceb1217

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

web/assets/js/model/inbound.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ class TlsStreamSettings extends XrayCommonClass {
554554
maxVersion = TLS_VERSION_OPTION.TLS13,
555555
cipherSuites = '',
556556
rejectUnknownSni = false,
557-
serverNameToVerify = 'dns.google',
557+
verifyPeerCertInNames = ['dns.google', 'cloudflare-dns.com'],
558558
disableSystemRoot = false,
559559
enableSessionResumption = false,
560560
certificates = [new TlsStreamSettings.Cert()],
@@ -567,7 +567,7 @@ class TlsStreamSettings extends XrayCommonClass {
567567
this.maxVersion = maxVersion;
568568
this.cipherSuites = cipherSuites;
569569
this.rejectUnknownSni = rejectUnknownSni;
570-
this.serverNameToVerify = serverNameToVerify;
570+
this.verifyPeerCertInNames = Array.isArray(verifyPeerCertInNames) ? verifyPeerCertInNames.join(",") : verifyPeerCertInNames;
571571
this.disableSystemRoot = disableSystemRoot;
572572
this.enableSessionResumption = enableSessionResumption;
573573
this.certs = certificates;
@@ -599,7 +599,7 @@ class TlsStreamSettings extends XrayCommonClass {
599599
json.maxVersion,
600600
json.cipherSuites,
601601
json.rejectUnknownSni,
602-
json.serverNameToVerify,
602+
json.verifyPeerCertInNames,
603603
json.disableSystemRoot,
604604
json.enableSessionResumption,
605605
certs,
@@ -615,7 +615,7 @@ class TlsStreamSettings extends XrayCommonClass {
615615
maxVersion: this.maxVersion,
616616
cipherSuites: this.cipherSuites,
617617
rejectUnknownSni: this.rejectUnknownSni,
618-
serverNameToVerify: this.serverNameToVerify,
618+
verifyPeerCertInNames: this.verifyPeerCertInNames.split(","),
619619
disableSystemRoot: this.disableSystemRoot,
620620
enableSessionResumption: this.enableSessionResumption,
621621
certificates: TlsStreamSettings.toJsonArray(this.certs),

web/html/xui/form/tls_settings.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
<a-form-item label="Session Resumption">
5858
<a-switch v-model="inbound.stream.tls.enableSessionResumption"></a-switch>
5959
</a-form-item>
60-
<a-form-item label="Server Name To Verify">
61-
<a-input v-model.trim="inbound.stream.tls.serverNameToVerify"></a-input>
60+
<a-form-item label="VerifyPeerCertInNames">
61+
<a-input v-model.trim="inbound.stream.tls.verifyPeerCertInNames"></a-input>
6262
</a-form-item>
6363
<template v-for="cert,index in inbound.stream.tls.certs">
6464
<a-form-item label='{{ i18n "certificate" }}'>

0 commit comments

Comments
 (0)