diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js
index 2954957c..efd059f9 100644
--- a/web/assets/js/model/xray.js
+++ b/web/assets/js/model/xray.js
@@ -482,8 +482,8 @@ class TlsStreamSettings extends XrayCommonClass {
this.settings = settings;
}
- addCert(cert) {
- this.certs.push(cert);
+ addCert() {
+ this.certs.push(new TlsStreamSettings.Cert());
}
removeCert(index) {
@@ -599,8 +599,8 @@ class XtlsStreamSettings extends XrayCommonClass {
this.settings = settings;
}
- addCert(cert) {
- this.certs.push(cert);
+ addCert() {
+ this.certs.push(new XtlsStreamSettings.Cert());
}
removeCert(index) {
diff --git a/web/html/xui/form/tls_settings.html b/web/html/xui/form/tls_settings.html
index 81506d8a..9d6c03d6 100644
--- a/web/html/xui/form/tls_settings.html
+++ b/web/html/xui/form/tls_settings.html
@@ -70,27 +70,31 @@
-
-
- {{ i18n "pages.inbounds.certificatePath" }}
- {{ i18n "pages.inbounds.certificateContent" }}
-
-
-
-
-
+
+
+
+ {{ i18n "pages.inbounds.certificatePath" }}
+ {{ i18n "pages.inbounds.certificateContent" }}
+ +
+ -
+
-
-
-
- {{ i18n "pages.inbounds.setDefaultCert" }}
+
+
+
+
+
+
+
+ {{ i18n "pages.inbounds.setDefaultCert" }}
+
-
+
-
+
@@ -111,27 +115,31 @@
-
-
- {{ i18n "pages.inbounds.certificatePath" }}
- {{ i18n "pages.inbounds.certificateContent" }}
-
-
-
-
-
+
+
+
+ {{ i18n "pages.inbounds.certificatePath" }}
+ {{ i18n "pages.inbounds.certificateContent" }}
+ +
+ -
+
-
-
-
- {{ i18n "pages.inbounds.setDefaultCert" }}
+
+
+
+
+
+
+
+ {{ i18n "pages.inbounds.setDefaultCert" }}
+
-
+
-
+
diff --git a/web/html/xui/inbound_modal.html b/web/html/xui/inbound_modal.html
index cb98f6a8..73ed6234 100644
--- a/web/html/xui/inbound_modal.html
+++ b/web/html/xui/inbound_modal.html
@@ -100,13 +100,13 @@
this.inModal.inbound.reality = false;
}
},
- setDefaultCertData() {
- inModal.inbound.stream.tls.certs[0].certFile = app.defaultCert;
- inModal.inbound.stream.tls.certs[0].keyFile = app.defaultKey;
+ setDefaultCertData(index) {
+ inModal.inbound.stream.tls.certs[index].certFile = app.defaultCert;
+ inModal.inbound.stream.tls.certs[index].keyFile = app.defaultKey;
},
- setDefaultCertXtls() {
- inModal.inbound.stream.xtls.certs[0].certFile = app.defaultCert;
- inModal.inbound.stream.xtls.certs[0].keyFile = app.defaultKey;
+ setDefaultCertXtls(index) {
+ inModal.inbound.stream.xtls.certs[index].certFile = app.defaultCert;
+ inModal.inbound.stream.xtls.certs[index].keyFile = app.defaultKey;
},
async getNewX25519Cert() {
inModal.loading(true);