🏗️ refactor ServerService to enhance HTTP proxy configuration handling and include basic authentication support

This commit is contained in:
刘嘉伟 2025-02-26 16:45:18 +08:00
parent e6992f4e4c
commit 50adc33aef

View File

@ -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" ||