diff options
| author | mhsanaei <ho3ein.sanaei@gmail.com> | 2024-08-11 01:47:44 +0300 |
|---|---|---|
| committer | mhsanaei <ho3ein.sanaei@gmail.com> | 2024-08-11 01:47:44 +0300 |
| commit | 93d52bc86c4725fdfbdb629e87bbb5d24abf7d37 (patch) | |
| tree | ffd23266cd3118484dcd012e675e0e2b110e542c /web/html | |
| parent | bda5c2c915977e0cbf9de867d918508ef688dd45 (diff) | |
new - vmess security (inbound client side - outbound)
Diffstat (limited to 'web/html')
| -rw-r--r-- | web/html/xui/client_bulk_modal.html | 10 | ||||
| -rw-r--r-- | web/html/xui/client_modal.html | 2 | ||||
| -rw-r--r-- | web/html/xui/form/client.html | 5 | ||||
| -rw-r--r-- | web/html/xui/form/outbound.html | 5 | ||||
| -rw-r--r-- | web/html/xui/form/protocol/vmess.html | 2 | ||||
| -rw-r--r-- | web/html/xui/settings.html | 4 |
6 files changed, 25 insertions, 3 deletions
diff --git a/web/html/xui/client_bulk_modal.html b/web/html/xui/client_bulk_modal.html index 5e6d1a1f..3cdc5ff6 100644 --- a/web/html/xui/client_bulk_modal.html +++ b/web/html/xui/client_bulk_modal.html @@ -28,6 +28,11 @@ <a-form-item label='{{ i18n "pages.client.clientCount" }}' v-if="clientsBulkModal.emailMethod < 2"> <a-input-number v-model="clientsBulkModal.quantity" :min="1" :max="100"></a-input-number> </a-form-item> + <a-form-item v-if="inbound.protocol === Protocols.VMESS" label='Security'> + <a-select v-model="clientsBulkModal.security" :dropdown-class-name="themeSwitcher.currentTheme"> + <a-select-option v-for="key in USERS_SECURITY" :value="key">[[ key ]]</a-select-option> + </a-select> + </a-form-item> <a-form-item label='Flow' v-if="clientsBulkModal.inbound.canEnableTlsFlow()"> <a-select v-model="clientsBulkModal.flow" :dropdown-class-name="themeSwitcher.currentTheme"> <a-select-option value="" selected>{{ i18n "none" }}</a-select-option> @@ -146,6 +151,7 @@ emailPostfix: "", subId: "", tgId: '', + security: "auto", flow: "", delayedStart: false, reset: 0, @@ -168,6 +174,7 @@ newClient.email += useNum ? prefix + i.toString() + postfix : prefix + postfix; if (clientsBulkModal.subId.length > 0) newClient.subId = clientsBulkModal.subId; newClient.tgId = clientsBulkModal.tgId; + newClient.security = clientsBulkModal.security; newClient.limitIp = clientsBulkModal.limitIp; newClient._totalGB = clientsBulkModal.totalGB; newClient._expiryTime = clientsBulkModal.expiryTime; @@ -203,6 +210,7 @@ this.emailPostfix = ""; this.subId = ""; this.tgId = ''; + this.security = "auto"; this.flow = ""; this.dbInbound = new DBInbound(dbInbound); this.inbound = dbInbound.toInbound(); @@ -211,7 +219,7 @@ }, newClient(protocol) { switch (protocol) { - case Protocols.VMESS: return new Inbound.VmessSettings.Vmess(); + case Protocols.VMESS: return new Inbound.VmessSettings.VMESS(); case Protocols.VLESS: return new Inbound.VLESSSettings.VLESS(); case Protocols.TROJAN: return new Inbound.TrojanSettings.Trojan(); case Protocols.SHADOWSOCKS: return new Inbound.ShadowsocksSettings.Shadowsocks(clientsBulkModal.inbound.settings.shadowsockses[0].method); diff --git a/web/html/xui/client_modal.html b/web/html/xui/client_modal.html index 83fa71a3..aa62e02a 100644 --- a/web/html/xui/client_modal.html +++ b/web/html/xui/client_modal.html @@ -61,7 +61,7 @@ }, addClient(protocol, clients) { switch (protocol) { - case Protocols.VMESS: return clients.push(new Inbound.VmessSettings.Vmess()); + case Protocols.VMESS: return clients.push(new Inbound.VmessSettings.VMESS()); case Protocols.VLESS: return clients.push(new Inbound.VLESSSettings.VLESS()); case Protocols.TROJAN: return clients.push(new Inbound.TrojanSettings.Trojan()); case Protocols.SHADOWSOCKS: return clients.push(new Inbound.ShadowsocksSettings.Shadowsocks(clients[0].method)); diff --git a/web/html/xui/form/client.html b/web/html/xui/form/client.html index 845f9408..aa558824 100644 --- a/web/html/xui/form/client.html +++ b/web/html/xui/form/client.html @@ -39,6 +39,11 @@ </template> <a-input v-model.trim="client.id"></a-input> </a-form-item> + <a-form-item v-if="inbound.protocol === Protocols.VMESS" label='Security'> + <a-select v-model="client.security" :dropdown-class-name="themeSwitcher.currentTheme"> + <a-select-option v-for="key in USERS_SECURITY" :value="key">[[ key ]]</a-select-option> + </a-select> + </a-form-item> <a-form-item v-if="client.email && app.subSettings.enable"> <template slot="label"> <a-tooltip> diff --git a/web/html/xui/form/outbound.html b/web/html/xui/form/outbound.html index 90b9e60b..61af06e0 100644 --- a/web/html/xui/form/outbound.html +++ b/web/html/xui/form/outbound.html @@ -160,6 +160,11 @@ <a-form-item label='ID'> <a-input v-model.trim="outbound.settings.id"></a-input> </a-form-item> + <a-form-item label='Security'> + <a-select v-model="outbound.settings.security" :dropdown-class-name="themeSwitcher.currentTheme"> + <a-select-option v-for="key in USERS_SECURITY" :value="key">[[ key ]]</a-select-option> + </a-select> + </a-form-item> <!-- vless settings --> <template v-if="outbound.canEnableTlsFlow()"> diff --git a/web/html/xui/form/protocol/vmess.html b/web/html/xui/form/protocol/vmess.html index 4e9fe749..07d767e4 100644 --- a/web/html/xui/form/protocol/vmess.html +++ b/web/html/xui/form/protocol/vmess.html @@ -10,10 +10,12 @@ <tr class="client-table-header"> <th>{{ i18n "pages.inbounds.email" }}</th> <th>ID</th> + <th>Security</th> </tr> <tr v-for="(client, index) in inbound.settings.vmesses" :class="index % 2 == 1 ? 'client-table-odd-row' : ''"> <td>[[ client.email ]]</td> <td>[[ client.id ]]</td> + <td>[[ client.security ]]</td> </tr> </table> </a-collapse-panel> diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html index 2c5c62a0..f2379078 100644 --- a/web/html/xui/settings.html +++ b/web/html/xui/settings.html @@ -523,7 +523,9 @@ if (msg.success) { this.loading(true); await PromiseUtil.sleep(5000); - let { webCertFile, webKeyFile, webDomain: host, webPort: port, webBasePath: base } = this.allSetting; + var { webCertFile, webKeyFile, webDomain: host, webPort: port, webBasePath: base } = this.allSetting; + if (host == this.oldAllSetting.webDomain) host = null; + if (port == this.oldAllSetting.webPort) port = null; const isTLS = webCertFile !== "" || webKeyFile !== ""; const url = buildURL({ host, port, isTLS, base, path: "panel/settings" }); window.location.replace(url); |
