From 582a4ab81987cdcc8fea93737300ba9c7e641260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=91=E5=85=88=E6=A3=AE?= Date: Thu, 19 Dec 2024 17:23:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AD=90=E7=BD=91=E4=BB=A3?= =?UTF-8?q?=E7=90=86=E4=BD=BF=E7=94=A8=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pages/index.vue b/pages/index.vue index b20b9cd..0bee678 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1099,13 +1099,15 @@ args.push("-l", config.port); } if (mainStore.cidrEnable && config.proxyNetworks) { - let formatProxyNetworks = config.proxyNetworks.split("\n"); + let formatProxyNetworks = config.proxyNetworks.trim().split("\n"); const newformatProxyNetworks = formatProxyNetworks .map(el => el.trim()) .filter(cidr => { return /^\d+\.\d+\.\d+\.\d+\/\d+$/g.test(cidr); }); - args.push("--proxy-networks", ...newformatProxyNetworks); + if(newformatProxyNetworks.length > 0) { + args.push("--proxy-networks", ...newformatProxyNetworks); + } config.proxyNetworks = formatProxyNetworks.join("\n"); } if (config.disableEncryption) {