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/form/protocol')
-rw-r--r--web/html/form/protocol/shadowsocks.html114
-rw-r--r--web/html/form/protocol/socks.html45
-rw-r--r--web/html/form/protocol/trojan.html63
-rw-r--r--web/html/form/protocol/tun.html85
-rw-r--r--web/html/form/protocol/vless.html2
-rw-r--r--web/html/form/protocol/vmess.html7
-rw-r--r--web/html/form/protocol/wireguard.html16
7 files changed, 203 insertions, 129 deletions
diff --git a/web/html/form/protocol/shadowsocks.html b/web/html/form/protocol/shadowsocks.html
index 06e12075..31d94f81 100644
--- a/web/html/form/protocol/shadowsocks.html
+++ b/web/html/form/protocol/shadowsocks.html
@@ -1,50 +1,76 @@
{{define "form/shadowsocks"}}
<template v-if="inbound.isSSMultiUser">
- <a-collapse activeKey="0" v-for="(client, index) in inbound.settings.shadowsockses.slice(0,1)" v-if="!isEdit">
- <a-collapse-panel header='{{ i18n "pages.inbounds.client" }}'>
- {{template "form/client"}}
- </a-collapse-panel>
- </a-collapse>
- <a-collapse v-else>
- <a-collapse-panel :header="'{{ i18n "pages.client.clientCount"}} : ' + inbound.settings.shadowsockses.length">
- <table width="100%">
- <tr class="client-table-header">
- <th>{{ i18n "pages.inbounds.email" }}</th>
- <th>Password</th>
- </tr>
- <tr v-for="(client, index) in inbound.settings.shadowsockses" :class="index % 2 == 1 ? 'client-table-odd-row' : ''">
- <td>[[ client.email ]]</td>
- <td>[[ client.password ]]</td>
- </tr>
- </table>
- </a-collapse-panel>
- </a-collapse>
+ <a-collapse
+ activeKey="0"
+ v-for="(client, index) in inbound.settings.shadowsockses.slice(0,1)"
+ v-if="!isEdit"
+ >
+ <a-collapse-panel header='{{ i18n "pages.inbounds.client" }}'>
+ {{template "form/client"}}
+ </a-collapse-panel>
+ </a-collapse>
+ <a-collapse v-else>
+ <a-collapse-panel :header="'{{ i18n "pages.client.clientCount"}} : ' + inbound.settings.shadowsockses.length">
+ <table width="100%">
+ <tr class="client-table-header">
+ <th>{{ i18n "pages.inbounds.email" }}</th>
+ <th>Password</th>
+ </tr>
+ <tr
+ v-for="(client, index) in inbound.settings.shadowsockses"
+ :class="index % 2 == 1 ? ' client-table-odd-row' : ''"
+ >
+ <td>[[ client.email ]]</td>
+ <td>[[ client.password ]]</td>
+ </tr>
+ </table>
+ </a-collapse-panel>
+ </a-collapse>
</template>
-<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
- <a-form-item label='{{ i18n "encryption" }}'>
- <a-select v-model="inbound.settings.method" @change="SSMethodChange" :dropdown-class-name="themeSwitcher.currentTheme">
- <a-select-option v-for="(method,method_name) in SSMethods" :value="method">[[ method_name ]]</a-select-option>
- </a-select>
- </a-form-item>
- <a-form-item v-if="inbound.isSS2022">
- <template slot="label">
- <a-tooltip>
- <template slot="title">
- <span>{{ i18n "reset" }}</span>
- </template> Password <a-icon @click="inbound.settings.password = RandomUtil.randomShadowsocksPassword(inbound.settings.method)" type="sync"></a-icon>
- </a-tooltip>
+<a-form
+ :colon=" false"
+ :label-col="{ md: {span:8} }"
+ :wrapper-col="{ md: {span:14} }"
+>
+ <a-form-item label='{{ i18n "encryption" }}'>
+ <a-select
+ v-model="inbound.settings.method"
+ @change="SSMethodChange"
+ :dropdown-class-name="themeSwitcher.currentTheme"
+ >
+ <a-select-option v-for="(method,method_name) in SSMethods" :value="method"
+ >[[ method_name ]]</a-select-option
+ >
+ </a-select>
+ </a-form-item>
+ <a-form-item v-if="inbound.isSS2022">
+ <template slot="label">
+ <a-tooltip>
+ <template slot="title">
+ <span>{{ i18n "reset" }}</span>
</template>
- <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' }" :dropdown-class-name="themeSwitcher.currentTheme">
- <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-item label='ivCheck'>
- <a-switch v-model="inbound.settings.ivCheck"></a-switch>
- </a-form-item>
+ Password
+ <a-icon
+ @click="inbound.settings.password = RandomUtil.randomShadowsocksPassword(inbound.settings.method)"
+ type="sync"
+ ></a-icon>
+ </a-tooltip>
+ </template>
+ <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' }"
+ :dropdown-class-name="themeSwitcher.currentTheme"
+ >
+ <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-item label="ivCheck">
+ <a-switch v-model="inbound.settings.ivCheck"></a-switch>
+ </a-form-item>
</a-form>
{{end}}
diff --git a/web/html/form/protocol/socks.html b/web/html/form/protocol/socks.html
index 979769da..6ffa32a8 100644
--- a/web/html/form/protocol/socks.html
+++ b/web/html/form/protocol/socks.html
@@ -1,5 +1,9 @@
{{define "form/mixed"}}
-<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
+<a-form
+ :colon="false"
+ :label-col="{ md: {span:8} }"
+ :wrapper-col="{ md: {span:14} }"
+>
<a-form-item label='{{ i18n "pages.inbounds.enable" }} UDP'>
<a-switch v-model="inbound.settings.udp"></a-switch>
</a-form-item>
@@ -7,7 +11,10 @@
<a-input v-model.trim="inbound.settings.ip"></a-input>
</a-form-item>
<a-form-item label='{{ i18n "password" }}'>
- <a-switch :checked="inbound.settings.auth === 'password'" @change="checked => inbound.settings.auth = checked ? 'password' : 'noauth'"></a-switch>
+ <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'">
<table :style="{ width: '100%', textAlign: 'center', margin: '1rem 0' }">
@@ -15,17 +22,39 @@
<td width="45%">{{ i18n "username" }}</td>
<td width="45%">{{ i18n "password" }}</td>
<td>
- <a-button icon="plus" size="small" @click="inbound.settings.addAccount(new Inbound.MixedSettings.SocksAccount())"></a-button>
+ <a-button
+ icon="plus"
+ size="small"
+ @click="inbound.settings.addAccount(new Inbound.MixedSettings.SocksAccount())"
+ ></a-button>
</td>
</tr>
</table>
- <a-input-group compact v-for="(account, index) in inbound.settings.accounts" :style="{ marginBottom: '10px' }">
- <a-input :style="{ width: '50%' }" v-model.trim="account.user" placeholder='{{ i18n "username" }}'>
- <template slot="addonBefore" :style="{ margin: '0' }">[[ index+1 ]]</template>
+ <a-input-group
+ compact
+ v-for="(account, index) in inbound.settings.accounts"
+ :style="{ marginBottom: '10px' }"
+ >
+ <a-input
+ :style="{ width: '50%' }"
+ v-model.trim="account.user"
+ placeholder='{{ i18n "username" }}'
+ >
+ <template slot="addonBefore" :style="{ margin: '0' }"
+ >[[ index+1 ]]</template
+ >
</a-input>
- <a-input :style="{ width: '50%' }" v-model.trim="account.pass" placeholder='{{ i18n "password" }}'>
+ <a-input
+ :style="{ width: '50%' }"
+ v-model.trim="account.pass"
+ placeholder='{{ i18n "password" }}'
+ >
<template slot="addonAfter">
- <a-button icon="minus" size="small" @click="inbound.settings.delAccount(index)"></a-button>
+ <a-button
+ icon="minus"
+ size="small"
+ @click="inbound.settings.delAccount(index)"
+ ></a-button>
</template>
</a-input>
</a-input-group>
diff --git a/web/html/form/protocol/trojan.html b/web/html/form/protocol/trojan.html
index fc327721..234e7adc 100644
--- a/web/html/form/protocol/trojan.html
+++ b/web/html/form/protocol/trojan.html
@@ -11,40 +11,43 @@
<th>{{ i18n "pages.inbounds.email" }}</th>
<th>Password</th>
</tr>
- <tr v-for="(client, index) in inbound.settings.trojans" :class="index % 2 == 1 ? 'client-table-odd-row' : ''">
+ <tr v-for="(client, index) in inbound.settings.trojans" :class="index % 2 == 1 ? ' client-table-odd-row' : ''">
<td>[[ client.email ]]</td>
<td>[[ client.password ]]</td>
</tr>
</table>
</a-collapse-panel>
</a-collapse>
-<template v-if="inbound.isTcp">
- <a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
- <a-form-item label="Fallbacks">
- <a-button icon="plus" type="primary" size="small" @click="inbound.settings.addFallback()"></a-button>
- </a-form-item>
- </a-form>
+<template v-if=" inbound.isTcp">
+ <a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
+ <a-form-item label="Fallbacks">
+ <a-button icon="plus" type="primary" size="small" @click="inbound.settings.addFallback()"></a-button>
+ </a-form-item>
+ </a-form>
- <!-- trojan fallbacks -->
- <a-form v-for="(fallback, index) in inbound.settings.fallbacks" :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
- <a-divider :style="{ margin: '0' }"> Fallback [[ index + 1 ]] <a-icon type="delete" @click="() => inbound.settings.delFallback(index)" :style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer' }"></a-icon>
- </a-divider>
- <a-form-item label='SNI'>
- <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-number v-model.number="fallback.xver" :min="0" :max="2"></a-input-number>
- </a-form-item>
- </a-form>
- <a-divider style="margin:5px 0;"></a-divider>
-</template>
-{{end}}
+ <!-- trojan fallbacks -->
+ <a-form v-for="(fallback, index) in inbound.settings.fallbacks" :colon="false" :label-col="{ md: {span:8} }"
+ :wrapper-col="{ md: {span:14} }">
+ <a-divider :style="{ margin: '0' }"> Fallback [[ index + 1 ]] <a-icon type="delete"
+ @click="() => inbound.settings.delFallback(index)"
+ :style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer' }"></a-icon>
+ </a-divider>
+ <a-form-item label='SNI'>
+ <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-number v-model.number="fallback.xver" :min="0" :max="2"></a-input-number>
+ </a-form-item>
+ </a-form>
+ <a-divider style="margin:5px 0;"></a-divider>
+ </template>
+ {{end}} \ No newline at end of file
diff --git a/web/html/form/protocol/tun.html b/web/html/form/protocol/tun.html
index 08f80620..7972c742 100644
--- a/web/html/form/protocol/tun.html
+++ b/web/html/form/protocol/tun.html
@@ -1,44 +1,53 @@
{{define "form/tun"}}
-<a-form :colon="false" :label-col="{ md: {span:8} }"
- :wrapper-col="{ md: {span:14} }">
- <a-form-item>
- <template slot="label">
- <a-tooltip>
- <template slot="title">
- <span>{{ i18n "pages.xray.tun.nameDesc" }}</span>
- </template>
- Interface Name
- <a-icon type="question-circle"></a-icon>
- </a-tooltip>
+<a-form
+ :colon="false"
+ :label-col="{ md: {span:8} }"
+ :wrapper-col="{ md: {span:14} }"
+>
+ <a-form-item>
+ <template slot="label">
+ <a-tooltip>
+ <template slot="title">
+ <span>{{ i18n "pages.xray.tun.nameDesc" }}</span>
</template>
- <a-input v-model.trim="inbound.settings.name"
- placeholder="xray0"></a-input>
- </a-form-item>
- <a-form-item>
- <template slot="label">
- <a-tooltip>
- <template slot="title">
- <span>{{ i18n "pages.xray.tun.mtuDesc" }}</span>
- </template>
- MTU
- <a-icon type="question-circle"></a-icon>
- </a-tooltip>
+ Interface Name
+ <a-icon type="question-circle"></a-icon>
+ </a-tooltip>
+ </template>
+ <a-input v-model.trim="inbound.settings.name" placeholder="xray0"></a-input>
+ </a-form-item>
+ <a-form-item>
+ <template slot="label">
+ <a-tooltip>
+ <template slot="title">
+ <span>{{ i18n "pages.xray.tun.mtuDesc" }}</span>
</template>
- <a-input-number v-model.number="inbound.settings.mtu" :min="1"
- :max="9000" placeholder="1500"></a-input-number>
- </a-form-item>
- <a-form-item>
- <template slot="label">
- <a-tooltip>
- <template slot="title">
- <span>{{ i18n "pages.xray.tun.userLevelDesc" }}</span>
- </template>
- {{ i18n "pages.xray.tun.userLevel" }}
- <a-icon type="question-circle"></a-icon>
- </a-tooltip>
+ MTU
+ <a-icon type="question-circle"></a-icon>
+ </a-tooltip>
+ </template>
+ <a-input-number
+ v-model.number="inbound.settings.mtu"
+ :min="1"
+ :max="9000"
+ placeholder="1500"
+ ></a-input-number>
+ </a-form-item>
+ <a-form-item>
+ <template slot="label">
+ <a-tooltip>
+ <template slot="title">
+ <span>{{ i18n "pages.xray.tun.userLevelDesc" }}</span>
</template>
- <a-input-number v-model.number="inbound.settings.userLevel" :min="0"
- placeholder="0"></a-input-number>
- </a-form-item>
+ {{ i18n "pages.xray.tun.userLevel" }}
+ <a-icon type="question-circle"></a-icon>
+ </a-tooltip>
+ </template>
+ <a-input-number
+ v-model.number="inbound.settings.userLevel"
+ :min="0"
+ placeholder="0"
+ ></a-input-number>
+ </a-form-item>
</a-form>
{{end}}
diff --git a/web/html/form/protocol/vless.html b/web/html/form/protocol/vless.html
index fc9c3852..443737d0 100644
--- a/web/html/form/protocol/vless.html
+++ b/web/html/form/protocol/vless.html
@@ -120,4 +120,4 @@
</a-form>
<a-divider :style="{ margin: '5px 0' }"></a-divider>
</template>
-{{end}} \ No newline at end of file
+ {{end}} \ No newline at end of file
diff --git a/web/html/form/protocol/vmess.html b/web/html/form/protocol/vmess.html
index 3c5200ac..63f05d5b 100644
--- a/web/html/form/protocol/vmess.html
+++ b/web/html/form/protocol/vmess.html
@@ -1,5 +1,5 @@
{{define "form/vmess"}}
-<a-collapse activeKey="0" v-for="(client, index) in inbound.settings.vmesses.slice(0,1)" v-if="!isEdit">
+<a-collapse activeKey="0" v-for="(client, index) in inbound.settings.vmesses.slice(0,1)" v-if="!isEdit">
<a-collapse-panel header='{{ i18n "pages.inbounds.client" }}'>
{{template "form/client"}}
</a-collapse-panel>
@@ -12,7 +12,8 @@
<th>ID</th>
<th>{{ i18n "security" }}</th>
</tr>
- <tr v-for="(client, index) in inbound.settings.vmesses" :class="index % 2 == 1 ? 'client-table-odd-row' : ''">
+ <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>
@@ -20,4 +21,4 @@
</table>
</a-collapse-panel>
</a-collapse>
-{{end}}
+{{end}} \ No newline at end of file
diff --git a/web/html/form/protocol/wireguard.html b/web/html/form/protocol/wireguard.html
index 51fc4f02..6a5ff541 100644
--- a/web/html/form/protocol/wireguard.html
+++ b/web/html/form/protocol/wireguard.html
@@ -7,7 +7,8 @@
<span>{{ i18n "reset" }}</span>
</template>
{{ i18n "pages.xray.wireguard.secretKey" }}
- <a-icon type="sync" @click="[inbound.settings.pubKey, inbound.settings.secretKey] = Object.values(Wireguard.generateKeypair())"></a-icon>
+ <a-icon type="sync"
+ @click="[inbound.settings.pubKey, inbound.settings.secretKey] = Object.values(Wireguard.generateKeypair())"></a-icon>
</a-tooltip>
</template>
<a-input v-model.trim="inbound.settings.secretKey"></a-input>
@@ -24,8 +25,11 @@
<a-form-item label="Peers">
<a-button icon="plus" type="primary" size="small" @click="inbound.settings.addPeer()"></a-button>
</a-form-item>
- <a-form v-for="(peer, index) in inbound.settings.peers" :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
- <a-divider :style="{ margin: '0' }"> Peer [[ index + 1 ]] <a-icon v-if="inbound.settings.peers.length>1" type="delete" @click="() => inbound.settings.delPeer(index)" :style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer' }"></a-icon>
+ <a-form v-for="(peer, index) in inbound.settings.peers" :colon="false" :label-col="{ md: {span:8} }"
+ :wrapper-col="{ md: {span:14} }">
+ <a-divider :style="{ margin: '0' }"> Peer [[ index + 1 ]] <a-icon v-if="inbound.settings.peers.length>1"
+ type="delete" @click="() => inbound.settings.delPeer(index)"
+ :style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer' }"></a-icon>
</a-divider>
<a-form-item>
<template slot="label">
@@ -34,7 +38,8 @@
<span>{{ i18n "reset" }}</span>
</template>
{{ i18n "pages.xray.wireguard.secretKey" }}
- <a-icon @click="[peer.publicKey, peer.privateKey] = Object.values(Wireguard.generateKeypair())" type="sync"></a-icon>
+ <a-icon @click="[peer.publicKey, peer.privateKey] = Object.values(Wireguard.generateKeypair())"
+ type="sync"></a-icon>
</a-tooltip>
</template>
<a-input v-model.trim="peer.privateKey"></a-input>
@@ -64,7 +69,8 @@
</template>
<template v-for="(aip, index) in peer.allowedIPs" :style="{ marginBottom: '10px' }">
<a-input v-model.trim="peer.allowedIPs[index]">
- <a-button icon="minus" v-if="peer.allowedIPs.length>1" slot="addonAfter" size="small" @click="peer.allowedIPs.splice(index, 1)"></a-button>
+ <a-button icon="minus" v-if="peer.allowedIPs.length>1" slot="addonAfter" size="small"
+ @click="peer.allowedIPs.splice(index, 1)"></a-button>
</a-input>
</template>
</a-form-item>