diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-06-09 15:34:57 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-06-09 15:34:57 +0300 |
| commit | 7fc3d3785160faddfd8745da063265ab50ee1753 (patch) | |
| tree | 76e5c89bbe1d45cc38cfbdca207525b445ece5ae /web/html/xui/form | |
| parent | 81aa3ed10e521d5c65b43d5f336a285abc89a553 (diff) | |
random password button for SS & more
crypto.getRandomValues for uuid
change name randomText to randomLowerAndNum
Diffstat (limited to 'web/html/xui/form')
| -rw-r--r-- | web/html/xui/form/client.html | 4 | ||||
| -rw-r--r-- | web/html/xui/form/protocol/shadowsocks.html | 5 | ||||
| -rw-r--r-- | web/html/xui/form/protocol/trojan.html | 4 | ||||
| -rw-r--r-- | web/html/xui/form/protocol/vless.html | 4 | ||||
| -rw-r--r-- | web/html/xui/form/protocol/vmess.html | 4 | ||||
| -rw-r--r-- | web/html/xui/form/tls_settings.html | 2 |
6 files changed, 12 insertions, 11 deletions
diff --git a/web/html/xui/form/client.html b/web/html/xui/form/client.html index cfac5cff..bd6b08af 100644 --- a/web/html/xui/form/client.html +++ b/web/html/xui/form/client.html @@ -18,7 +18,7 @@ </template> </a-tooltip> </span> - <a-icon @click="client.email = RandomUtil.randomText(8)" type="sync"> </a-icon> + <a-icon @click="client.email = RandomUtil.randomLowerAndNum(8)" type="sync"> </a-icon> <a-input v-model.trim="client.email" style="width: 200px;"></a-input> </a-form-item> <a-form-item label="Password" v-if="inbound.protocol === Protocols.TROJAN || inbound.protocol === Protocols.SHADOWSOCKS"> @@ -44,7 +44,7 @@ <a-icon type="question-circle" theme="filled"></a-icon> </a-tooltip> </span> - <a-icon @click="client.subId = RandomUtil.randomText(16)" type="sync"> </a-icon> + <a-icon @click="client.subId = RandomUtil.randomLowerAndNum(16)" type="sync"> </a-icon> <a-input v-model.trim="client.subId" style="width: 150px;"></a-input> </a-form-item> <a-form-item v-if="client.email && app.tgBotEnable" > diff --git a/web/html/xui/form/protocol/shadowsocks.html b/web/html/xui/form/protocol/shadowsocks.html index e4eaf155..e9b01ea5 100644 --- a/web/html/xui/form/protocol/shadowsocks.html +++ b/web/html/xui/form/protocol/shadowsocks.html @@ -11,7 +11,7 @@ </template> </a-tooltip> </span> - <a-icon @click="client.email = RandomUtil.randomText(8)" type="sync"> </a-icon> + <a-icon @click="client.email = RandomUtil.randomLowerAndNum(8)" type="sync"> </a-icon> <a-input v-model.trim="client.email" style="width: 200px;"></a-input> </a-form-item> <a-form-item label="Password"> @@ -28,7 +28,7 @@ <a-icon type="question-circle" theme="filled"></a-icon> </a-tooltip> </span> - <a-icon @click="client.subId = RandomUtil.randomText(16)" type="sync"> </a-icon> + <a-icon @click="client.subId = RandomUtil.randomLowerAndNum(16)" type="sync"> </a-icon> <a-input v-model.trim="client.subId" style="width: 150px;"></a-input> </a-form-item> <a-form-item v-if="client.email && app.tgBotEnable"> @@ -112,6 +112,7 @@ </a-select> </a-form-item> <a-form-item label='{{ i18n "password" }}'> + <a-icon @click="inbound.settings.password = RandomUtil.randomShadowsocksPassword()" type="sync"> </a-icon> <a-input v-model.trim="inbound.settings.password" style="width: 250px;"></a-input> </a-form-item> <a-form-item label='{{ i18n "pages.inbounds.network" }}'> diff --git a/web/html/xui/form/protocol/trojan.html b/web/html/xui/form/protocol/trojan.html index cf56f438..f494adb9 100644 --- a/web/html/xui/form/protocol/trojan.html +++ b/web/html/xui/form/protocol/trojan.html @@ -11,7 +11,7 @@ </template> </a-tooltip> </span> - <a-icon @click="client.email = RandomUtil.randomText(8)" type="sync"> </a-icon> + <a-icon @click="client.email = RandomUtil.randomLowerAndNum(8)" type="sync"> </a-icon> <a-input v-model.trim="client.email" style="width: 200px;"></a-input> </a-form-item> <a-form-item label="Password"> @@ -28,7 +28,7 @@ <a-icon type="question-circle" theme="filled"></a-icon> </a-tooltip> </span> - <a-icon @click="client.subId = RandomUtil.randomText(16)" type="sync"> </a-icon> + <a-icon @click="client.subId = RandomUtil.randomLowerAndNum(16)" type="sync"> </a-icon> <a-input v-model.trim="client.subId" style="width: 150px;"></a-input> </a-form-item> <a-form-item v-if="client.email && app.tgBotEnable"> diff --git a/web/html/xui/form/protocol/vless.html b/web/html/xui/form/protocol/vless.html index 59ba7672..f661a839 100644 --- a/web/html/xui/form/protocol/vless.html +++ b/web/html/xui/form/protocol/vless.html @@ -11,7 +11,7 @@ </template> </a-tooltip> </span> - <a-icon @click="client.email = RandomUtil.randomText(8)" type="sync"> </a-icon> + <a-icon @click="client.email = RandomUtil.randomLowerAndNum(8)" type="sync"> </a-icon> <a-input v-model.trim="client.email" style="width: 200px;"></a-input> </a-form-item> <a-form-item label="ID"> @@ -28,7 +28,7 @@ <a-icon type="question-circle" theme="filled"></a-icon> </a-tooltip> </span> - <a-icon @click="client.subId = RandomUtil.randomText(16)" type="sync"> </a-icon> + <a-icon @click="client.subId = RandomUtil.randomLowerAndNum(16)" type="sync"> </a-icon> <a-input v-model.trim="client.subId" style="width: 150px;"></a-input> </a-form-item> <a-form-item v-if="client.email && app.tgBotEnable"> diff --git a/web/html/xui/form/protocol/vmess.html b/web/html/xui/form/protocol/vmess.html index de6e5250..6dd31307 100644 --- a/web/html/xui/form/protocol/vmess.html +++ b/web/html/xui/form/protocol/vmess.html @@ -11,7 +11,7 @@ </template> </a-tooltip> </span> - <a-icon @click="client.email = RandomUtil.randomText(8)" type="sync"> </a-icon> + <a-icon @click="client.email = RandomUtil.randomLowerAndNum(8)" type="sync"> </a-icon> <a-input v-model.trim="client.email" style="width: 200px;"></a-input> </a-form-item> <br> @@ -33,7 +33,7 @@ <a-icon type="question-circle" theme="filled"></a-icon> </a-tooltip> </span> - <a-icon @click="client.subId = RandomUtil.randomText(16)" type="sync"> </a-icon> + <a-icon @click="client.subId = RandomUtil.randomLowerAndNum(16)" type="sync"> </a-icon> <a-input v-model.trim="client.subId" style="width: 150px;"></a-input> </a-form-item> <a-form-item v-if="client.email && app.tgBotEnable"> diff --git a/web/html/xui/form/tls_settings.html b/web/html/xui/form/tls_settings.html index d0692e13..58edf992 100644 --- a/web/html/xui/form/tls_settings.html +++ b/web/html/xui/form/tls_settings.html @@ -187,7 +187,7 @@ <a-input v-model.trim="inbound.stream.reality.serverNames" style="width: 300px"></a-input> </a-form-item> <a-form-item label="ShortIds"> - <a-icon @click="inbound.stream.reality.shortIds = RandomUtil.randomShortId(8)" type="sync"> </a-icon> + <a-icon @click="inbound.stream.reality.shortIds = RandomUtil.randomShortId()" type="sync"> </a-icon> <a-input v-model.trim="inbound.stream.reality.shortIds" style="width: 150px;"></a-input> </a-form-item> <br> |
