fix(smartproxy): Update dynamic port mapping to support

This commit is contained in:
2025-05-14 18:35:06 +00:00
parent 2d6f06a9b3
commit 340823296a
8 changed files with 495 additions and 10 deletions

View File

@ -447,6 +447,8 @@ export class NetworkProxy implements IMetricsTracker {
// Create legacy proxy configs for the router
// This is only needed for backward compatibility with ProxyRouter
const defaultPort = 443; // Default port for HTTPS when using 'preserve'
// and will be removed in the future
const legacyConfigs: IReverseProxyConfig[] = [];
@ -472,7 +474,8 @@ export class NetworkProxy implements IMetricsTracker {
? route.action.target.host
: [route.action.target.host];
const targetPort = route.action.target.port;
// Handle 'preserve' port value
const targetPort = route.action.target.port === 'preserve' ? defaultPort : route.action.target.port;
// Get certificate information
const certData = certificateUpdates.get(domain);