Skip to content

Commit 82db786

Browse files
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.
1 parent 9c60a65 commit 82db786

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

hscontrol/types/config_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,8 @@ func TestReadConfig(t *testing.T) {
262262
{Addr: "1.0.0.1"},
263263
},
264264
Routes: map[string][]*dnstype.Resolver{
265-
"foo.bar.com": {{Addr: "8.8.8.8", UseWithExitNode: true}},
265+
"foo.bar.com": {{Addr: "8.8.8.8", UseWithExitNode: true}},
266+
"baz.example.com": {{Addr: "9.9.9.9"}},
266267
},
267268
},
268269
},

hscontrol/types/testdata/dns-use-with-exit-node.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ dns:
2121
split:
2222
foo.bar.com:
2323
- 8.8.8.8
24+
baz.example.com:
25+
- 9.9.9.9
2426
use_with_exit_node:
2527
- 1.1.1.1
2628
- 8.8.8.8

0 commit comments

Comments
 (0)