Add home bypass mode for the Mac client
This commit is contained in:
@@ -45,3 +45,17 @@ test("client mode routes mixed proxy fallback to the selected VPN", () => {
|
||||
{ inbound: ["mixed-in"], outbound: "test-vpn" },
|
||||
]);
|
||||
});
|
||||
|
||||
test("client home bypass routes the local proxy directly", () => {
|
||||
fs.writeFileSync(
|
||||
path.join(process.env.DATA_DIR, "client-settings.json"),
|
||||
JSON.stringify({ homeBypassEnabled: true }),
|
||||
);
|
||||
|
||||
const config = buildGatewayConfig(subscriptionConfig, "test-vpn");
|
||||
|
||||
assert.deepEqual(config.route.rule_set, []);
|
||||
assert.deepEqual(config.route.rules, [
|
||||
{ inbound: ["mixed-in"], outbound: "direct" },
|
||||
]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user