Pull request: 3998 Make hosts rules match exactly
Merge in DNS/adguard-home from 3998-fix-hosts-gen to master Closes #3998 Squashed commit of the following: commit b565d51afb6c292dd16accd45b7d37ed386714e8 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Dec 23 16:25:02 2021 +0300 aghnet: make hosts rules match exactly
This commit is contained in:
@@ -346,6 +346,24 @@ func TestHostsContainer(t *testing.T) {
|
||||
testTail: func(t *testing.T, res *urlfilter.DNSResult) {
|
||||
assert.Equal(t, "hello", nRewrites(t, res, 1)[0].NewCNAME)
|
||||
},
|
||||
}, {
|
||||
name: "hello_subdomain",
|
||||
req: urlfilter.DNSRequest{
|
||||
Hostname: "say.hello",
|
||||
DNSType: dns.TypeA,
|
||||
},
|
||||
testTail: func(t *testing.T, res *urlfilter.DNSResult) {
|
||||
assert.Empty(t, res.DNSRewrites())
|
||||
},
|
||||
}, {
|
||||
name: "hello_alias_subdomain",
|
||||
req: urlfilter.DNSRequest{
|
||||
Hostname: "say.hello.world",
|
||||
DNSType: dns.TypeA,
|
||||
},
|
||||
testTail: func(t *testing.T, res *urlfilter.DNSResult) {
|
||||
assert.Empty(t, res.DNSRewrites())
|
||||
},
|
||||
}, {
|
||||
name: "lots_of_aliases",
|
||||
req: urlfilter.DNSRequest{
|
||||
|
||||
Reference in New Issue
Block a user