Skip to content

Commit

Permalink
new - Reject Unknown SNI - thanks to @sudospaes
Browse files Browse the repository at this point in the history
  • Loading branch information
MHSanaei committed Jun 9, 2023
1 parent 7fc3d37 commit 9063336
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions web/assets/js/model/xray.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -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;
Expand Down Expand Up @@ -503,6 +505,7 @@ class TlsStreamSettings extends XrayCommonClass {
json.minVersion,
json.maxVersion,
json.cipherSuites,
json.rejectUnknownSni,
certs,
json.alpn,
settings,
Expand All @@ -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,
Expand Down
6 changes: 5 additions & 1 deletion web/html/xui/form/tls_settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
<a-form v-if="inbound.tls" layout="inline">
<a-form-item label='Multi Domain'>
<a-switch v-model="multiDomain"></a-switch>

</a-form-item>
<a-form-item v-if="multiDomain">
<a-row>
Expand Down Expand Up @@ -85,9 +84,14 @@
<a-checkbox v-for="key,value in ALPN_OPTION" :value="key">[[ value ]]</a-checkbox>
</a-checkbox-group>
</a-form-item>
<br>
<a-form-item label="Allow insecure">
<a-switch v-model="inbound.stream.tls.settings.allowInsecure"></a-switch>
</a-form-item>
<br>
<a-form-item label="Reject Unknown SNI">
<a-switch v-model="inbound.stream.tls.rejectUnknownSni"></a-switch>
</a-form-item>
<template v-for="cert,index in inbound.stream.tls.certs">
<a-form-item label='{{ i18n "certificate" }}'>
<a-radio-group v-model="cert.useFile" button-style="solid">
Expand Down

0 comments on commit 9063336

Please sign in to comment.