Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanaei <ho3ein.sanaei@gmail.com>2025-09-07 23:35:38 +0300
committerGitHub <noreply@github.com>2025-09-07 23:35:38 +0300
commitb008ff4ad236f20f0937dd02e747ca6581e776f3 (patch)
treeefcb43872da9f46f3e6a307424fb5e309e0e7737 /web/html/modals
parentda6b89fdcd2270aa116297d9ff620b6331f39df9 (diff)
Vlessenc (#3426)
* mlkem768 * VlessEnc
Diffstat (limited to 'web/html/modals')
-rw-r--r--web/html/modals/inbound_info_modal.html6
-rw-r--r--web/html/modals/inbound_modal.html48
2 files changed, 42 insertions, 12 deletions
diff --git a/web/html/modals/inbound_info_modal.html b/web/html/modals/inbound_info_modal.html
index a15172f3..4110c244 100644
--- a/web/html/modals/inbound_info_modal.html
+++ b/web/html/modals/inbound_info_modal.html
@@ -101,6 +101,12 @@
{{ i18n "security" }}
<a-tag :color="inbound.stream.security == 'none' ? 'red' : 'green'">[[ inbound.stream.security ]]</a-tag>
<br />
+ <td>Authentication</td>
+ <a-tag :color="inbound.settings.selectedAuth ? 'green' : 'red'">[[ inbound.settings.selectedAuth ? inbound.settings.selectedAuth : '' ]]</a-tag>
+ <br />
+ {{ i18n "encryption" }}
+ <a-tag :color="inbound.settings.encryption ? 'green' : 'red'">[[ inbound.settings.encryption ? inbound.settings.encryption : '' ]]</a-tag>
+ <br />
<template v-if="inbound.stream.security != 'none'">
{{ i18n "domainName" }}
<a-tag v-if="inbound.serverName" :color="inbound.serverName ? 'green' : 'orange'">[[ inbound.serverName ? inbound.serverName : '' ]]</a-tag>
diff --git a/web/html/modals/inbound_modal.html b/web/html/modals/inbound_modal.html
index b77e74e2..a7a59c99 100644
--- a/web/html/modals/inbound_modal.html
+++ b/web/html/modals/inbound_modal.html
@@ -1,9 +1,7 @@
{{define "modals/inboundModal"}}
-<a-modal id="inbound-modal" v-model="inModal.visible" :title="inModal.title"
- :dialog-style="{ top: '20px' }" @ok="inModal.ok"
- :confirm-loading="inModal.confirmLoading" :closable="true" :mask-closable="false"
- :class="themeSwitcher.currentTheme"
- :ok-text="inModal.okText" cancel-text='{{ i18n "close" }}'>
+<a-modal id="inbound-modal" v-model="inModal.visible" :title="inModal.title" :dialog-style="{ top: '20px' }"
+ @ok="inModal.ok" :confirm-loading="inModal.confirmLoading" :closable="true" :mask-closable="false"
+ :class="themeSwitcher.currentTheme" :ok-text="inModal.okText" cancel-text='{{ i18n "close" }}'>
{{template "form/inbound"}}
</a-modal>
<script>
@@ -20,7 +18,7 @@
ok() {
ObjectUtil.execute(inModal.confirm, inModal.inbound, inModal.dbInbound);
},
- show({ title = '', okText = '{{ i18n "sure" }}', inbound = null, dbInbound = null, confirm = (inbound, dbInbound) => {}, isEdit = false }) {
+ show({ title = '', okText = '{{ i18n "sure" }}', inbound = null, dbInbound = null, confirm = (inbound, dbInbound) => { }, isEdit = false }) {
this.title = title;
this.okText = okText;
if (inbound) {
@@ -41,7 +39,7 @@
inModal.visible = false;
inModal.loading(false);
},
- loading(loading=true) {
+ loading(loading = true) {
inModal.confirmLoading = loading;
},
};
@@ -105,9 +103,9 @@
},
SSMethodChange() {
this.inModal.inbound.settings.password = RandomUtil.randomShadowsocksPassword(this.inModal.inbound.settings.method)
-
+
if (this.inModal.inbound.isSSMultiUser) {
- if (this.inModal.inbound.settings.shadowsockses.length ==0){
+ if (this.inModal.inbound.settings.shadowsockses.length == 0) {
this.inModal.inbound.settings.shadowsockses = [new Inbound.ShadowsocksSettings.Shadowsocks()];
}
if (!this.inModal.inbound.isSS2022) {
@@ -123,7 +121,7 @@
client.password = RandomUtil.randomShadowsocksPassword(this.inModal.inbound.settings.method)
})
} else {
- if (this.inModal.inbound.settings.shadowsockses.length > 0){
+ if (this.inModal.inbound.settings.shadowsockses.length > 0) {
this.inModal.inbound.settings.shadowsockses = [];
}
}
@@ -154,7 +152,7 @@
},
async getNewEchCert() {
inModal.loading(true);
- const msg = await HttpUtil.post('/server/getNewEchCert', {sni: inModal.inbound.stream.tls.sni});
+ const msg = await HttpUtil.post('/server/getNewEchCert', { sni: inModal.inbound.stream.tls.sni });
inModal.loading(false);
if (!msg.success) {
return;
@@ -162,8 +160,34 @@
inModal.inbound.stream.tls.echServerKeys = msg.obj.echServerKeys;
inModal.inbound.stream.tls.settings.echConfigList = msg.obj.echConfigList;
},
+ async getNewVlessEnc() {
+ inModal.loading(true);
+ const msg = await HttpUtil.post('/server/getNewVlessEnc');
+ inModal.loading(false);
+
+ if (!msg.success) {
+ return;
+ }
+
+ const auths = msg.obj.auths || [];
+ const selected = inModal.inbound.settings.selectedAuth;
+ const block = auths.find(a => a.label === selected);
+
+ if (!block) {
+ console.error("No auth block for", selected);
+ return;
+ }
+
+ inModal.inbound.settings.decryption = block.decryption;
+ inModal.inbound.settings.encryption = block.encryption;
+ },
+ clearKeys() {
+ this.inbound.settings.decryption = 'none';
+ this.inbound.settings.encryption = '';
+ }
+
},
});
</script>
-{{end}}
+{{end}} \ No newline at end of file