Преглед на файлове

random password button for kcp , quic

MHSanaei преди 1 година
родител
ревизия
eaec9e54ad
променени са 3 файла, в които са добавени 5 реда и са изтрити 3 реда
  1. 1 1
      web/assets/js/model/xray.js
  2. 2 1
      web/html/xui/form/stream/stream_kcp.html
  3. 2 1
      web/html/xui/form/stream/stream_quic.html

+ 1 - 1
web/assets/js/model/xray.js

@@ -425,7 +425,7 @@ class HttpStreamSettings extends XrayCommonClass {
 
 class QuicStreamSettings extends XrayCommonClass {
     constructor(security=VmessMethods.NONE,
-                key='', type='none') {
+                key=RandomUtil.randomSeq(10), type='none') {
         super();
         this.security = security;
         this.key = key;

+ 2 - 1
web/html/xui/form/stream/stream_kcp.html

@@ -12,7 +12,8 @@
     </a-form-item>
     <br>
     <a-form-item label='{{ i18n "password" }}'>
-        <a-input v-model="inbound.stream.kcp.seed"></a-input>
+        <a-icon @click="inbound.stream.kcp.seed = RandomUtil.randomSeq(10)" type="sync"> </a-icon>
+        <a-input v-model="inbound.stream.kcp.seed" style="width: 150px;" ></a-input>
     </a-form-item>
     <br>
     <a-form-item label="MTU">

+ 2 - 1
web/html/xui/form/stream/stream_quic.html

@@ -8,7 +8,8 @@
         </a-select>
     </a-form-item>
     <a-form-item label='{{ i18n "password" }}'>
-        <a-input v-model.trim="inbound.stream.quic.key"></a-input>
+        <a-icon @click="inbound.stream.quic.key = RandomUtil.randomSeq(10)" type="sync"> </a-icon>
+        <a-input v-model.trim="inbound.stream.quic.key" style="width: 150px;"></a-input>
     </a-form-item>
     <a-form-item label='{{ i18n "camouflage" }}'>
         <a-select v-model="inbound.stream.quic.type" style="width: 280px;" :dropdown-class-name="themeSwitcher.darkCardClass">