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:
authorMHSanaei <ho3ein.sanaei@gmail.com>2026-05-04 14:20:24 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2026-05-04 14:20:24 +0300
commite19061d513b8c4fb2207b4a553a96ea086089612 (patch)
tree8a05450f0f6d3e8a2a182976b1a38bf5cca824ea /web/html/modals
parent51e2fb6dbfb6f3f21b3f578c15c3dc0d47c4a66e (diff)
TLS: Remove ECH Force Query
Diffstat (limited to 'web/html/modals')
-rw-r--r--web/html/modals/client_bulk_modal.html116
-rw-r--r--web/html/modals/client_modal.html69
-rw-r--r--web/html/modals/dns_presets_modal.html15
-rw-r--r--web/html/modals/inbound_info_modal.html41
-rw-r--r--web/html/modals/inbound_modal.html32
-rw-r--r--web/html/modals/nord_modal.html69
-rw-r--r--web/html/modals/prompt_modal.html19
-rw-r--r--web/html/modals/qrcode_modal.html39
-rw-r--r--web/html/modals/text_modal.html6
-rw-r--r--web/html/modals/two_factor_modal.html58
-rw-r--r--web/html/modals/warp_modal.html22
-rw-r--r--web/html/modals/xray_balancer_modal.html37
-rw-r--r--web/html/modals/xray_dns_modal.html18
-rw-r--r--web/html/modals/xray_fakedns_modal.html17
-rw-r--r--web/html/modals/xray_outbound_modal.html54
-rw-r--r--web/html/modals/xray_reverse_modal.html94
-rw-r--r--web/html/modals/xray_rule_modal.html31
17 files changed, 417 insertions, 320 deletions
diff --git a/web/html/modals/client_bulk_modal.html b/web/html/modals/client_bulk_modal.html
index 282972f7..81f711e7 100644
--- a/web/html/modals/client_bulk_modal.html
+++ b/web/html/modals/client_bulk_modal.html
@@ -1,58 +1,41 @@
{{define "modals/clientsBulkModal"}}
-<a-modal id="client-bulk-modal" v-model="clientsBulkModal.visible"
- :title="clientsBulkModal.title"
- @ok="clientsBulkModal.ok" :confirm-loading="clientsBulkModal.confirmLoading"
- :closable="true" :mask-closable="false"
- :ok-text="clientsBulkModal.okText" cancel-text='{{ i18n "close" }}'
- :class="themeSwitcher.currentTheme">
- <a-form :colon="false" :label-col="{ md: {span:8} }"
- :wrapper-col="{ md: {span:14} }">
+<a-modal id="client-bulk-modal" v-model="clientsBulkModal.visible" :title="clientsBulkModal.title"
+ @ok="clientsBulkModal.ok" :confirm-loading="clientsBulkModal.confirmLoading" :closable="true" :mask-closable="false"
+ :ok-text="clientsBulkModal.okText" cancel-text='{{ i18n "close" }}' :class="themeSwitcher.currentTheme">
+ <a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
<a-form-item label='{{ i18n "pages.client.method" }}'>
<a-select v-model="clientsBulkModal.emailMethod" buttonStyle="solid"
:dropdown-class-name="themeSwitcher.currentTheme">
<a-select-option :value="0">Random</a-select-option>
<a-select-option :value="1">Random+Prefix</a-select-option>
<a-select-option :value="2">Random+Prefix+Num</a-select-option>
- <a-select-option
- :value="3">Random+Prefix+Num+Postfix</a-select-option>
+ <a-select-option :value="3">Random+Prefix+Num+Postfix</a-select-option>
<a-select-option :value="4">Prefix+Num+Postfix</a-select-option>
</a-select>
</a-form-item>
- <a-form-item label='{{ i18n "pages.client.first" }}'
- v-if="clientsBulkModal.emailMethod>1">
- <a-input-number v-model.number="clientsBulkModal.firstNum"
- :min="1"></a-input-number>
+ <a-form-item label='{{ i18n "pages.client.first" }}' v-if="clientsBulkModal.emailMethod>1">
+ <a-input-number v-model.number="clientsBulkModal.firstNum" :min="1"></a-input-number>
</a-form-item>
- <a-form-item label='{{ i18n "pages.client.last" }}'
- v-if="clientsBulkModal.emailMethod>1">
- <a-input-number v-model.number="clientsBulkModal.lastNum"
- :min="clientsBulkModal.firstNum"></a-input-number>
+ <a-form-item label='{{ i18n "pages.client.last" }}' v-if="clientsBulkModal.emailMethod>1">
+ <a-input-number v-model.number="clientsBulkModal.lastNum" :min="clientsBulkModal.firstNum"></a-input-number>
</a-form-item>
- <a-form-item label='{{ i18n "pages.client.prefix" }}'
- v-if="clientsBulkModal.emailMethod>0">
+ <a-form-item label='{{ i18n "pages.client.prefix" }}' v-if="clientsBulkModal.emailMethod>0">
<a-input v-model.trim="clientsBulkModal.emailPrefix"></a-input>
</a-form-item>
- <a-form-item label='{{ i18n "pages.client.postfix" }}'
- v-if="clientsBulkModal.emailMethod>2">
+ <a-form-item label='{{ i18n "pages.client.postfix" }}' v-if="clientsBulkModal.emailMethod>2">
<a-input v-model.trim="clientsBulkModal.emailPostfix"></a-input>
</a-form-item>
- <a-form-item label='{{ i18n "pages.client.clientCount" }}'
- v-if="clientsBulkModal.emailMethod < 2">
- <a-input-number v-model.number="clientsBulkModal.quantity" :min="1"
- :max="500"></a-input-number>
+ <a-form-item label='{{ i18n "pages.client.clientCount" }}' v-if="clientsBulkModal.emailMethod < 2">
+ <a-input-number v-model.number="clientsBulkModal.quantity" :min="1" :max="500"></a-input-number>
</a-form-item>
- <a-form-item label='{{ i18n "security" }}'
- v-if="inbound.protocol === Protocols.VMESS">
- <a-select v-model="clientsBulkModal.security"
- :dropdown-class-name="themeSwitcher.currentTheme">
+ <a-form-item label='{{ i18n "security" }}' v-if="inbound.protocol === Protocols.VMESS">
+ <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-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>
<a-select-option v-for="key in TLS_FLOW_CONTROL" :value="key">[[
@@ -67,9 +50,7 @@
}}</span>
</template>
Subscription
- <a-icon
- @click="clientsBulkModal.subId = RandomUtil.randomLowerAndNum(16)"
- type="sync"></a-icon>
+ <a-icon @click="clientsBulkModal.subId = RandomUtil.randomLowerAndNum(16)" type="sync"></a-icon>
</a-tooltip>
</template>
<a-input v-model.trim="clientsBulkModal.subId"></a-input>
@@ -84,8 +65,7 @@
<a-icon type="question-circle"></a-icon>
</a-tooltip>
</template>
- <a-input-number :style="{ width: '50%' }"
- v-model.number="clientsBulkModal.tgId" min="0"></a-input-number>
+ <a-input-number :style="{ width: '50%' }" v-model.number="clientsBulkModal.tgId" min="0"></a-input-number>
</a-form-item>
<a-form-item v-if="app.ipLimitEnable">
<template slot="label">
@@ -97,8 +77,7 @@
<a-icon type="question-circle"></a-icon>
</a-tooltip>
</template>
- <a-input-number v-model.number="clientsBulkModal.limitIp"
- min="0"></a-input-number>
+ <a-input-number v-model.number="clientsBulkModal.limitIp" min="0"></a-input-number>
</a-form-item>
<a-form-item>
<template slot="label">
@@ -110,17 +89,13 @@
<a-icon type="question-circle"></a-icon>
</a-tooltip>
</template>
- <a-input-number v-model.number="clientsBulkModal.totalGB"
- :min="0"></a-input-number>
+ <a-input-number v-model.number="clientsBulkModal.totalGB" :min="0"></a-input-number>
</a-form-item>
<a-form-item label='{{ i18n "pages.client.delayedStart" }}'>
- <a-switch v-model="clientsBulkModal.delayedStart"
- @click="clientsBulkModal.expiryTime=0"></a-switch>
+ <a-switch v-model="clientsBulkModal.delayedStart" @click="clientsBulkModal.expiryTime=0"></a-switch>
</a-form-item>
- <a-form-item label='{{ i18n "pages.client.expireDays" }}'
- v-if="clientsBulkModal.delayedStart">
- <a-input-number v-model.number="delayedExpireDays"
- :min="0"></a-input-number>
+ <a-form-item label='{{ i18n "pages.client.expireDays" }}' v-if="clientsBulkModal.delayedStart">
+ <a-input-number v-model.number="delayedExpireDays" :min="0"></a-input-number>
</a-form-item>
<a-form-item v-else>
<template slot="label">
@@ -133,15 +108,11 @@
<a-icon type="question-circle"></a-icon>
</a-tooltip>
</template>
- <a-date-picker v-if="datepicker == 'gregorian'"
- :show-time="{ format: 'HH:mm:ss' }"
- format="YYYY-MM-DD HH:mm:ss"
- :dropdown-class-name="themeSwitcher.currentTheme"
+ <a-date-picker v-if="datepicker == 'gregorian'" :show-time="{ format: 'HH:mm:ss' }"
+ format="YYYY-MM-DD HH:mm:ss" :dropdown-class-name="themeSwitcher.currentTheme"
v-model="clientsBulkModal.expiryTime"></a-date-picker>
- <a-persian-datepicker v-else
- placeholder='{{ i18n "pages.settings.datepickerPlaceholder" }}'
- value="clientsBulkModal.expiryTime"
- v-model="clientsBulkModal.expiryTime">
+ <a-persian-datepicker v-else placeholder='{{ i18n "pages.settings.datepickerPlaceholder" }}'
+ value="clientsBulkModal.expiryTime" v-model="clientsBulkModal.expiryTime">
</a-persian-datepicker>
</a-form-item>
<a-form-item v-if="clientsBulkModal.expiryTime != 0">
@@ -154,13 +125,11 @@
<a-icon type="question-circle"></a-icon>
</a-tooltip>
</template>
- <a-input-number v-model.number="clientsBulkModal.reset"
- :min="0"></a-input-number>
+ <a-input-number v-model.number="clientsBulkModal.reset" :min="0"></a-input-number>
</a-form-item>
</a-form>
</a-modal>
<script>
-
const clientsBulkModal = {
visible: false,
confirmLoading: false,
@@ -219,7 +188,7 @@
title = '',
okText = '{{ i18n "sure" }}',
dbInbound = null,
- confirm = (inbound, dbInbound) => { }
+ confirm = (inbound, dbInbound) => {}
}) {
this.visible = true;
this.title = title;
@@ -245,12 +214,19 @@
},
newClient(protocol) {
switch (protocol) {
- 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);
- case Protocols.HYSTERIA: return new Inbound.HysteriaSettings.Hysteria();
- default: return null;
+ 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);
+ case Protocols.HYSTERIA:
+ return new Inbound.HysteriaSettings.Hysteria();
+ default:
+ return null;
}
},
close() {
@@ -271,7 +247,8 @@
return this.clientsBulkModal.inbound;
},
get delayedExpireDays() {
- return this.clientsBulkModal.expiryTime < 0 ? this.clientsBulkModal.expiryTime / -86400000 : 0;
+ return this.clientsBulkModal.expiryTime < 0 ? this.clientsBulkModal.expiryTime / -86400000 :
+ 0;
},
get datepicker() {
return app.datepicker;
@@ -281,6 +258,5 @@
},
},
});
-
</script>
-{{end}}
+{{end}} \ No newline at end of file
diff --git a/web/html/modals/client_modal.html b/web/html/modals/client_modal.html
index 8ce0e832..f66c01e6 100644
--- a/web/html/modals/client_modal.html
+++ b/web/html/modals/client_modal.html
@@ -1,10 +1,7 @@
{{define "modals/clientsModal"}}
-<a-modal id="client-modal" v-model="clientModal.visible"
- :title="clientModal.title" @ok="clientModal.ok"
- :confirm-loading="clientModal.confirmLoading" :closable="true"
- :mask-closable="false"
- :class="themeSwitcher.currentTheme"
- :ok-text="clientModal.okText" cancel-text='{{ i18n "close" }}'>
+<a-modal id="client-modal" v-model="clientModal.visible" :title="clientModal.title" @ok="clientModal.ok"
+ :confirm-loading="clientModal.confirmLoading" :closable="true" :mask-closable="false"
+ :class="themeSwitcher.currentTheme" :ok-text="clientModal.okText" cancel-text='{{ i18n "close" }}'>
<template v-if="isEdit">
<a-tag v-if="isExpiry || isTrafficExhausted" color="red"
:style="{ marginBottom: '10px', display: 'block', textAlign: 'center' }">Account
@@ -13,7 +10,6 @@
{{template "form/client"}}
</a-modal>
<script>
-
const clientModal = {
visible: false,
confirmLoading: false,
@@ -30,12 +26,20 @@
delayedStart: false,
ok() {
if (clientModal.isEdit) {
- ObjectUtil.execute(clientModal.confirm, clientModalApp.client, clientModal.dbInbound.id, clientModal.oldClientId);
+ ObjectUtil.execute(clientModal.confirm, clientModalApp.client, clientModal.dbInbound.id, clientModal
+ .oldClientId);
} else {
ObjectUtil.execute(clientModal.confirm, clientModalApp.client, clientModal.dbInbound.id);
}
},
- show({ title = '', okText = '{{ i18n "sure" }}', index = null, dbInbound = null, confirm = () => { }, isEdit = false }) {
+ show({
+ title = '',
+ okText = '{{ i18n "sure" }}',
+ index = null,
+ dbInbound = null,
+ confirm = () => {},
+ isEdit = false
+ }) {
this.visible = true;
this.title = title;
this.okText = okText;
@@ -55,30 +59,41 @@
}
this.clientStats = this.dbInbound.clientStats.find(row => row.email === this.clients[this.index].email);
this.confirm = confirm;
- },
+ },
getClientId(protocol, client) {
switch (protocol) {
- case Protocols.TROJAN: return client.password;
- case Protocols.SHADOWSOCKS: return client.email;
- case Protocols.HYSTERIA: return client.auth;
- default: return client.id;
+ case Protocols.TROJAN:
+ return client.password;
+ case Protocols.SHADOWSOCKS:
+ return client.email;
+ case Protocols.HYSTERIA:
+ return client.auth;
+ default:
+ return client.id;
}
},
addClient(inbound, clients) {
switch (inbound.protocol) {
- 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, RandomUtil.randomShadowsocksPassword(inbound.settings.method)));
- case Protocols.HYSTERIA: return clients.push(new Inbound.HysteriaSettings.Hysteria());
- default: return null;
+ 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, RandomUtil
+ .randomShadowsocksPassword(inbound.settings.method)));
+ case Protocols.HYSTERIA:
+ return clients.push(new Inbound.HysteriaSettings.Hysteria());
+ default:
+ return null;
}
},
close() {
clientModal.visible = false;
clientModal.loading(false);
},
- loading(loading=true) {
+ loading(loading = true) {
clientModal.confirmLoading = loading;
},
};
@@ -110,7 +125,8 @@
return true
},
get isExpiry() {
- return this.clientModal.isEdit && this.client.expiryTime >0 ? (this.client.expiryTime < new Date().getTime()) : false;
+ return this.clientModal.isEdit && this.client.expiryTime > 0 ? (this.client.expiryTime <
+ new Date().getTime()) : false;
},
get delayedStart() {
return this.clientModal.delayedStart;
@@ -150,8 +166,7 @@
return;
}
document.getElementById("clientIPs").value = "";
- } catch (error) {
- }
+ } catch (error) {}
},
resetClientTraffic(email, dbInboundId, iconElement) {
this.$confirm({
@@ -162,7 +177,8 @@
cancelText: '{{ i18n "cancel"}}',
onOk: async () => {
iconElement.disabled = true;
- const msg = await HttpUtil.postWithModal('/panel/api/inbounds/' + dbInboundId + '/resetClientTraffic/' + email);
+ const msg = await HttpUtil.postWithModal('/panel/api/inbounds/' +
+ dbInboundId + '/resetClientTraffic/' + email);
if (msg.success) {
this.clientModal.clientStats.up = 0;
this.clientModal.clientStats.down = 0;
@@ -173,6 +189,5 @@
},
},
});
-
</script>
-{{end}}
+{{end}} \ No newline at end of file
diff --git a/web/html/modals/dns_presets_modal.html b/web/html/modals/dns_presets_modal.html
index 03058c9d..0bc3126b 100644
--- a/web/html/modals/dns_presets_modal.html
+++ b/web/html/modals/dns_presets_modal.html
@@ -5,10 +5,12 @@
<a-list-item v-for="dns in dnsPresetsDatabase" :style="{ padding: '12px 16px' }">
<div class="ant-dns-presets-line">
<a-space direction="horizontal" size="small" align="center">
- <a-tag :color="dns.family ? 'purple' : 'green'">[[ dns.family ? '{{ i18n "pages.xray.dns.dnsPresetFamily" }}' : 'DNS' ]]</a-tag>
+ <a-tag :color="dns.family ? 'purple' : 'green'">[[ dns.family ? '{{ i18n "pages.xray.dns.dnsPresetFamily" }}'
+ : 'DNS' ]]</a-tag>
<span class="ant-dns-presets-list-name">[[ dns.name ]]</span>
</a-space>
- <a-button class="ant-dns-presets-install" type="primary" @click="dnsPresetsModal.install(dns.data)">{{ i18n "install" }}</a-button>
+ <a-button class="ant-dns-presets-install" type="primary"
+ @click="dnsPresetsModal.install(dns.data)">{{ i18n "install" }}</a-button>
</div>
</a-list-item>
</a-list>
@@ -36,8 +38,7 @@
</style>
<script>
- const dnsPresetsDatabase = [
- {
+ const dnsPresetsDatabase = [{
name: 'Google DNS',
family: false,
data: [
@@ -96,7 +97,11 @@
install(selectedPreset) {
return ObjectUtil.execute(dnsPresetsModal.selected, selectedPreset);
},
- show({ title = '', selected = (selectedPreset) => { }, isEdit = false }) {
+ show({
+ title = '',
+ selected = (selectedPreset) => {},
+ isEdit = false
+ }) {
this.title = title;
this.selected = selected;
this.visible = true;
diff --git a/web/html/modals/inbound_info_modal.html b/web/html/modals/inbound_info_modal.html
index 67da21a9..8ecb59bf 100644
--- a/web/html/modals/inbound_info_modal.html
+++ b/web/html/modals/inbound_info_modal.html
@@ -521,7 +521,8 @@
@click="copy(infoModal.wireguardLinks[index])"></a-button>
</a-tooltip>
</tr-info-title>
- <code :style="{ display: 'block', whiteSpace: 'normal', wordBreak: 'break-all' }">[[ infoModal.wireguardLinks[index] ]]</code>
+ <code :style="{ display: 'block', whiteSpace: 'normal', wordBreak: 'break-all' }">[[
+ infoModal.wireguardLinks[index] ]]</code>
</tr-info-row>
</td>
</tr>
@@ -534,7 +535,10 @@
function refreshIPs(email) {
return HttpUtil.post(`/panel/api/inbounds/clientIps/${email}`).then((msg) => {
if (!msg.success) {
- return { text: 'No IP Record', array: [] };
+ return {
+ text: 'No IP Record',
+ array: []
+ };
}
const formatIpRecord = (record) => {
@@ -574,7 +578,10 @@
try {
ips = JSON.parse(ips);
} catch (e) {
- return { text: String(ips), array: [String(ips)] };
+ return {
+ text: String(ips),
+ array: [String(ips)]
+ };
}
}
@@ -586,20 +593,32 @@
// New format or object array
if (Array.isArray(ips) && ips.length > 0 && typeof ips[0] === 'object') {
const result = ips.map((item) => formatIpRecord(item)).filter(Boolean);
- return { text: result.join(' | '), array: result };
+ return {
+ text: result.join(' | '),
+ array: result
+ };
}
// Old format - simple array of IPs
if (Array.isArray(ips) && ips.length > 0) {
const result = ips.map((ip) => String(ip));
- return { text: result.join(', '), array: result };
+ return {
+ text: result.join(', '),
+ array: result
+ };
}
// Fallback for any other format
- return { text: String(ips), array: [String(ips)] };
+ return {
+ text: String(ips),
+ array: [String(ips)]
+ };
} catch (e) {
- return { text: 'Error loading IPs', array: [] };
+ return {
+ text: 'Error loading IPs',
+ array: []
+ };
}
});
}
@@ -626,7 +645,8 @@
this.dbInbound = new DBInbound(dbInbound);
this.clientSettings = this.inbound.clients ? this.inbound.clients[index] : null;
this.isExpired = this.inbound.clients ? this.inbound.isExpiry(index) : this.dbInbound.isExpiry;
- this.clientStats = this.inbound.clients ? (this.dbInbound.clientStats.find(row => row.email === this.clientSettings.email) || null) : null;
+ this.clientStats = this.inbound.clients ? (this.dbInbound.clientStats.find(row => row.email === this
+ .clientSettings.email) || null) : null;
if (
[
@@ -752,7 +772,8 @@
return ColorUtils.usageColor(stats.up + stats.down, app.trafficDiff, stats.total);
},
getRemStats() {
- remained = this.infoModal.clientStats.total - this.infoModal.clientStats.up - this.infoModal.clientStats.down;
+ remained = this.infoModal.clientStats.total - this.infoModal.clientStats.up - this.infoModal.clientStats
+ .down;
return remained > 0 ? SizeFormatter.sizeFormat(remained) : '-';
},
refreshIPs() {
@@ -775,7 +796,7 @@
this.infoModal.clientIps = 'No IP Record';
this.infoModal.clientIpsArray = [];
})
- .catch(() => { });
+ .catch(() => {});
},
},
});
diff --git a/web/html/modals/inbound_modal.html b/web/html/modals/inbound_modal.html
index aab1af6d..73918f60 100644
--- a/web/html/modals/inbound_modal.html
+++ b/web/html/modals/inbound_modal.html
@@ -23,7 +23,7 @@
okText = '{{ i18n "sure" }}',
inbound = null,
dbInbound = null,
- confirm = (inbound, dbInbound) => { },
+ confirm = (inbound, dbInbound) => {},
isEdit = false,
}) {
this.title = title;
@@ -127,17 +127,17 @@
get client() {
return inModal.inbound &&
inModal.inbound.clients &&
- inModal.inbound.clients.length > 0
- ? inModal.inbound.clients[0]
- : null;
+ inModal.inbound.clients.length > 0 ?
+ inModal.inbound.clients[0] :
+ null;
},
get datepicker() {
return app.datepicker;
},
get delayedExpireDays() {
- return this.client && this.client.expiryTime < 0
- ? this.client.expiryTime / -86400000
- : 0;
+ return this.client && this.client.expiryTime < 0 ?
+ this.client.expiryTime / -86400000 :
+ 0;
},
set delayedExpireDays(days) {
this.client.expiryTime = -86400000 * days;
@@ -147,14 +147,12 @@
},
set externalProxy(value) {
if (value) {
- inModal.inbound.stream.externalProxy = [
- {
- forceTls: "same",
- dest: window.location.hostname,
- port: inModal.inbound.port,
- remark: "",
- },
- ];
+ inModal.inbound.stream.externalProxy = [{
+ forceTls: "same",
+ dest: window.location.hostname,
+ port: inModal.inbound.port,
+ remark: "",
+ }, ];
} else {
inModal.inbound.stream.externalProxy = [];
}
@@ -182,8 +180,8 @@
) {
const hasVisionFlow = inModal.inbound.settings.vlesses.some(
(c) =>
- c.flow === "xtls-rprx-vision" ||
- c.flow === "xtls-rprx-vision-udp443",
+ c.flow === "xtls-rprx-vision" ||
+ c.flow === "xtls-rprx-vision-udp443",
);
if (
hasVisionFlow &&
diff --git a/web/html/modals/nord_modal.html b/web/html/modals/nord_modal.html
index c86d8ed9..75d9778e 100644
--- a/web/html/modals/nord_modal.html
+++ b/web/html/modals/nord_modal.html
@@ -1,25 +1,31 @@
{{define "modals/nordModal"}}
<a-modal id="nord-modal" v-model="nordModal.visible" title="NordVPN NordLynx"
- :confirm-loading="nordModal.confirmLoading" :closable="true" :mask-closable="true"
- :footer="null" :class="themeSwitcher.currentTheme">
+ :confirm-loading="nordModal.confirmLoading" :closable="true" :mask-closable="true" :footer="null"
+ :class="themeSwitcher.currentTheme">
<template v-if="nordModal.nordData == null">
<a-tabs default-active-key="token" :class="themeSwitcher.currentTheme">
<a-tab-pane key="token" tab='{{ i18n "pages.xray.outbound.accessToken" }}'>
- <a-form :colon="false" :label-col="{ md: {span:6} }" :wrapper-col="{ md: {span:18} }" :style="{ marginTop: '20px' }">
+ <a-form :colon="false" :label-col="{ md: {span:6} }" :wrapper-col="{ md: {span:18} }"
+ :style="{ marginTop: '20px' }">
<a-form-item label='{{ i18n "pages.xray.outbound.accessToken" }}'>
- <a-input v-model="nordModal.token" placeholder='{{ i18n "pages.xray.outbound.accessToken" }}'></a-input>
+ <a-input v-model="nordModal.token"
+ placeholder='{{ i18n "pages.xray.outbound.accessToken" }}'></a-input>
<div :style="{ marginTop: '10px' }">
- <a-button type="primary" icon="login" @click="login()" :loading="nordModal.confirmLoading">{{ i18n "login" }}</a-button>
+ <a-button type="primary" icon="login" @click="login()"
+ :loading="nordModal.confirmLoading">{{ i18n "login" }}</a-button>
</div>
</a-form-item>
</a-form>
</a-tab-pane>
<a-tab-pane key="key" tab='{{ i18n "pages.xray.outbound.privateKey" }}'>
- <a-form :colon="false" :label-col="{ md: {span:6} }" :wrapper-col="{ md: {span:18} }" :style="{ marginTop: '20px' }">
+ <a-form :colon="false" :label-col="{ md: {span:6} }" :wrapper-col="{ md: {span:18} }"
+ :style="{ marginTop: '20px' }">
<a-form-item label='{{ i18n "pages.xray.outbound.privateKey" }}'>
- <a-input v-model="nordModal.manualKey" placeholder='{{ i18n "pages.xray.outbound.privateKey" }}'></a-input>
+ <a-input v-model="nordModal.manualKey"
+ placeholder='{{ i18n "pages.xray.outbound.privateKey" }}'></a-input>
<div :style="{ marginTop: '10px' }">
- <a-button type="primary" icon="save" @click="saveKey()" :loading="nordModal.confirmLoading">{{ i18n "save" }}</a-button>
+ <a-button type="primary" icon="save" @click="saveKey()"
+ :loading="nordModal.confirmLoading">{{ i18n "save" }}</a-button>
</div>
</a-form-item>
</a-form>
@@ -39,7 +45,8 @@
</table>
<a-button @click="logout" :loading="nordModal.confirmLoading" type="danger">{{ i18n "logout" }}</a-button>
<a-divider :style="{ margin: '0' }">{{ i18n "pages.xray.outbound.settings" }}</a-divider>
- <a-form :colon="false" :label-col="{ md: {span:6} }" :wrapper-col="{ md: {span:18} }" :style="{ marginTop: '10px' }">
+ <a-form :colon="false" :label-col="{ md: {span:6} }" :wrapper-col="{ md: {span:18} }"
+ :style="{ marginTop: '10px' }">
<a-form-item label='{{ i18n "pages.xray.outbound.country" }}'>
<a-select v-model="nordModal.countryId" @change="fetchServers" show-search option-filter-prop="label">
<a-select-option v-for="c in nordModal.countries" :key="c.id" :value="c.id" :label="c.name">
@@ -69,11 +76,13 @@
<a-form :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
<template v-if="nordOutboundIndex>=0">
<a-tag color="green" :style="{ lineHeight: '31px' }">{{ i18n "enabled" }}</a-tag>
- <a-button @click="resetOutbound" :loading="nordModal.confirmLoading" type="danger">{{ i18n "reset" }}</a-button>
+ <a-button @click="resetOutbound" :loading="nordModal.confirmLoading"
+ type="danger">{{ i18n "reset" }}</a-button>
</template>
<template v-else>
<a-tag color="orange" :style="{ lineHeight: '31px' }">{{ i18n "disabled" }}</a-tag>
- <a-button @click="addOutbound" :disabled="!nordModal.serverId" :loading="nordModal.confirmLoading" type="primary">{{ i18n "pages.xray.outbound.addOutbound" }}</a-button>
+ <a-button @click="addOutbound" :disabled="!nordModal.serverId" :loading="nordModal.confirmLoading"
+ type="primary">{{ i18n "pages.xray.outbound.addOutbound" }}</a-button>
</template>
</a-form>
</template>
@@ -115,7 +124,9 @@
},
async login() {
this.loading(true);
- const msg = await HttpUtil.post('/panel/xray/nord/reg', { token: this.token });
+ const msg = await HttpUtil.post('/panel/xray/nord/reg', {
+ token: this.token
+ });
if (msg.success) {
this.nordData = JSON.parse(msg.obj);
await this.fetchCountries();
@@ -124,7 +135,9 @@
},
async saveKey() {
this.loading(true);
- const msg = await HttpUtil.post('/panel/xray/nord/setKey', { key: this.manualKey });
+ const msg = await HttpUtil.post('/panel/xray/nord/setKey', {
+ key: this.manualKey
+ });
if (msg.success) {
this.nordData = JSON.parse(msg.obj);
await this.fetchCountries();
@@ -160,7 +173,9 @@
this.cities = [];
this.serverId = null;
this.cityId = null;
- const msg = await HttpUtil.post('/panel/xray/nord/servers', { countryId: this.countryId });
+ const msg = await HttpUtil.post('/panel/xray/nord/servers', {
+ countryId: this.countryId
+ });