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:
Diffstat (limited to 'web/html/xui')
-rw-r--r--web/html/xui/common_sider.html73
-rw-r--r--web/html/xui/component/inbound_info.html94
-rw-r--r--web/html/xui/component/setting.html32
-rw-r--r--web/html/xui/form/inbound.html106
-rw-r--r--web/html/xui/form/protocol/dokodemo.html17
-rw-r--r--web/html/xui/form/protocol/http.html10
-rw-r--r--web/html/xui/form/protocol/shadowsocks.html19
-rw-r--r--web/html/xui/form/protocol/socks.html24
-rw-r--r--web/html/xui/form/protocol/trojan.html141
-rw-r--r--web/html/xui/form/protocol/vless.html155
-rw-r--r--web/html/xui/form/protocol/vmess.html119
-rw-r--r--web/html/xui/form/sniffing.html16
-rw-r--r--web/html/xui/form/stream/stream_grpc.html7
-rw-r--r--web/html/xui/form/stream/stream_http.html12
-rw-r--r--web/html/xui/form/stream/stream_kcp.html38
-rw-r--r--web/html/xui/form/stream/stream_quic.html24
-rw-r--r--web/html/xui/form/stream/stream_settings.html45
-rw-r--r--web/html/xui/form/stream/stream_tcp.html86
-rw-r--r--web/html/xui/form/stream/stream_ws.html33
-rw-r--r--web/html/xui/form/tls_settings.html60
-rw-r--r--web/html/xui/inbound_info_modal.html61
-rw-r--r--web/html/xui/inbound_modal.html178
-rw-r--r--web/html/xui/inbounds.html457
-rw-r--r--web/html/xui/inbounds_client_row.html22
-rw-r--r--web/html/xui/index.html334
-rw-r--r--web/html/xui/setting.html196
26 files changed, 2359 insertions, 0 deletions
diff --git a/web/html/xui/common_sider.html b/web/html/xui/common_sider.html
new file mode 100644
index 00000000..f4499eeb
--- /dev/null
+++ b/web/html/xui/common_sider.html
@@ -0,0 +1,73 @@
+{{define "menuItems"}}
+<a-menu-item key="{{ .base_path }}xui/">
+ <a-icon type="dashboard"></a-icon>
+ <span>{{ i18n "menu.dashboard"}}</span>
+</a-menu-item>
+<a-menu-item key="{{ .base_path }}xui/inbounds">
+ <a-icon type="user"></a-icon>
+ <span>{{ i18n "menu.inbounds"}}</span>
+</a-menu-item>
+<a-menu-item key="{{ .base_path }}xui/setting">
+ <a-icon type="setting"></a-icon>
+ <span>{{ i18n "menu.setting"}}</span>
+</a-menu-item>
+<!--<a-menu-item key="{{ .base_path }}xui/clients">-->
+<!-- <a-icon type="laptop"></a-icon>-->
+<!-- <span>client</span>-->
+<!--</a-menu-item>-->
+<a-sub-menu>
+ <template slot="title">
+ <a-icon type="link"></a-icon>
+ <span>others</span>
+ </template>
+ <a-menu-item key="https://github.com/mhsanaei/3x-ui/">
+ <a-icon type="github"></a-icon>
+ <span>Github</span>
+ </a-menu-item>
+ <a-menu-item key="https://t.me/xxxuiforever">
+ <a-icon type="usergroup-add"></a-icon>
+ <span>Telegram Group</span>
+ </a-menu-item>
+</a-sub-menu>
+<a-menu-item key="{{ .base_path }}logout">
+ <a-icon type="logout"></a-icon>
+ <span>{{ i18n "menu.logout"}}</span>
+</a-menu-item>
+{{end}}
+
+
+{{define "commonSider"}}
+<a-layout-sider id="sider" collapsible breakpoint="md" collapsed-width="0">
+ <a-menu theme="dark" mode="inline" :selected-keys="['{{ .request_uri }}']"
+ @click="({key}) => key.startsWith('http') ? window.open(key) : location.href = key">
+ {{template "menuItems" .}}
+ </a-menu>
+</a-layout-sider>
+<a-drawer id="sider-drawer" placement="left" :closable="false"
+ @close="siderDrawer.close()"
+ :visible="siderDrawer.visible" :wrap-style="{ padding: 0 }">
+ <div class="drawer-handle" @click="siderDrawer.change()" slot="handle">
+ <a-icon :type="siderDrawer.visible ? 'close' : 'menu-fold'"></a-icon>
+ </div>
+ <a-menu theme="light" mode="inline" :selected-keys="['{{ .request_uri }}']"
+ @click="({key}) => key.startsWith('http') ? window.open(key) : location.href = key">
+ {{template "menuItems" .}}
+ </a-menu>
+</a-drawer>
+<script>
+
+ const siderDrawer = {
+ visible: false,
+ show() {
+ this.visible = true;
+ },
+ close() {
+ this.visible = false;
+ },
+ change() {
+ this.visible = !this.visible;
+ }
+ };
+
+</script>
+{{end}}
diff --git a/web/html/xui/component/inbound_info.html b/web/html/xui/component/inbound_info.html
new file mode 100644
index 00000000..cbf156d1
--- /dev/null
+++ b/web/html/xui/component/inbound_info.html
@@ -0,0 +1,94 @@
+{{define "inboundInfoStream"}}
+<p>{{ i18n "transmission" }}: <a-tag color="green">[[ inbound.network ]]</a-tag></p>
+
+<template v-if="inbound.isTcp || inbound.isWs || inbound.isH2">
+ <p v-if="inbound.host">host: <a-tag color="green">[[ inbound.host ]]</a-tag></p>
+ <p v-else>{{ i18n "host" }}: <a-tag color="orange">{{ i18n "none" }}</a-tag></p>
+
+ <p v-if="inbound.path">path: <a-tag color="green">[[ inbound.path ]]</a-tag></p>
+ <p v-else>{{ i18n "path" }}: <a-tag color="orange">{{ i18n "none" }}</a-tag></p>
+</template>
+
+<template v-if="inbound.isQuic">
+ <p>quic {{ i18n "encryption" }}: <a-tag color="green">[[ inbound.quicSecurity ]]</a-tag></p>
+ <p>quic {{ i18n "password" }}: <a-tag color="green">[[ inbound.quicKey ]]</a-tag></p>
+ <p>quic {{ i18n "camouflage" }}: <a-tag color="green">[[ inbound.quicType ]]</a-tag></p>
+</template>
+
+<template v-if="inbound.isKcp">
+ <p>kcp {{ i18n "encryption" }}: <a-tag color="green">[[ inbound.kcpType ]]</a-tag></p>
+ <p>kcp {{ i18n "password" }}: <a-tag color="green">[[ inbound.kcpSeed ]]</a-tag></p>
+</template>
+
+<template v-if="inbound.isGrpc">
+ <p>grpc serviceName: <a-tag color="green">[[ inbound.serviceName ]]</a-tag></p>
+</template>
+
+<template v-if="inbound.tls || inbound.xtls">
+ <p v-if="inbound.tls">tls: <a-tag color="green">{{ i18n "turnOn" }}</a-tag></p>
+ <p v-if="inbound.xtls">xtls: <a-tag color="green">{{ i18n "turnOn" }}</a-tag></p>
+</template>
+<template v-else>
+ <p>tls: <a-tag color="red">{{ i18n "closure" }}</a-tag></p>
+</template>
+<p v-if="inbound.tls">
+ tls {{ i18n "domainName" }}: <a-tag :color="inbound.serverName ? 'green' : 'orange'">[[ inbound.serverName ? inbound.serverName : '' ]]</a-tag>
+</p>
+<p v-if="inbound.xtls">
+ xtls {{ i18n "domainName" }}: <a-tag :color="inbound.serverName ? 'green' : 'orange'">[[ inbound.serverName ? inbound.serverName : '' ]]</a-tag>
+</p>
+{{end}}
+
+
+{{define "component/inboundInfoComponent"}}
+<div>
+ <p>{{ i18n "protocol"}}: <a-tag color="green">[[ dbInbound.protocol ]]</a-tag></p>
+ <p>{{ i18n "pages.inbounds.address"}}: <a-tag color="blue">[[ dbInbound.address ]]</a-tag></p>
+ <p>{{ i18n "pages.inbounds.port"}}: <a-tag color="green">[[ dbInbound.port ]]</a-tag></p>
+
+ <template v-if="dbInbound.isVMess" v-for="(vmess, index) in inbound.settings.vmesses">
+ <p>uuid: <a-tag color="green">[[ vmess.id ]]</a-tag></p>
+ <p>alterId: <a-tag color="green">[[ vmess.alterId ]]</a-tag></p>
+ <a-divider style="height: 2px; background-color: #7e7e7e" />
+ </template>
+
+ <template v-if="dbInbound.isVLess" v-for="(vless, index) in inbound.settings.vlesses">
+ <p>uuid: <a-tag color="green">[[ vless.id ]]</a-tag></p>
+ <p v-if="inbound.isXTls">flow: <a-tag color="green">[[ vless.flow ]]</a-tag></p>
+ <a-divider style="height: 2px; background-color: #7e7e7e" />
+ </template>
+
+ <template v-if="dbInbound.isTrojan">
+ <p>{{ i18n "password"}}: <a-tag color="green">[[ inbound.password ]]</a-tag></p>
+ </template>
+
+ <template v-if="dbInbound.isSS">
+ <p>{{ i18n "encryption"}}: <a-tag color="green">[[ inbound.method ]]</a-tag></p>
+ <p>{{ i18n "password"}}: <a-tag color="green">[[ inbound.password ]]</a-tag></p>
+ </template>
+
+ <template v-if="dbInbound.isSocks">
+ <p>{{ i18n "username"}}: <a-tag color="green">[[ inbound.username ]]</a-tag></p>
+ <p>{{ i18n "password"}}: <a-tag color="green">[[ inbound.password ]]</a-tag></p>
+ </template>
+
+ <template v-if="dbInbound.isHTTP">
+ <p>{{ i18n "username"}}: <a-tag color="green">[[ inbound.username ]]</a-tag></p>
+ <p>{{ i18n "password"}}: <a-tag color="green">[[ inbound.password ]]</a-tag></p>
+ </template>
+
+ <template v-if="dbInbound.isVMess || dbInbound.isVLess || dbInbound.isTrojan || dbInbound.isSS">
+ {{template "inboundInfoStream"}}
+ </template>
+</div>
+{{end}}
+
+{{define "component/inboundInfo"}}
+<script>
+ Vue.component('inbound-info', {
+ delimiters: ['[[', ']]'],
+ props: ["dbInbound", "inbound"],
+ template: `{{template "component/inboundInfoComponent"}}`,
+ });
+</script>
+{{end}} \ No newline at end of file
diff --git a/web/html/xui/component/setting.html b/web/html/xui/component/setting.html
new file mode 100644
index 00000000..9f8e8cbc
--- /dev/null
+++ b/web/html/xui/component/setting.html
@@ -0,0 +1,32 @@
+{{define "component/settingListItem"}}
+<a-list-item style="padding: 20px">
+ <a-row>
+ <a-col :lg="24" :xl="12">
+ <a-list-item-meta :title="title" :description="desc"/>
+ </a-col>
+ <a-col :lg="24" :xl="12">
+ <template v-if="type === 'text'">
+ <a-input :value="value" @input="$emit('input', $event.target.value)"></a-input>
+ </template>
+ <template v-else-if="type === 'number'">
+ <a-input type="number" :value="value" @input="$emit('input', $event.target.value)"></a-input>
+ </template>
+ <template v-else-if="type === 'textarea'">
+ <a-textarea :value="value" @input="$emit('input', $event.target.value)" :auto-size="{ minRows: 10, maxRows: 10 }"></a-textarea>
+ </template>
+ <template v-else-if="type === 'switch'">
+ <a-switch :checked="value" @change="value => $emit('input', value)"></a-switch>
+ </template>
+ </a-col>
+ </a-row>
+</a-list-item>
+{{end}}
+
+{{define "component/setting"}}
+<script>
+ Vue.component('setting-list-item', {
+ props: ["type", "title", "desc", "value"],
+ template: `{{template "component/settingListItem"}}`,
+ });
+</script>
+{{end}} \ No newline at end of file
diff --git a/web/html/xui/form/inbound.html b/web/html/xui/form/inbound.html
new file mode 100644
index 00000000..1a2e7ca1
--- /dev/null
+++ b/web/html/xui/form/inbound.html
@@ -0,0 +1,106 @@
+{{define "form/inbound"}}
+<!-- base -->
+<a-form layout="inline">
+ <a-form-item label='{{ i18n "remark" }}'>
+ <a-input v-model.trim="dbInbound.remark"></a-input>
+ </a-form-item>
+ <a-form-item label='{{ i18n "enable" }}'>
+ <a-switch v-model="dbInbound.enable"></a-switch>
+ </a-form-item>
+ <a-form-item label='{{ i18n "protocol" }}'>
+ <a-select v-model="inbound.protocol" style="width: 160px;">
+ <a-select-option v-for="p in Protocols" :key="p" :value="p">[[ p ]]</a-select-option>
+ </a-select>
+ </a-form-item>
+ <a-form-item>
+ <span slot="label">
+ {{ i18n "monitor" }}
+ <a-tooltip>
+ <template slot="title">
+ <span>{{ i18n "pages.inbounds.monitorDesc" }}</span>
+ </template>
+ <a-icon type="question-circle" theme="filled"></a-icon>
+ </a-tooltip>
+ </span>
+ <a-input v-model.trim="inbound.listen"></a-input>
+ </a-form-item>
+ <a-form-item label='{{ i18n "pages.inbounds.port" }}'>
+ <a-input type="number" v-model.number="inbound.port"></a-input>
+ </a-form-item>
+ <a-form-item>
+ <span slot="label">
+ <span >{{ i18n "pages.inbounds.totalFlow" }}</span>(GB)
+ <a-tooltip>
+ <template slot="title">
+ 0 <span>{{ i18n "pages.inbounds.meansNoLimit" }}</span>
+ </template>
+ <a-icon type="question-circle" theme="filled"></a-icon>
+ </a-tooltip>
+ </span>
+ <a-input-number v-model="dbInbound.totalGB" :min="0"></a-input-number>
+ </a-form-item>
+ <a-form-item>
+ <span slot="label">
+ <span >{{ i18n "pages.inbounds.expireDate" }}</span>
+ <a-tooltip>
+ <template slot="title">
+ <span>{{ i18n "pages.inbounds.leaveBlankToNeverExpire" }}</span>
+ </template>
+ <a-icon type="question-circle" theme="filled"></a-icon>
+ </a-tooltip>
+ </span>
+ <a-date-picker :show-time="{ format: 'HH:mm' }" format="YYYY-MM-DD HH:mm"
+ v-model="dbInbound._expiryTime" style="width: 300px;"></a-date-picker>
+ </a-form-item>
+</a-form>
+
+<!-- vmess settings -->
+<template v-if="inbound.protocol === Protocols.VMESS">
+ {{template "form/vmess"}}
+</template>
+
+<!-- vless settings -->
+<template v-if="inbound.protocol === Protocols.VLESS">
+ {{template "form/vless"}}
+</template>
+
+<!-- trojan settings -->
+<template v-if="inbound.protocol === Protocols.TROJAN">
+ {{template "form/trojan"}}
+</template>
+
+<!-- shadowsocks -->
+<template v-if="inbound.protocol === Protocols.SHADOWSOCKS">
+ {{template "form/shadowsocks"}}
+</template>
+
+<!-- dokodemo-door -->
+<template v-if="inbound.protocol === Protocols.DOKODEMO">
+ {{template "form/dokodemo"}}
+</template>
+
+<!-- socks -->
+<template v-if="inbound.protocol === Protocols.SOCKS">
+ {{template "form/socks"}}
+</template>
+
+<!-- http -->
+<template v-if="inbound.protocol === Protocols.HTTP">
+ {{template "form/http"}}
+</template>
+
+<!-- stream settings -->
+<template v-if="inbound.canEnableStream()">
+ {{template "form/streamSettings"}}
+</template>
+
+<!-- tls settings -->
+<template v-if="inbound.canEnableTls()">
+ {{template "form/tlsSettings"}}
+</template>
+
+<!-- sniffing -->
+<template v-if="inbound.canSniffing()">
+ {{template "form/sniffing"}}
+</template>
+{{end}} \ No newline at end of file
diff --git a/web/html/xui/form/protocol/dokodemo.html b/web/html/xui/form/protocol/dokodemo.html
new file mode 100644
index 00000000..a4dde06d
--- /dev/null
+++ b/web/html/xui/form/protocol/dokodemo.html
@@ -0,0 +1,17 @@
+{{define "form/dokodemo"}}
+<a-form layout="inline">
+ <a-form-item label='{{ i18n "pages.inbounds.targetAddress"}}'>
+ <a-input v-model.trim="inbound.settings.address"></a-input>
+ </a-form-item>
+ <a-form-item label='{{ i18n "pages.inbounds.destinationPort"}}'>
+ <a-input type="number" v-model.number="inbound.settings.port"></a-input>
+ </a-form-item>
+ <a-form-item label='{{ i18n "pages.inbounds.network"}}'>
+ <a-select v-model="inbound.settings.network" style="width: 100px;">
+ <a-select-option value="tcp,udp">tcp+udp</a-select-option>
+ <a-select-option value="tcp">tcp</a-select-option>
+ <a-select-option value="udp">udp</a-select-option>
+ </a-select>
+ </a-form-item>
+</a-form>
+{{end}} \ No newline at end of file
diff --git a/web/html/xui/form/protocol/http.html b/web/html/xui/form/protocol/http.html
new file mode 100644
index 00000000..b4ba59b7
--- /dev/null
+++ b/web/html/xui/form/protocol/http.html
@@ -0,0 +1,10 @@
+{{define "form/http"}}
+<a-form layout="inline">
+ <a-form-item label='{{ i18n "username"}}'>
+ <a-input v-model.trim="inbound.settings.accounts[0].user"></a-input>
+ </a-form-item>
+ <a-form-item label='{{ i18n "password" }}'>
+ <a-input v-model.trim="inbound.settings.accounts[0].pass"></a-input>
+ </a-form-item>
+</a-form>
+{{end}} \ No newline at end of file
diff --git a/web/html/xui/form/protocol/shadowsocks.html b/web/html/xui/form/protocol/shadowsocks.html
new file mode 100644
index 00000000..18bcf727
--- /dev/null
+++ b/web/html/xui/form/protocol/shadowsocks.html
@@ -0,0 +1,19 @@
+{{define "form/shadowsocks"}}
+<a-form layout="inline">
+ <a-form-item label='{{ i18n "encryption" }}'>
+ <a-select v-model="inbound.settings.method" style="width: 165px;">
+ <a-select-option v-for="method in SSMethods" :value="method">[[ method ]]</a-select-option>
+ </a-select>
+ </a-form-item>
+ <a-form-item label='{{ i18n "password" }}'>
+ <a-input v-model.trim="inbound.settings.password"></a-input>
+ </a-form-item>
+ <a-form-item label='{{ i18n "pages.inbounds.network" }}'>
+ <a-select v-model="inbound.settings.network" style="width: 100px;">
+ <a-select-option value="tcp,udp">tcp+udp</a-select-option>
+ <a-select-option value="tcp">tcp</a-select-option>
+ <a-select-option value="udp">udp</a-select-option>
+ </a-select>
+ </a-form-item>
+</a-form>
+{{end}} \ No newline at end of file
diff --git a/web/html/xui/form/protocol/socks.html b/web/html/xui/form/protocol/socks.html
new file mode 100644
index 00000000..35c1c0b5
--- /dev/null
+++ b/web/html/xui/form/protocol/socks.html
@@ -0,0 +1,24 @@
+{{define "form/socks"}}
+<a-form layout="inline">
+<!-- <a-form-item label="密码认证">-->
+ <a-form-item label='{{ i18n "password" }}'>
+ <a-switch :checked="inbound.settings.auth === 'password'"
+ @change="checked => inbound.settings.auth = checked ? 'password' : 'noauth'"></a-switch>
+ </a-form-item>
+ <template v-if="inbound.settings.auth === 'password'">
+ <a-form-item label='{{ i18n "username" }}'>
+ <a-input v-model.trim="inbound.settings.accounts[0].user"></a-input>
+ </a-form-item>
+ <a-form-item label='{{ i18n "password" }}'>
+ <a-input v-model.trim="inbound.settings.accounts[0].pass"></a-input>
+ </a-form-item>
+ </template>
+ <a-form-item label='{{ i18n "pages.inbounds.enable" }} udp'>
+ <a-switch v-model="inbound.settings.udp"></a-switch>
+ </a-form-item>
+ <a-form-item v-if="inbound.settings.udp"
+ label="IP">
+ <a-input v-model.trim="inbound.settings.ip"></a-input>
+ </a-form-item>
+</a-form>
+{{end}} \ No newline at end of file
diff --git a/web/html/xui/form/protocol/trojan.html b/web/html/xui/form/protocol/trojan.html
new file mode 100644
index 00000000..69c67052
--- /dev/null
+++ b/web/html/xui/form/protocol/trojan.html
@@ -0,0 +1,141 @@
+{{define "form/trojan"}}
+<a-form layout="inline">
+<a-collapse activeKey="0" v-for="(trojan, index) in inbound.settings.trojans"
+:key="`trojan-${index}`">
+
+
+<a-collapse-panel :class="getHeaderStyle(trojan.email)" :header="getHeaderText(trojan.email)">
+ <a-tag v-if="isExpiry(index) || ((getUpStats(trojan.email) + getDownStats(trojan.email)) > trojan.totalGB && trojan.totalGB != 0)" color="red" style="margin-bottom: 10px;display: block;text-align: center;">Account is (Expired|Traffic Ended) And Disabled</a-tag>
+ <a-form layout="inline">
+ <a-form-item>
+ <span slot="label">
+ Email
+ <a-tooltip>
+ <template slot="title">
+ The email must be completely unique
+ </template>
+ <!--Renew Svg Icon-->
+ <svg
+ @click="getNewEmail(trojan)"
+ xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="anticon anticon-question-circle" viewBox="0 0 16 16"> <path d="M11.534 7h3.932a.25.25 0 0 1 .192.41l-1.966 2.36a.25.25 0 0 1-.384 0l-1.966-2.36a.25.25 0 0 1 .192-.41zm-11 2h3.932a.25.25 0 0 0 .192-.41L2.692 6.23a.25.25 0 0 0-.384 0L.342 8.59A.25.25 0 0 0 .534 9z"/> <path fill-rule="evenodd" d="M8 3c-1.552 0-2.94.707-3.857 1.818a.5.5 0 1 1-.771-.636A6.002 6.002 0 0 1 13.917 7H12.9A5.002 5.002 0 0 0 8 3zM3.1 9a5.002 5.002 0 0 0 8.757 2.182.5.5 0 1 1 .771.636A6.002 6.002 0 0 1 2.083 9H3.1z"/> </svg>
+ </a-tooltip>
+ </span>
+ <a-input v-model.trim="trojan.email"></a-input>
+ </a-form-item>
+ </a-form>
+ <a-form-item label="password">
+ <a-input v-model.trim="trojan.password"></a-input>
+ </a-form-item>
+ <a-form-item v-if="inbound.xtls" label="flow">
+ <a-select v-model="inbound.settings.trojans[index].flow" style="width: 150px">
+ <a-select-option value="" selected>none</a-select-option>
+ <a-select-option v-for="key in XTLS_FLOW_CONTROL" :value="key">[[ key ]]</a-select-option>
+ </a-select>
+ </a-form-item>
+ <a-form-item>
+ <span slot="label">
+ <span >{{ i18n "pages.inbounds.totalFlow" }}</span>(GB)
+ <a-tooltip>
+ <template slot="title">
+ 0 <span>{{ i18n "pages.inbounds.meansNoLimit" }}</span>
+ </template>
+ <a-icon type="question-circle" theme="filled"></a-icon>
+ </a-tooltip>
+ </span>
+ <a-input-number v-model="trojan._totalGB" :min="0"></a-input-number>
+ </a-form-item>
+ <a-form-item>
+ <span slot="label">
+ <span >{{ i18n "pages.inbounds.expireDate" }}</span>
+ <a-tooltip>
+ <template slot="title">
+ <span>{{ i18n "pages.inbounds.leaveBlankToNeverExpire" }}</span>
+ </template>
+ <a-icon type="question-circle" theme="filled"></a-icon>
+ </a-tooltip>
+ </span>
+ <a-date-picker :show-time="{ format: 'HH:mm' }" format="YYYY-MM-DD HH:mm"
+ v-model="trojan._expiryTime" style="width: 300px;"></a-date-picker>
+ </a-form-item>
+ <a-form layout="inline">
+ <a-tooltip v-if="trojan._totalGB > 0">
+ <template slot="title">
+ reset traffic
+ </template>
+ <span style="color: #FF4D4F">
+ <a-icon type="delete" @click="resetClientTraffic(trojan,$event)"></a-icon>
+ </span>
+ </a-tooltip>
+ <a-tag color="blue">[[ sizeFormat(getUpStats(trojan.email)) ]] / [[ sizeFormat(getDownStats(trojan.email)) ]]</a-tag>
+ <a-tag v-if="trojan._totalGB > 0" color="red">used : [[ sizeFormat(getUpStats(trojan.email) + getDownStats(trojan.email)) ]]</a-tag>
+ <a-tag>
+ <svg
+ @click="addClient(inbound.protocol,trojan, inbound.settings.trojans)"
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 24 24"
+ width="24"
+ height="24"
+ class="ml-2 cursor-pointer"
+ >
+ <path fill="none" d="M0 0h24v24H0z" />
+ <path
+ fill="green"
+ d="M11 11V7h2v4h4v2h-4v4h-2v-4H7v-2h4zm1 11C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16z"
+ />
+ </svg>
+ </a-tag>
+ <a-tag v-show="inbound.settings.trojans.length > 1">
+ <svg
+ v-show="inbound.settings.trojans.length > 1"
+ @click="removeClient(index, inbound.settings.trojans)"
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 24 24"
+ width="24"
+ height="24"
+ class="ml-2 cursor-pointer"
+ >
+ <path fill="none" d="M0 0h24v24H0z" />
+ <path
+ fill="#EC4899"
+ d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm0-9.414l2.828-2.829 1.415 1.415L13.414 12l2.829 2.828-1.415 1.415L12 13.414l-2.828 2.829-1.415-1.415L10.586 12 7.757 9.172l1.415-1.415L12 10.586z"
+ />
+ </svg>
+ </a-tag>
+ </a-form>
+ </a-form>
+<a-form layout="inline">
+ <a-form-item label="fallbacks">
+ <a-row>
+ <a-button type="primary" size="small"
+ @click="inbound.settings.addTrojanFallback()">
+ +
+ </a-button>
+ </a-row>
+ </a-form-item>
+</a-form>
+
+<!-- trojan fallbacks -->
+<a-form v-for="(fallback, index) in inbound.settings.fallbacks" layout="inline">
+<a-divider>
+ fallback[[ index + 1 ]]
+ <a-icon type="delete" @click="() => inbound.settings.delTrojanFallback(index)"
+ style="color: rgb(255, 77, 79);cursor: pointer;"/>
+</a-divider>
+<a-form-item label="name">
+ <a-input v-model="fallback.name"></a-input>
+</a-form-item>
+<a-form-item label="alpn">
+ <a-input v-model="fallback.alpn"></a-input>
+</a-form-item>
+<a-form-item label="path">
+ <a-input v-model="fallback.path"></a-input>
+</a-form-item>
+<a-form-item label="dest">
+ <a-input v-model="fallback.dest"></a-input>
+</a-form-item>
+<a-form-item label="xver">
+ <a-input type="number" v-model.number="fallback.xver"></a-input>
+</a-form-item>
+<a-divider v-if="inbound.settings.fallbacks.length - 1 === index"/>
+</a-form>
+{{end}} \ No newline at end of file
diff --git a/web/html/xui/form/protocol/vless.html b/web/html/xui/form/protocol/vless.html
new file mode 100644
index 00000000..e858906e
--- /dev/null
+++ b/web/html/xui/form/protocol/vless.html
@@ -0,0 +1,155 @@
+{{define "form/vless"}}
+<a-form layout="inline">
+<a-collapse activeKey="0" v-for="(vless, index) in inbound.settings.vlesses"
+:key="`vless-${index}`">
+
+ <a-collapse-panel :class="getHeaderStyle(vless.email)" :header="getHeaderText(vless.email)">
+ <a-tag v-if="isExpiry(index) || ((getUpStats(vless.email) + getDownStats(vless.email)) > vless.totalGB && vless.totalGB != 0)" color="red" style="margin-bottom: 10px;display: block;text-align: center;">Account is (Expired|Traffic Ended) And Disabled</a-tag>
+
+ <a-form layout="inline">
+ <a-form-item>
+ <span slot="label">
+ Email
+ <a-tooltip>
+ <template slot="title">
+ The email must be completely unique
+ </template>
+ <!--Renew Svg Icon-->
+ <svg
+ @click="getNewEmail(vless)"
+ xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="anticon anticon-question-circle" viewBox="0 0 16 16"> <path d="M11.534 7h3.932a.25.25 0 0 1 .192.41l-1.966 2.36a.25.25 0 0 1-.384 0l-1.966-2.36a.25.25 0 0 1 .192-.41zm-11 2h3.932a.25.25 0 0 0 .192-.41L2.692 6.23a.25.25 0 0 0-.384 0L.342 8.59A.25.25 0 0 0 .534 9z"/> <path fill-rule="evenodd" d="M8 3c-1.552 0-2.94.707-3.857 1.818a.5.5 0 1 1-.771-.636A6.002 6.002 0 0 1 13.917 7H12.9A5.002 5.002 0 0 0 8 3zM3.1 9a5.002 5.002 0 0 0 8.757 2.182.5.5 0 1 1 .771.636A6.002 6.002 0 0 1 2.083 9H3.1z"/> </svg>
+ </a-tooltip>
+ </span>
+ <a-input v-model.trim="vless.email"></a-input>
+ </a-form-item>
+ </a-form>
+ <a-form-item label="id">
+ <a-input v-model.trim="vless.id"></a-input>
+ </a-form-item>
+ <a-form-item v-if="inbound.xtls" label="flow">
+ <a-select v-model="inbound.settings.vlesses[index].flow" style="width: 150px">
+ <a-select-option value="" selected>none</a-select-option>
+ <a-select-option v-for="key in XTLS_FLOW_CONTROL" :value="key">[[ key ]]</a-select-option>
+ </a-select>
+ </a-form-item>
+ <a-form-item v-else-if="inbound.canEnableTlsFlow()" label="flow" layout="inline">
+ <a-select v-model="inbound.settings.vlesses[index].flow" style="width: 150px">
+ <a-select-option value="" selected>none</a-select-option>
+ <a-select-option v-for="key in TLS_FLOW_CONTROL" :value="key">[[ key ]]</a-select-option>
+ </a-select>
+ </a-form-item>
+ <a-form-item v-if="inbound.tls" label="utls" layout="inline">
+ <a-select v-model="inbound.settings.vlesses[index].fingerprint" label="utls" style="width: 150px">
+ <a-select-option v-for="key in UTLS_FINGERPRINT" :value="key">[[ key ]]</a-select-option>
+ </a-select>
+ </a-form-item>
+ <a-form-item>
+ <span slot="label">
+ <span >{{ i18n "pages.inbounds.totalFlow" }}</span>(GB)
+ <a-tooltip>
+ <template slot="title">
+ 0 <span>{{ i18n "pages.inbounds.meansNoLimit" }}</span>
+ </template>
+ <a-icon type="question-circle" theme="filled"></a-icon>
+ </a-tooltip>
+ </span>
+ <a-input-number v-model="vless._totalGB" :min="0"></a-input-number>
+ </a-form-item>
+ <a-form-item>
+ <span slot="label">
+ <span >{{ i18n "pages.inbounds.expireDate" }}</span>
+ <a-tooltip>
+ <template slot="title">
+ <span>{{ i18n "pages.inbounds.leaveBlankToNeverExpire" }}</span>
+ </template>
+ <a-icon type="question-circle" theme="filled"></a-icon>
+ </a-tooltip>
+ </span>
+ <a-date-picker :show-time="{ format: 'HH:mm' }" format="YYYY-MM-DD HH:mm"
+ v-model="vless._expiryTime" style="width: 300px;"></a-date-picker>
+ </a-form-item>
+ <a-form layout="inline">
+ <a-tooltip v-if="vless._totalGB > 0">
+ <template slot="title">
+ reset traffic
+ </template>
+ <span style="color: #FF4D4F">
+ <a-icon type="delete" @click="resetClientTraffic(vless,$event)"></a-icon>
+ </span>
+ </a-tooltip>
+ <a-tag color="blue">[[ sizeFormat(getUpStats(vless.email)) ]] / [[ sizeFormat(getDownStats(vless.email)) ]]</a-tag>
+ <a-tag v-if="vless._totalGB > 0" color="red">used : [[ sizeFormat(getUpStats(vless.email) + getDownStats(vless.email)) ]]</a-tag>
+ <a-tag>
+ <svg
+
+ @click="addClient(inbound.protocol,vless, inbound.settings.vlesses)"
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 22 22"
+ width="22"
+ height="22"
+ class="mt-2 cursor-pointer"
+ >
+ <path fill="none" d="M0 0h24v24H0z" />
+ <path
+ fill="green"
+ d="M11 11V7h2v4h4v2h-4v4h-2v-4H7v-2h4zm1 11C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16z"