mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-20 05:52:24 +00:00
new - cert (build Chain)
This commit is contained in:
parent
c489673130
commit
d8d9c64847
2 changed files with 19 additions and 1 deletions
|
@ -648,7 +648,17 @@ class TlsStreamSettings extends XrayCommonClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
TlsStreamSettings.Cert = class extends XrayCommonClass {
|
TlsStreamSettings.Cert = class extends XrayCommonClass {
|
||||||
constructor(useFile=true, certificateFile='', keyFile='', certificate='', key='', ocspStapling=3600, oneTimeLoading=false, usage=USAGE_OPTION.ENCIPHERMENT) {
|
constructor(
|
||||||
|
useFile = true,
|
||||||
|
certificateFile = '',
|
||||||
|
keyFile = '',
|
||||||
|
certificate = '',
|
||||||
|
key = '',
|
||||||
|
ocspStapling = 3600,
|
||||||
|
oneTimeLoading = false,
|
||||||
|
usage = USAGE_OPTION.ENCIPHERMENT,
|
||||||
|
buildChain = false,
|
||||||
|
) {
|
||||||
super();
|
super();
|
||||||
this.useFile = useFile;
|
this.useFile = useFile;
|
||||||
this.certFile = certificateFile;
|
this.certFile = certificateFile;
|
||||||
|
@ -658,6 +668,7 @@ TlsStreamSettings.Cert = class extends XrayCommonClass {
|
||||||
this.ocspStapling = ocspStapling;
|
this.ocspStapling = ocspStapling;
|
||||||
this.oneTimeLoading = oneTimeLoading;
|
this.oneTimeLoading = oneTimeLoading;
|
||||||
this.usage = usage;
|
this.usage = usage;
|
||||||
|
this.buildChain = buildChain
|
||||||
}
|
}
|
||||||
|
|
||||||
static fromJson(json={}) {
|
static fromJson(json={}) {
|
||||||
|
@ -669,6 +680,7 @@ TlsStreamSettings.Cert = class extends XrayCommonClass {
|
||||||
json.ocspStapling,
|
json.ocspStapling,
|
||||||
json.oneTimeLoading,
|
json.oneTimeLoading,
|
||||||
json.usage,
|
json.usage,
|
||||||
|
json.buildChain,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return new TlsStreamSettings.Cert(
|
return new TlsStreamSettings.Cert(
|
||||||
|
@ -678,6 +690,7 @@ TlsStreamSettings.Cert = class extends XrayCommonClass {
|
||||||
json.ocspStapling,
|
json.ocspStapling,
|
||||||
json.oneTimeLoading,
|
json.oneTimeLoading,
|
||||||
json.usage,
|
json.usage,
|
||||||
|
json.buildChain,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -690,6 +703,7 @@ TlsStreamSettings.Cert = class extends XrayCommonClass {
|
||||||
ocspStapling: this.ocspStapling,
|
ocspStapling: this.ocspStapling,
|
||||||
oneTimeLoading: this.oneTimeLoading,
|
oneTimeLoading: this.oneTimeLoading,
|
||||||
usage: this.usage,
|
usage: this.usage,
|
||||||
|
buildChain: this.buildChain,
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
|
@ -698,6 +712,7 @@ TlsStreamSettings.Cert = class extends XrayCommonClass {
|
||||||
ocspStapling: this.ocspStapling,
|
ocspStapling: this.ocspStapling,
|
||||||
oneTimeLoading: this.oneTimeLoading,
|
oneTimeLoading: this.oneTimeLoading,
|
||||||
usage: this.usage,
|
usage: this.usage,
|
||||||
|
buildChain: this.buildChain,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,6 +104,9 @@
|
||||||
<a-select-option v-for="key in USAGE_OPTION" :value="key">[[ key ]]</a-select-option>
|
<a-select-option v-for="key in USAGE_OPTION" :value="key">[[ key ]]</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item label="Build Chain">
|
||||||
|
<a-switch v-model="cert.buildChain"></a-switch>
|
||||||
|
</a-form-item>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue