feat(PortProxy): Enhanced PortProxy with domain and IP filtering, SNI support, and minimatch integration

This commit is contained in:
2025-02-21 15:14:02 +00:00
parent e67eff0fcc
commit a4ad6c59c1
7 changed files with 79 additions and 7 deletions

View File

@ -58,7 +58,11 @@ function createTestClient(port: number, data: string): Promise<string> {
// Setup test environment
tap.test('setup port proxy test environment', async () => {
testServer = await createTestServer(TEST_SERVER_PORT);
portProxy = new PortProxy(PROXY_PORT, TEST_SERVER_PORT);
portProxy = new PortProxy(PROXY_PORT, TEST_SERVER_PORT, {
domains: [],
sniEnabled: false,
defaultAllowedIPs: ['127.0.0.1', '::ffff:127.0.0.1']
});
});
tap.test('should start port proxy', async () => {