From be8a8fc2b559eb92816940c93eff5a39f57a35b7 Mon Sep 17 00:00:00 2001 From: Ziyunhui Date: Mon, 5 Aug 2024 21:36:45 +0800 Subject: [PATCH] fix bug --- index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index e0b7e1b..6d8c8f2 100644 --- a/index.ts +++ b/index.ts @@ -13,8 +13,8 @@ let api = new RouterOSAPI({ password: cfg.password, }); -const maincidr = cfg.maincidr; -const proxycidr = cfg.proxycidr; +let maincidr = cfg.maincidr; +let proxycidr = cfg.proxycidr; let haslogin = cfg.login; type Device = { @@ -62,6 +62,8 @@ const server = serve({ data.main, data.proxy ); + maincidr = data.main; + proxycidr = data.proxy; console.log('配置文件已更新'); return new Response('登入成功'); } else {