Add allowInsecure option

This commit is contained in:
Alireza Ahmadi
2023-03-23 10:02:18 +01:00
parent 738c7064a9
commit e1f8e8efd2
2 changed files with 5 additions and 8 deletions

View File

@@ -575,9 +575,9 @@ TlsStreamSettings.Cert = class extends XrayCommonClass {
}; };
TlsStreamSettings.Settings = class extends XrayCommonClass { TlsStreamSettings.Settings = class extends XrayCommonClass {
constructor(insecure = false, fingerprint = '', serverName = '') { constructor(allowInsecure = false, fingerprint = '', serverName = '') {
super(); super();
this.inSecure = insecure; this.allowInsecure = allowInsecure;
this.fingerprint = fingerprint; this.fingerprint = fingerprint;
this.serverName = serverName; this.serverName = serverName;
} }
@@ -590,7 +590,7 @@ TlsStreamSettings.Settings = class extends XrayCommonClass {
} }
toJson() { toJson() {
return { return {
allowInsecure: this.inSecure, allowInsecure: this.allowInsecure,
fingerprint: this.fingerprint, fingerprint: this.fingerprint,
serverName: this.serverName, serverName: this.serverName,
}; };

View File

@@ -40,11 +40,8 @@
<a-form-item label='{{ i18n "domainName" }}'> <a-form-item label='{{ i18n "domainName" }}'>
<a-input v-model.trim="inbound.stream.tls.server"></a-input> <a-input v-model.trim="inbound.stream.tls.server"></a-input>
</a-form-item> </a-form-item>
<a-form-item label="Alpn" v-if="inbound.tls"> <a-form-item label="Allow insecure">
<a-select v-model="inbound.stream.tls.alpn[0]" style="width:200px"> <a-switch v-model="inbound.stream.tls.settings[0].allowInsecure"></a-switch>
<a-select-option value=''>auto</a-select-option>
<a-select-option v-for="key in ALPN_OPTION" :value="key">[[ key ]]</a-select-option>
</a-select>
</a-form-item> </a-form-item>
<a-form-item label='{{ i18n "certificate" }}'> <a-form-item label='{{ i18n "certificate" }}'>
<a-radio-group v-model="inbound.stream.tls.certs[0].useFile" button-style="solid"> <a-radio-group v-model="inbound.stream.tls.certs[0].useFile" button-style="solid">