Update Harbor client and gateway functionality
This commit is contained in:
@@ -21,9 +21,13 @@ const subscriptionConfig = {
|
||||
}],
|
||||
};
|
||||
|
||||
test('gateway routes .ru domains directly and other traffic through the selected VPN', () => {
|
||||
test('gateway preserves mixed user-rule order and dynamic VPN target', () => {
|
||||
const config = buildGatewayConfig(subscriptionConfig, 'test-vpn', {
|
||||
routeRules: [{ type: 'domain_suffix', value: 'ru', enabled: true }],
|
||||
routeRules: [
|
||||
{ type: 'domain', value: 'api.example.com', enabled: true, outbound: 'vpn' },
|
||||
{ type: 'domain_suffix', value: 'example.com', enabled: true, outbound: 'direct' },
|
||||
{ type: 'domain_keyword', value: 'disabled', enabled: false, outbound: 'vpn' },
|
||||
],
|
||||
});
|
||||
|
||||
assert.deepEqual(config.route.rule_set, []);
|
||||
@@ -47,7 +51,8 @@ test('gateway routes .ru domains directly and other traffic through the selected
|
||||
timeout: '1s',
|
||||
},
|
||||
{ inbound: ['diagnostics-vpn-in'], outbound: 'test-vpn' },
|
||||
{ domain_suffix: ['ru'], outbound: 'direct' },
|
||||
{ domain: ['api.example.com'], outbound: 'test-vpn' },
|
||||
{ domain_suffix: ['example.com'], outbound: 'direct' },
|
||||
{ inbound: ['tproxy-in'], outbound: 'test-vpn' },
|
||||
{ inbound: ['mixed-in'], outbound: 'test-vpn' },
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user