fix(proxy): improve connection cleanup and route validation handling

This commit is contained in:
2026-03-25 07:22:17 +00:00
parent 34dc0cb9b6
commit 53dee1fffc
12 changed files with 689 additions and 623 deletions

View File

@@ -69,14 +69,15 @@ export function createOffsetPortMappingRoute(options: {
priority?: number;
[key: string]: any;
}): IRouteConfig {
const { ports, targetHost, offset, name, domains, priority, ...rest } = options;
return createPortMappingRoute({
sourcePortRange: options.ports,
targetHost: options.targetHost,
portMapper: (context) => context.port + options.offset,
name: options.name || `Offset Mapping (${options.offset > 0 ? '+' : ''}${options.offset}) for ${options.domains || 'all domains'}`,
domains: options.domains,
priority: options.priority,
...options
sourcePortRange: ports,
targetHost,
portMapper: (context) => context.port + offset,
name: name || `Offset Mapping (${offset > 0 ? '+' : ''}${offset}) for ${domains || 'all domains'}`,
domains,
priority,
...rest
});
}