Add enabled local routing rules and gateway version reporting
This commit is contained in:
@@ -24,8 +24,9 @@ const subscriptionConfig = {
|
||||
test('client exposes one local proxy and routes local exceptions before the selected VPN', () => {
|
||||
const config = buildGatewayConfig(subscriptionConfig, 'test-vpn', {
|
||||
routeRules: [
|
||||
{ type: 'domain', value: 'example.com' },
|
||||
{ type: 'domain_keyword', value: 'cdn' },
|
||||
{ type: 'domain_suffix', value: 'ru', enabled: true },
|
||||
{ type: 'domain', value: 'example.com', enabled: true },
|
||||
{ type: 'domain_keyword', value: 'cdn', enabled: false },
|
||||
],
|
||||
});
|
||||
|
||||
@@ -34,7 +35,6 @@ test('client exposes one local proxy and routes local exceptions before the sele
|
||||
assert.deepEqual(config.route.rules, [
|
||||
{ domain_suffix: ['ru'], outbound: 'direct' },
|
||||
{ domain: ['example.com'], outbound: 'direct' },
|
||||
{ domain_keyword: ['cdn'], outbound: 'direct' },
|
||||
{ inbound: ['mixed-in'], outbound: 'test-vpn' },
|
||||
]);
|
||||
assert.equal(config.route.final, 'test-vpn');
|
||||
@@ -42,7 +42,10 @@ test('client exposes one local proxy and routes local exceptions before the sele
|
||||
});
|
||||
|
||||
test('client keeps its local proxy but routes directly when Harbor Gateway is ahead', () => {
|
||||
const config = buildGatewayConfig(subscriptionConfig, 'test-vpn', { clientDirect: true });
|
||||
const config = buildGatewayConfig(subscriptionConfig, 'test-vpn', {
|
||||
clientDirect: true,
|
||||
routeRules: [{ type: 'domain_suffix', value: 'ru', enabled: true }],
|
||||
});
|
||||
|
||||
assert.deepEqual(config.route.rules, [
|
||||
{ domain_suffix: ['ru'], outbound: 'direct' },
|
||||
|
||||
Reference in New Issue
Block a user