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

@ -69,8 +69,7 @@ export interface IRouteContext {
*/
export interface IRouteTarget {
host: string | string[] | ((context: IRouteContext) => string | string[]); // Host or hosts with optional function for dynamic resolution
port: number | ((context: IRouteContext) => number); // Port with optional function for dynamic mapping
preservePort?: boolean; // Use incoming port as target port (ignored if port is a function)
port: number | 'preserve' | ((context: IRouteContext) => number); // Port with optional function for dynamic mapping (use 'preserve' to keep the incoming port)
}
/**