mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-13 21:13:09 +00:00
corrections
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -586,8 +586,13 @@
|
||||
<a-form-item label="Allow Insecure">
|
||||
<a-switch v-model="outbound.stream.tls.allowInsecure"></a-switch>
|
||||
</a-form-item>
|
||||
<a-form-item label="VerifyPeerCertByNames">
|
||||
<a-input v-model.trim="outbound.stream.tls.verifyPeerCertByNames"></a-input>
|
||||
<a-form-item label="Verify Peer Cert By Name">
|
||||
<a-input v-model.trim="outbound.stream.tls.verifyPeerCertByName"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="Pinned Peer Cert">
|
||||
<a-input v-model.trim="outbound.stream.tls.pinnedPeerCertSha256"
|
||||
placeholder="Enter SHA256 fingerprints (base64)">
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -58,12 +58,6 @@
|
||||
<a-form-item label="Session Resumption">
|
||||
<a-switch v-model="inbound.stream.tls.enableSessionResumption"></a-switch>
|
||||
</a-form-item>
|
||||
<a-form-item label="Pinned Peer Cert">
|
||||
<a-select mode="tags" v-model="inbound.stream.tls.pinnedPeerCertSha256"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||
placeholder="Enter SHA256 fingerprints (base64)">
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-divider :style="{ margin: '0' }"></a-divider>
|
||||
<template v-for="cert,index in inbound.stream.tls.certs">
|
||||
<a-form-item label='{{ i18n "certificate" }}'>
|
||||
|
||||
@@ -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{})
|
||||
|
||||
Reference in New Issue
Block a user