Selaa lähdekoodia

Add None option VLESS auth selection

MHSanaei 4 päivää sitten
vanhempi
sitoutus
0a38624ba7
2 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. 1 0
      web/html/form/protocol/vless.html
  2. 6 1
      web/html/modals/inbound_modal.html

+ 1 - 0
web/html/form/protocol/vless.html

@@ -25,6 +25,7 @@
       <a-form-item label="Authentication">
         <a-select v-model="inbound.settings.selectedAuth" @change="getNewVlessEnc"
           :dropdown-class-name="themeSwitcher.currentTheme">
+          <a-select-option :value="undefined">None</a-select-option>
           <a-select-option value="X25519, not Post-Quantum">X25519 (not
             Post-Quantum)</a-select-option>
           <a-select-option value="ML-KEM-768, Post-Quantum">ML-KEM-768

+ 6 - 1
web/html/modals/inbound_modal.html

@@ -307,6 +307,12 @@
                 this.inbound.stream.tls.settings.echConfigList = "";
             },
             async getNewVlessEnc() {
+                const selected = inModal.inbound.settings.selectedAuth;
+                if (!selected) {
+                    this.clearVlessEnc();
+                    return;
+                }
+
                 inModal.loading(true);
                 const msg = await HttpUtil.get("/panel/api/server/getNewVlessEnc");
                 inModal.loading(false);
@@ -316,7 +322,6 @@
                 }
 
                 const auths = msg.obj.auths || [];
-                const selected = inModal.inbound.settings.selectedAuth;
                 const block = auths.find((a) => a.label === selected);
 
                 if (!block) {