Bump Harbor versions and add direct .ru routing
This commit is contained in:
@@ -27,6 +27,7 @@ test('client exposes one local proxy and routes it through the selected VPN', ()
|
||||
assert.deepEqual(config.inbounds.map((inbound) => inbound.tag), ['mixed-in']);
|
||||
assert.equal(config.inbounds[0].listen_port, 8082);
|
||||
assert.deepEqual(config.route.rules, [
|
||||
{ domain_suffix: ['ru'], outbound: 'direct' },
|
||||
{ inbound: ['mixed-in'], outbound: 'test-vpn' },
|
||||
]);
|
||||
assert.equal(config.route.final, 'test-vpn');
|
||||
@@ -37,6 +38,7 @@ test('client keeps its local proxy but routes directly when Harbor Gateway is ah
|
||||
const config = buildGatewayConfig(subscriptionConfig, 'test-vpn', { clientDirect: true });
|
||||
|
||||
assert.deepEqual(config.route.rules, [
|
||||
{ domain_suffix: ['ru'], outbound: 'direct' },
|
||||
{ inbound: ['mixed-in'], outbound: 'direct' },
|
||||
]);
|
||||
assert.equal(config.route.final, 'direct');
|
||||
|
||||
@@ -21,11 +21,12 @@ const subscriptionConfig = {
|
||||
}],
|
||||
};
|
||||
|
||||
test('gateway routes transparent and proxy traffic only through the selected VPN', () => {
|
||||
test('gateway routes .ru domains directly and other traffic through the selected VPN', () => {
|
||||
const config = buildGatewayConfig(subscriptionConfig, 'test-vpn');
|
||||
|
||||
assert.deepEqual(config.route.rule_set, []);
|
||||
assert.deepEqual(config.route.rules, [
|
||||
{ domain_suffix: ['ru'], outbound: 'direct' },
|
||||
{ inbound: ['tproxy-in'], outbound: 'test-vpn' },
|
||||
{ inbound: ['mixed-in'], outbound: 'test-vpn' },
|
||||
]);
|
||||
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
createStateSnapshot,
|
||||
normalizeStoredState,
|
||||
} from '../../src/shared/contracts/state.js';
|
||||
import { HARBOR_VERSIONS } from '../../src/shared/versions.js';
|
||||
|
||||
const root = path.resolve(import.meta.dirname, '../..');
|
||||
|
||||
@@ -163,7 +164,7 @@ setInterval(() => {}, 60_000);
|
||||
assert.deepEqual(version, {
|
||||
apiVersion: 1,
|
||||
location: 'mac',
|
||||
components: { macClient: '0.1.0' },
|
||||
components: { macClient: HARBOR_VERSIONS.macClient },
|
||||
runtime: { singBox: '1.12.13' },
|
||||
});
|
||||
assertStateSnapshot(initial);
|
||||
|
||||
Reference in New Issue
Block a user