filtering: imp tests

This commit is contained in:
Stanislav Chzhen 2023-05-15 10:33:52 +03:00
parent 1f2ba07eae
commit b34a8c169c
2 changed files with 3 additions and 3 deletions

View file

@ -27,8 +27,8 @@ func (d *DNSFilter) processDNSRewrites(dnsr []*rules.NetworkRule) (res Result) {
slices.SortFunc(dnsr, rewriteSortsBefore)
for _, nr := range dnsr {
if containsWildcard(nr) {
for i, nr := range dnsr {
if i > 0 && containsWildcard(nr) {
break
}

View file

@ -204,7 +204,7 @@ func TestDNSFilter_CheckHostRules_dnsrewrite(t *testing.T) {
})
}
func TestDNSFilter_processDNSRewrites(t *testing.T) {
func TestDNSFilter_ProcessDNSRewrites(t *testing.T) {
const text = `
|www.example.com^$dnsrewrite=127.0.0.1
|*.example.com^$dnsrewrite=127.0.0.2