From 96c49fe02a4145300dd8a49d50a1fb6ee3ea2a5b Mon Sep 17 00:00:00 2001 From: Nelson Jeppesen <50854675+NelsonJeppesen@users.noreply.github.com> Date: Thu, 9 Jul 2026 12:35:44 -0700 Subject: [PATCH] types: cover split-DNS selectivity for use_with_exit_node Assert a listed split-domain resolver keeps UseWithExitNode while an unlisted split resolver in another domain does not, matching the client's per-resolver useWithExitNodeRoutes filtering. --- hscontrol/types/config_test.go | 3 ++- hscontrol/types/testdata/dns-use-with-exit-node.yaml | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hscontrol/types/config_test.go b/hscontrol/types/config_test.go index 27f28db58..a53f64296 100644 --- a/hscontrol/types/config_test.go +++ b/hscontrol/types/config_test.go @@ -262,7 +262,8 @@ func TestReadConfig(t *testing.T) { {Addr: "1.0.0.1"}, }, Routes: map[string][]*dnstype.Resolver{ - "foo.bar.com": {{Addr: "8.8.8.8", UseWithExitNode: true}}, + "foo.bar.com": {{Addr: "8.8.8.8", UseWithExitNode: true}}, + "baz.example.com": {{Addr: "9.9.9.9"}}, }, }, }, diff --git a/hscontrol/types/testdata/dns-use-with-exit-node.yaml b/hscontrol/types/testdata/dns-use-with-exit-node.yaml index 79db7c27b..1132748f4 100644 --- a/hscontrol/types/testdata/dns-use-with-exit-node.yaml +++ b/hscontrol/types/testdata/dns-use-with-exit-node.yaml @@ -21,6 +21,8 @@ dns: split: foo.bar.com: - 8.8.8.8 + baz.example.com: + - 9.9.9.9 use_with_exit_node: - 1.1.1.1 - 8.8.8.8