Add Harbor Gateway auto-detection for client routing
This commit is contained in:
@@ -32,3 +32,13 @@ test('client exposes one local proxy and routes it through the selected VPN', ()
|
||||
assert.equal(config.route.final, 'test-vpn');
|
||||
assert.equal(config.route.auto_detect_interface, undefined);
|
||||
});
|
||||
|
||||
test('client keeps its local proxy but routes directly when Harbor Gateway is ahead', () => {
|
||||
const config = buildGatewayConfig(subscriptionConfig, 'test-vpn', { clientDirect: true });
|
||||
|
||||
assert.deepEqual(config.route.rules, [
|
||||
{ inbound: ['mixed-in'], outbound: 'direct' },
|
||||
]);
|
||||
assert.equal(config.route.final, 'direct');
|
||||
assert.deepEqual(config.outbounds.map((outbound) => outbound.tag), ['direct', 'block']);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user