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>2024-02-18 00:16:49 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2024-02-18 00:16:49 +0300
commit61489077d7d5740250702c68846abae6a3598c6f (patch)
treefd14eb27a4ac981a50b7b63b5f445d656e159a8b /web/html/xui/form
parent4621933e5bad743aafd2b15bd72ed99069df99ad (diff)
[wg] auto multi-peer and qrcode
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web/html/xui/form')
-rw-r--r--web/html/xui/form/outbound.html35
-rw-r--r--web/html/xui/form/protocol/wireguard.html12
2 files changed, 18 insertions, 29 deletions
diff --git a/web/html/xui/form/outbound.html b/web/html/xui/form/outbound.html
index fb6a7af7..469c42b9 100644
--- a/web/html/xui/form/outbound.html
+++ b/web/html/xui/form/outbound.html
@@ -134,28 +134,10 @@
<a-form-item label='{{ i18n "pages.xray.wireguard.endpoint" }}'>
<a-input v-model.trim="peer.endpoint"></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.publicKey" }}
- <a-icon @click="peer.publicKey = publicKey=Wireguard.generateKeypair().publicKey"type="sync"> </a-icon>
- </a-tooltip>
- </template>
+ <a-form-item label='{{ i18n "pages.xray.wireguard.publicKey" }}'>
<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 = publicKey=Wireguard.generateKeypair().publicKey"type="sync"> </a-icon>
- </a-tooltip>
- </template>
+ <a-form-item label='{{ i18n "pages.xray.wireguard.psk" }}'>
<a-input v-model.trim="peer.psk"></a-input>
</a-form-item>
<a-form-item>
@@ -189,7 +171,6 @@
<a-form-item label='ID'>
<a-input v-model.trim="outbound.settings.id"></a-input>
</a-form-item>
-
<!-- vless settings -->
<template v-if="outbound.canEnableTlsFlow()">
<a-form-item label='Flow'>
@@ -212,9 +193,8 @@
<a-input v-model.trim="outbound.settings.pass"></a-input>
</a-form-item>
</template>
-
<!-- trojan/shadowsocks -->
- <template v-if="[Protocols.Trojan, Protocols.Shadowsocks].includes(outbound.protocol)">
+<template v-if="[Protocols.Trojan, Protocols.Shadowsocks].includes(outbound.protocol)">
<a-form-item label='{{ i18n "password" }}'>
<a-input v-model.trim="outbound.settings.password"></a-input>
</a-form-item>
@@ -369,13 +349,15 @@
<a-input v-model.trim="outbound.stream.tls.serverName"></a-input>
</a-form-item>
<a-form-item label="uTLS">
- <a-select v-model="outbound.stream.tls.fingerprint" :dropdown-class-name="themeSwitcher.currentTheme">
+ <a-select v-model="outbound.stream.tls.fingerprint"
+ :dropdown-class-name="themeSwitcher.currentTheme">
<a-select-option value=''>None</a-select-option>
<a-select-option v-for="key in UTLS_FINGERPRINT" :value="key">[[ key ]]</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="ALPN">
- <a-select mode="multiple" :dropdown-class-name="themeSwitcher.currentTheme"
+ <a-select mode="multiple"
+ :dropdown-class-name="themeSwitcher.currentTheme"
v-model="outbound.stream.tls.alpn">
<a-select-option v-for="alpn in ALPN_OPTION" :value="alpn">[[ alpn ]]</a-select-option>
</a-select>
@@ -391,7 +373,8 @@
<a-input v-model.trim="outbound.stream.reality.serverName"></a-input>
</a-form-item>
<a-form-item label="uTLS">
- <a-select v-model="outbound.stream.reality.fingerprint" :dropdown-class-name="themeSwitcher.currentTheme">
+ <a-select v-model="outbound.stream.reality.fingerprint"
+ :dropdown-class-name="themeSwitcher.currentTheme">
<a-select-option v-for="key in UTLS_FINGERPRINT" :value="key">[[ key ]]</a-select-option>
</a-select>
</a-form-item>
diff --git a/web/html/xui/form/protocol/wireguard.html b/web/html/xui/form/protocol/wireguard.html
index ea2c3427..c618a770 100644
--- a/web/html/xui/form/protocol/wireguard.html
+++ b/web/html/xui/form/protocol/wireguard.html
@@ -38,10 +38,16 @@
<template slot="title">
<span>{{ i18n "reset" }}</span>
</template>
- {{ i18n "pages.xray.wireguard.publicKey" }}
- <a-icon @click="peer.publicKey = publicKey=Wireguard.generateKeypair().publicKey"type="sync"> </a-icon>
+ {{ 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>
@@ -51,7 +57,7 @@
<span>{{ i18n "reset" }}</span>
</template>
{{ i18n "pages.xray.wireguard.psk" }}
- <a-icon @click="peer.psk = publicKey=Wireguard.generateKeypair().publicKey"type="sync"> </a-icon>
+ <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>