mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-15 18:08:30 -07:00
Pull request 1914: upd-flts
Squashed commit of the following: commit a8932f56fad583ecfcb7efae36fc516454bc6610 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Jul 11 16:20:55 2023 +0300 filtering: fix docs; upd svcs
This commit is contained in:
parent
65b526b969
commit
0a1887a854
@ -47,7 +47,7 @@ func fromCacheItem(item *cacheItem) (data []byte) {
|
|||||||
data = binary.BigEndian.AppendUint64(data, uint64(expiry))
|
data = binary.BigEndian.AppendUint64(data, uint64(expiry))
|
||||||
|
|
||||||
for _, v := range item.hashes {
|
for _, v := range item.hashes {
|
||||||
// nolint:looppointer // The subsilce of v is used for a copy.
|
// nolint:looppointer // The subslice of v is used for a copy.
|
||||||
data = append(data, v[:]...)
|
data = append(data, v[:]...)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ func (c *Checker) findInCache(
|
|||||||
|
|
||||||
i := 0
|
i := 0
|
||||||
for _, hash := range hashes {
|
for _, hash := range hashes {
|
||||||
// nolint:looppointer // The has subsilce is used for a cache lookup.
|
// nolint:looppointer // The has subslice is used for a cache lookup.
|
||||||
data := c.cache.Get(hash[:prefixLen])
|
data := c.cache.Get(hash[:prefixLen])
|
||||||
if data == nil {
|
if data == nil {
|
||||||
hashes[i] = hash
|
hashes[i] = hash
|
||||||
@ -98,7 +98,7 @@ func (c *Checker) storeInCache(hashesToRequest, respHashes []hostnameHash) {
|
|||||||
|
|
||||||
for _, hash := range respHashes {
|
for _, hash := range respHashes {
|
||||||
var pref prefix
|
var pref prefix
|
||||||
// nolint:looppointer // The hash subsilce is used for a copy.
|
// nolint:looppointer // The hash subslice is used for a copy.
|
||||||
copy(pref[:], hash[:])
|
copy(pref[:], hash[:])
|
||||||
|
|
||||||
hashToStore[pref] = append(hashToStore[pref], hash)
|
hashToStore[pref] = append(hashToStore[pref], hash)
|
||||||
@ -109,11 +109,11 @@ func (c *Checker) storeInCache(hashesToRequest, respHashes []hostnameHash) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, hash := range hashesToRequest {
|
for _, hash := range hashesToRequest {
|
||||||
// nolint:looppointer // The hash subsilce is used for a cache lookup.
|
// nolint:looppointer // The hash subslice is used for a cache lookup.
|
||||||
val := c.cache.Get(hash[:prefixLen])
|
val := c.cache.Get(hash[:prefixLen])
|
||||||
if val == nil {
|
if val == nil {
|
||||||
var pref prefix
|
var pref prefix
|
||||||
// nolint:looppointer // The hash subsilce is used for a copy.
|
// nolint:looppointer // The hash subslice is used for a copy.
|
||||||
copy(pref[:], hash[:])
|
copy(pref[:], hash[:])
|
||||||
|
|
||||||
c.setCache(pref, nil)
|
c.setCache(pref, nil)
|
||||||
|
@ -173,7 +173,7 @@ func (c *Checker) getQuestion(hashes []hostnameHash) (q string) {
|
|||||||
b := &strings.Builder{}
|
b := &strings.Builder{}
|
||||||
|
|
||||||
for _, hash := range hashes {
|
for _, hash := range hashes {
|
||||||
// nolint:looppointer // The hash subsilce is used for hex encoding.
|
// nolint:looppointer // The hash subslice is used for hex encoding.
|
||||||
stringutil.WriteToBuilder(b, hex.EncodeToString(hash[:prefixLen]), ".")
|
stringutil.WriteToBuilder(b, hex.EncodeToString(hash[:prefixLen]), ".")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1505,6 +1505,7 @@ var blockedServices = []blockedService{{
|
|||||||
"||aus.social^",
|
"||aus.social^",
|
||||||
"||awscommunity.social^",
|
"||awscommunity.social^",
|
||||||
"||climatejustice.social^",
|
"||climatejustice.social^",
|
||||||
|
"||cupoftea.social^",
|
||||||
"||cyberplace.social^",
|
"||cyberplace.social^",
|
||||||
"||defcon.social^",
|
"||defcon.social^",
|
||||||
"||det.social^",
|
"||det.social^",
|
||||||
@ -1530,6 +1531,7 @@ var blockedServices = []blockedService{{
|
|||||||
"||masto.pt^",
|
"||masto.pt^",
|
||||||
"||mastodon.au^",
|
"||mastodon.au^",
|
||||||
"||mastodon.bida.im^",
|
"||mastodon.bida.im^",
|
||||||
|
"||mastodon.com.tr^",
|
||||||
"||mastodon.eus^",
|
"||mastodon.eus^",
|
||||||
"||mastodon.green^",
|
"||mastodon.green^",
|
||||||
"||mastodon.ie^",
|
"||mastodon.ie^",
|
||||||
@ -1551,11 +1553,11 @@ var blockedServices = []blockedService{{
|
|||||||
"||mastodont.cat^",
|
"||mastodont.cat^",
|
||||||
"||mastodontech.de^",
|
"||mastodontech.de^",
|
||||||
"||mastodontti.fi^",
|
"||mastodontti.fi^",
|
||||||
"||mastouille.fr^",
|
|
||||||
"||mathstodon.xyz^",
|
"||mathstodon.xyz^",
|
||||||
"||metalhead.club^",
|
"||metalhead.club^",
|
||||||
"||mindly.social^",
|
"||mindly.social^",
|
||||||
"||mstdn.ca^",
|
"||mstdn.ca^",
|
||||||
|
"||mstdn.jp^",
|
||||||
"||mstdn.party^",
|
"||mstdn.party^",
|
||||||
"||mstdn.plus^",
|
"||mstdn.plus^",
|
||||||
"||mstdn.social^",
|
"||mstdn.social^",
|
||||||
@ -1567,7 +1569,6 @@ var blockedServices = []blockedService{{
|
|||||||
"||nrw.social^",
|
"||nrw.social^",
|
||||||
"||o3o.ca^",
|
"||o3o.ca^",
|
||||||
"||ohai.social^",
|
"||ohai.social^",
|
||||||
"||pewtix.com^",
|
|
||||||
"||piaille.fr^",
|
"||piaille.fr^",
|
||||||
"||pol.social^",
|
"||pol.social^",
|
||||||
"||ravenation.club^",
|
"||ravenation.club^",
|
||||||
@ -1582,20 +1583,19 @@ var blockedServices = []blockedService{{
|
|||||||
"||social.linux.pizza^",
|
"||social.linux.pizza^",
|
||||||
"||social.politicaconciencia.org^",
|
"||social.politicaconciencia.org^",
|
||||||
"||social.vivaldi.net^",
|
"||social.vivaldi.net^",
|
||||||
"||sself.co^",
|
|
||||||
"||stranger.social^",
|
"||stranger.social^",
|
||||||
"||sueden.social^",
|
"||sueden.social^",
|
||||||
"||tech.lgbt^",
|
"||tech.lgbt^",
|
||||||
"||techhub.social^",
|
"||techhub.social^",
|
||||||
"||theblower.au^",
|
"||theblower.au^",
|
||||||
"||tkz.one^",
|
"||tkz.one^",
|
||||||
"||todon.eu^",
|
|
||||||
"||toot.aquilenet.fr^",
|
"||toot.aquilenet.fr^",
|
||||||
"||toot.community^",
|
"||toot.community^",
|
||||||
"||toot.funami.tech^",
|
"||toot.funami.tech^",
|
||||||
"||toot.io^",
|
"||toot.io^",
|
||||||
"||toot.wales^",
|
"||toot.wales^",
|
||||||
"||troet.cafe^",
|
"||troet.cafe^",
|
||||||
|
"||twingyeo.kr^",
|
||||||
"||union.place^",
|
"||union.place^",
|
||||||
"||universeodon.com^",
|
"||universeodon.com^",
|
||||||
"||urbanists.social^",
|
"||urbanists.social^",
|
||||||
|
@ -13,7 +13,7 @@ require (
|
|||||||
golang.org/x/tools v0.11.0
|
golang.org/x/tools v0.11.0
|
||||||
golang.org/x/vuln v0.2.0
|
golang.org/x/vuln v0.2.0
|
||||||
// TODO(a.garipov): Return to tagged releases once a new one appears.
|
// TODO(a.garipov): Return to tagged releases once a new one appears.
|
||||||
honnef.co/go/tools v0.5.0-0.dev.0.20230706211743-ddee6bbaa341
|
honnef.co/go/tools v0.5.0-0.dev.0.20230709092525-bc759185c5ee
|
||||||
mvdan.cc/gofumpt v0.5.0
|
mvdan.cc/gofumpt v0.5.0
|
||||||
mvdan.cc/unparam v0.0.0-20230610194454-9ea02bef9868
|
mvdan.cc/unparam v0.0.0-20230610194454-9ea02bef9868
|
||||||
)
|
)
|
||||||
@ -27,7 +27,7 @@ require (
|
|||||||
github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect
|
github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect
|
||||||
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
|
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
|
||||||
golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect
|
golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect
|
||||||
golang.org/x/exp/typeparams v0.0.0-20230626212559-97b1e661b5df // indirect
|
golang.org/x/exp/typeparams v0.0.0-20230711023510-fffb14384f22 // indirect
|
||||||
golang.org/x/mod v0.12.0 // indirect
|
golang.org/x/mod v0.12.0 // indirect
|
||||||
golang.org/x/sync v0.3.0 // indirect
|
golang.org/x/sync v0.3.0 // indirect
|
||||||
golang.org/x/sys v0.10.0 // indirect
|
golang.org/x/sys v0.10.0 // indirect
|
||||||
|
@ -52,8 +52,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh
|
|||||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug=
|
golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug=
|
||||||
golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
|
golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
|
||||||
golang.org/x/exp/typeparams v0.0.0-20230626212559-97b1e661b5df h1:jfUqBujZx2dktJVEmZpCkyngz7MWrVv1y9kLOqFNsqw=
|
golang.org/x/exp/typeparams v0.0.0-20230711023510-fffb14384f22 h1:e8iSCQYXZ4EB6q3kIfy2fgPFTvDbozqzRe4OuIOyrL4=
|
||||||
golang.org/x/exp/typeparams v0.0.0-20230626212559-97b1e661b5df/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
|
golang.org/x/exp/typeparams v0.0.0-20230711023510-fffb14384f22/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
|
||||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
|
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
|
||||||
@ -107,8 +107,8 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+
|
|||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
honnef.co/go/tools v0.5.0-0.dev.0.20230706211743-ddee6bbaa341 h1:jNlTAPEjbDiN9qda/1wple0GSpewFnWhvc1GO7bZX1U=
|
honnef.co/go/tools v0.5.0-0.dev.0.20230709092525-bc759185c5ee h1:mpyvMqtlVZTwEv78QL3S2ZDTMHMO1fgNwr2kC7+K7oU=
|
||||||
honnef.co/go/tools v0.5.0-0.dev.0.20230706211743-ddee6bbaa341/go.mod h1:GUV+uIBCLpdf0/v6UhHHG/yzI/z6qPskBeQCjcNB96k=
|
honnef.co/go/tools v0.5.0-0.dev.0.20230709092525-bc759185c5ee/go.mod h1:GUV+uIBCLpdf0/v6UhHHG/yzI/z6qPskBeQCjcNB96k=
|
||||||
mvdan.cc/gofumpt v0.5.0 h1:0EQ+Z56k8tXjj/6TQD25BFNKQXpCvT0rnansIc7Ug5E=
|
mvdan.cc/gofumpt v0.5.0 h1:0EQ+Z56k8tXjj/6TQD25BFNKQXpCvT0rnansIc7Ug5E=
|
||||||
mvdan.cc/gofumpt v0.5.0/go.mod h1:HBeVDtMKRZpXyxFciAirzdKklDlGu8aAy1wEbH5Y9js=
|
mvdan.cc/gofumpt v0.5.0/go.mod h1:HBeVDtMKRZpXyxFciAirzdKklDlGu8aAy1wEbH5Y9js=
|
||||||
mvdan.cc/unparam v0.0.0-20230610194454-9ea02bef9868 h1:F4Q7pXcrU9UiU1fq0ZWqSOxKjNAteRuDr7JDk7uVLRQ=
|
mvdan.cc/unparam v0.0.0-20230610194454-9ea02bef9868 h1:F4Q7pXcrU9UiU1fq0ZWqSOxKjNAteRuDr7JDk7uVLRQ=
|
||||||
|
Loading…
Reference in New Issue
Block a user