From 50adc33aefcad3025a2ee8752dcb57d168cd9cc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=98=89=E4=BC=9F?= <8473136@qq.com> Date: Wed, 26 Feb 2025 16:45:18 +0800 Subject: [PATCH] :building_construction: refactor ServerService to enhance HTTP proxy configuration handling and include basic authentication support --- electron/service/ServerService.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/electron/service/ServerService.ts b/electron/service/ServerService.ts index f6b0ab1..d08b732 100644 --- a/electron/service/ServerService.ts +++ b/electron/service/ServerService.ts @@ -107,8 +107,17 @@ remotePort = {{ $v.Second }} remotePort: remotePort }; } else if (proxy.type === "http" || proxy.type === "https") { - const { _id, status, ...frpProxyConfig } = proxy; - return frpProxyConfig; + return { + name: proxy.name, + type: proxy.type, + localIP: proxy.localIP, + localPort: parseInt(proxy.localPort), + customDomains: proxy.customDomains, + subdomain: proxy.subdomain, + ...(proxy.basicAuth + ? { httpUser: proxy.httpUser, httpPassword: proxy.httpPassword } + : {}) + }; } else if ( proxy.type === "stcp" || proxy.type === "xtcp" ||