all: partially sync with master; upd chlog

This commit is contained in:
Ainar Garipov
2024-03-06 18:33:53 +03:00
parent 48d1c673a9
commit fbc0d981ba
71 changed files with 557 additions and 210 deletions

View File

@@ -1113,8 +1113,7 @@ func (d *DNSFilter) periodicallyRefreshFilters(ivl time.Duration) (nextIvl time.
ivl = maxInterval
} else if isNetErr {
ivl *= 2
// TODO(s.chzhen): Use built-in function max in Go 1.21.
ivl = mathutil.Max(ivl, maxInterval)
ivl = max(ivl, maxInterval)
}
return ivl

View File

@@ -7,7 +7,6 @@ import (
"github.com/AdguardTeam/golibs/errors"
"github.com/AdguardTeam/golibs/log"
"github.com/AdguardTeam/golibs/mathutil"
"github.com/miekg/dns"
"golang.org/x/exp/slices"
)
@@ -181,7 +180,7 @@ func findRewrites(
if isWildcard(r.Domain) {
// Don't use rewrites[:0], because we need to return at least one
// item here.
rewrites = rewrites[:mathutil.Max(1, i)]
rewrites = rewrites[:max(1, i)]
break
}

View File

@@ -475,6 +475,14 @@ var blockedServices = []blockedService{{
"||bnet.163.com^",
"||bnet.cn^",
},
}, {
ID: "bluesky",
Name: "Bluesky",
IconSVG: []byte("<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" viewBox=\"0 -33 568 568\"><path d=\"M123.12 33.66C188.24 82.56 258.28 181.68 284 234.87c25.72-53.19 95.76-152.32 160.88-201.2C491.87-1.62 568-28.92 568 57.94c0 17.34-9.95 145.71-15.78 166.55-20.27 72.46-94.15 90.94-159.87 79.75 114.87 19.55 144.1 84.31 80.98 149.07-119.86 123-172.27-30.86-185.7-70.28-2.46-7.23-3.61-10.6-3.63-7.73-.02-2.88-1.17.5-3.63 7.73-13.43 39.42-65.84 193.27-185.7 70.28-63.11-64.76-33.9-129.52 80.98-149.07-65.72 11.18-139.6-7.3-159.87-79.75C9.95 203.66 0 75.3 0 57.95 0-28.91 76.14-1.61 123.12 33.66Z\"/></svg>"),
Rules: []string{
"||bsky.app^",
"||bsky.social^",
},
}, {
ID: "canais_globo",
Name: "Canais Globo",
@@ -1927,6 +1935,14 @@ var blockedServices = []blockedService{{
"||minecraftservices.com^",
"||mojang.com^",
},
}, {
ID: "nebula",
Name: "Nebula",
IconSVG: []byte("<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" viewBox=\"0 0 50.8 50.8\"><path d=\"m20.404 31.36 4.847 14.195 4.6-14.295 14.988-.05-11.97-9.002 4.748-14.344-12.316 9.002-12.416-9.15 4.65 14.492-11.773 9.003Z\"/></svg>"),
Rules: []string{
"||nebula.app^",
"||nebula.tv^",
},
}, {
ID: "netflix",
Name: "Netflix",