fix(rustproxy): Cancel connections for routes removed/disabled by adding per-route cancellation tokens and make RouteManager swappable (ArcSwap) for runtime updates
This commit is contained in:
@@ -7,10 +7,15 @@
|
||||
import { expect, tap } from '@git.zone/tstest/tapbundle';
|
||||
import { SmartProxy } from '../ts/proxies/smart-proxy/index.js';
|
||||
import type { IRouteConfig } from '../ts/proxies/smart-proxy/models/route-types.js';
|
||||
import { findFreePorts } from './helpers/port-allocator.js';
|
||||
|
||||
// Use unique high ports for each test to avoid conflicts
|
||||
let testPort = 20000;
|
||||
const getNextPort = () => testPort++;
|
||||
let testPorts: number[];
|
||||
let portIndex = 0;
|
||||
const getNextPort = () => testPorts[portIndex++];
|
||||
|
||||
tap.test('setup - allocate ports', async () => {
|
||||
testPorts = await findFreePorts(16);
|
||||
});
|
||||
|
||||
// --------------------------------- Single Route, No Domain Restriction ---------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user