diff --git a/web/assets/js/model/inbound.js b/web/assets/js/model/inbound.js index 366cda5d..e2c9e092 100644 --- a/web/assets/js/model/inbound.js +++ b/web/assets/js/model/inbound.js @@ -1897,6 +1897,12 @@ Inbound.VLESSSettings = class extends Inbound.Settings { } static fromJson(json = {}) { + // Ensure testseed is always initialized as an array + let testseed = [900, 500, 900, 256]; + if (json.testseed && Array.isArray(json.testseed) && json.testseed.length >= 4) { + testseed = json.testseed; + } + const obj = new Inbound.VLESSSettings( Protocols.VLESS, (json.clients || []).map(client => Inbound.VLESSSettings.VLESS.fromJson(client)), @@ -1904,7 +1910,7 @@ Inbound.VLESSSettings = class extends Inbound.Settings { json.encryption, Inbound.VLESSSettings.Fallback.fromJson(json.fallbacks || []), json.selectedAuth, - json.testseed && json.testseed.length >= 4 ? json.testseed : [900, 500, 900, 256] + testseed ); return obj; } diff --git a/web/html/form/protocol/vless.html b/web/html/form/protocol/vless.html index 65e12a68..cc02d717 100644 --- a/web/html/form/protocol/vless.html +++ b/web/html/form/protocol/vless.html @@ -73,7 +73,7 @@