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/dokodemo.html20
-rw-r--r--web/html/form/protocol/http.html26
-rw-r--r--web/html/form/protocol/shadowsocks.html50
-rw-r--r--web/html/form/protocol/socks.html34
-rw-r--r--web/html/form/protocol/trojan.html50
-rw-r--r--web/html/form/protocol/vless.html50
-rw-r--r--web/html/form/protocol/vmess.html23
-rw-r--r--web/html/form/protocol/wireguard.html76
8 files changed, 329 insertions, 0 deletions
diff --git a/web/html/form/protocol/dokodemo.html b/web/html/form/protocol/dokodemo.html
new file mode 100644
index 00000000..70ffe7e0
--- /dev/null
+++ b/web/html/form/protocol/dokodemo.html
@@ -0,0 +1,20 @@
+{{define "form/dokodemo"}}
+<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
+ <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-number v-model.number="inbound.settings.port"></a-input-number>
+ </a-form-item>
+ <a-form-item label='{{ i18n "pages.inbounds.network"}}'>
+ <a-select v-model="inbound.settings.network" :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='Follow Redirect'>
+ <a-switch v-model="inbound.settings.followRedirect"></a-switch>
+ </a-form-item>
+</a-form>
+{{end}}
diff --git a/web/html/form/protocol/http.html b/web/html/form/protocol/http.html
new file mode 100644
index 00000000..fb1d74b0
--- /dev/null
+++ b/web/html/form/protocol/http.html
@@ -0,0 +1,26 @@
+{{define "form/http"}}
+<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
+ <table :style="{ width: '100%', textAlign: 'center', margin: '1rem 0' }">
+ <tr>
+ <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.HttpSettings.HttpAccount())"></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>
+ <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>
+ </template>
+ </a-input>
+ </a-input-group>
+ <a-form-item label="Allow Transparent">
+ <a-switch v-model="inbound.settings.allowTransparent" />
+ </a-form-item>
+</a-form>
+{{end}}
diff --git a/web/html/form/protocol/shadowsocks.html b/web/html/form/protocol/shadowsocks.html
new file mode 100644
index 00000000..b9813afb
--- /dev/null
+++ b/web/html/form/protocol/shadowsocks.html
@@ -0,0 +1,50 @@
+{{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>
+</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()" 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
new file mode 100644
index 00000000..e126c51c
--- /dev/null
+++ b/web/html/form/protocol/socks.html
@@ -0,0 +1,34 @@
+{{define "form/socks"}}
+<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>
+ <a-form-item label="IP" v-if="inbound.settings.udp">
+ <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-form-item>
+ <template v-if="inbound.settings.auth === 'password'">
+ <table :style="{ width: '100%', textAlign: 'center', margin: '1rem 0' }">
+ <tr>
+ <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.SocksSettings.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>
+ <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>
+ </template>
+ </a-input>
+ </a-input-group>
+ </template>
+</a-form>
+{{end}}
diff --git a/web/html/form/protocol/trojan.html b/web/html/form/protocol/trojan.html
new file mode 100644
index 00000000..fc327721
--- /dev/null
+++ b/web/html/form/protocol/trojan.html
@@ -0,0 +1,50 @@
+{{define "form/trojan"}}
+<a-collapse activeKey="0" v-for="(client, index) in inbound.settings.trojans.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.trojans.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.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>
+
+ <!-- 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}}
diff --git a/web/html/form/protocol/vless.html b/web/html/form/protocol/vless.html
new file mode 100644
index 00000000..3cebda6e
--- /dev/null
+++ b/web/html/form/protocol/vless.html
@@ -0,0 +1,50 @@
+{{define "form/vless"}}
+<a-collapse activeKey="0" v-for="(client, index) in inbound.settings.vlesses.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.vlesses.length">
+ <table width="100%">
+ <tr class="client-table-header">
+ <th>{{ i18n "pages.inbounds.email" }}</th>
+ <th>ID</th>
+ </tr>
+ <tr v-for="(client, index) in inbound.settings.vlesses" :class="index % 2 == 1 ? 'client-table-odd-row' : ''">
+ <td>[[ client.email ]]</td>
+ <td>[[ client.id ]]</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>
+
+ <!-- vless 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}}
diff --git a/web/html/form/protocol/vmess.html b/web/html/form/protocol/vmess.html
new file mode 100644
index 00000000..3c5200ac
--- /dev/null
+++ b/web/html/form/protocol/vmess.html
@@ -0,0 +1,23 @@
+{{define "form/vmess"}}
+<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>
+</a-collapse>
+<a-collapse v-else>
+ <a-collapse-panel :header="'{{ i18n "pages.client.clientCount"}} : ' + inbound.settings.vmesses.length">
+ <table width="100%">
+ <tr class="client-table-header">
+ <th>{{ i18n "pages.inbounds.email" }}</th>
+ <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' : ''">
+ <td>[[ client.email ]]</td>
+ <td>[[ client.id ]]</td>
+ <td>[[ client.security ]]</td>
+ </tr>
+ </table>
+ </a-collapse-panel>
+</a-collapse>
+{{end}}
diff --git a/web/html/form/protocol/wireguard.html b/web/html/form/protocol/wireguard.html
new file mode 100644
index 00000000..51fc4f02
--- /dev/null
+++ b/web/html/form/protocol/wireguard.html
@@ -0,0 +1,76 @@
+{{define "form/wireguard"}}
+<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 "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-tooltip>
+ </template>
+ <a-input v-model.trim="inbound.settings.secretKey"></a-input>
+ </a-form-item>
+ <a-form-item label='{{ i18n "pages.xray.wireguard.publicKey" }}'>
+ <a-input disabled v-model="inbound.settings.pubKey"></a-input>
+ </a-form-item>
+ <a-form-item label='MTU'>
+ <a-input-number v-model.number="inbound.settings.mtu"></a-input-number>
+ </a-form-item>
+ <a-form-item label='No Kernel Tun'>
+ <a-switch v-model="inbound.settings.noKernelTun"></a-switch>
+ </a-form-item>
+ <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-divider>
+ <a-form-item>
+ <template slot="label">
+ <a-tooltip>
+ <template slot="title">
+ <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-tooltip>
+ </template>
+ <a-input v-model.trim="peer.privateKey"></a-input>
+ </a-form-item>
+ <a-form-item>
+ <template slot="label">
+ {{ i18n "pages.xray.wireguard.publicKey" }}
+ </template>
+ <a-input v-model.trim="peer.publicKey"></a-input>
+ </a-form-item>
+ <a-form-item>
+ <template slot="label">
+ <a-tooltip>
+ <template slot="title">
+ <span>{{ i18n "reset" }}</span>
+ </template>
+ {{ i18n "pages.xray.wireguard.psk" }}
+ <a-icon @click="peer.psk = Wireguard.keyToBase64(Wireguard.generatePresharedKey())" type="sync"></a-icon>
+ </a-tooltip>
+ </template>
+ <a-input v-model.trim="peer.psk"></a-input>
+ </a-form-item>
+ <a-form-item>
+ <template slot="label">
+ {{ i18n "pages.xray.wireguard.allowedIPs" }}
+ <a-button icon="plus" type="primary" size="small" @click="peer.allowedIPs.push('')"></a-button>
+ </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-input>
+ </template>
+ </a-form-item>
+ <a-form-item label='Keep Alive'>
+ <a-input-number v-model.number="peer.keepAlive" :min="0"></a-input-number>
+ </a-form-item>
+ </a-form>
+</a-form>
+{{end}} \ No newline at end of file