Compare commits

...

4 Commits

Author SHA1 Message Date
ᡠᠵᡠᡳ ᡠᠵᡠ ᠮᠠᠨᡩ᠋ᠠᠨ
deb950bb2b remove :: and 0.0.0.0 (#2780) 2026-03-02 23:47:20 +08:00
EvanLiu2000
be2ec83092 category-porn: add more domains (#3320) 2026-03-02 21:29:45 +08:00
MkQtS
6b16be4020 category-social-media-!cn: add some mastodon domains (#3318) 2026-03-02 14:48:30 +08:00
MkQtS
42aafe324e main.go: optimize attr filter (#3317)
[skip ci]
2026-03-02 14:15:40 +08:00
4 changed files with 15 additions and 7 deletions

View File

@@ -2700,6 +2700,7 @@ jav.guru
jav.la jav.la
jav.land jav.land
jav.place jav.place
jav.sb
jav.si jav.si
jav.wine jav.wine
jav01.cc jav01.cc
@@ -2762,6 +2763,7 @@ javhdporn.net
javher.com javher.com
javheroine.com javheroine.com
javhihi.com javhihi.com
javhub.com
javhub.me javhub.me
javhub.net javhub.net
javidol.org javidol.org
@@ -2795,6 +2797,7 @@ javprime.net
javpub.me javpub.me
javpush.com javpush.com
javqd.com javqd.com
javquick.com
javrank.com javrank.com
javrate.com javrate.com
javrave.club javrave.club

View File

@@ -13,3 +13,12 @@ include:twitter
include:vk include:vk
truthsocial.com truthsocial.com
# Mastodon
# * We can not make a comprehensive domain list of all Mastodon instances.
# * Many more dynamic/random instance domains are not listed here.
# * geosite:mastodon is not provided to avoid creating excessive expectations among users.
joinmastodon.org
mastodon.online
mastodon.social
pawoo.net

View File

@@ -22,7 +22,6 @@ internal
# References: https://www.iana.org/assignments/locally-served-dns-zones/locally-served-dns-zones.xhtml # References: https://www.iana.org/assignments/locally-served-dns-zones/locally-served-dns-zones.xhtml
# https://www.rfc-editor.org/rfc/rfc6303.html # https://www.rfc-editor.org/rfc/rfc6303.html
0.in-addr.arpa
2.0.192.in-addr.arpa 2.0.192.in-addr.arpa
10.in-addr.arpa 10.in-addr.arpa
16.172.in-addr.arpa 16.172.in-addr.arpa
@@ -47,7 +46,6 @@ internal
168.192.in-addr.arpa 168.192.in-addr.arpa
254.169.in-addr.arpa 254.169.in-addr.arpa
255.255.255.255.in-addr.arpa 255.255.255.255.in-addr.arpa
0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa
8.b.d.0.1.0.0.2.ip6.arpa 8.b.d.0.1.0.0.2.ip6.arpa
8.e.f.ip6.arpa 8.e.f.ip6.arpa

View File

@@ -263,9 +263,6 @@ func (p *Processor) loadData(listName string, path string) error {
} }
func isMatchAttrFilters(entry *Entry, incFilter *Inclusion) bool { func isMatchAttrFilters(entry *Entry, incFilter *Inclusion) bool {
if len(incFilter.MustAttrs) == 0 && len(incFilter.BanAttrs) == 0 {
return true
}
if len(entry.Attrs) == 0 { if len(entry.Attrs) == 0 {
return len(incFilter.MustAttrs) == 0 return len(incFilter.MustAttrs) == 0
} }
@@ -352,12 +349,13 @@ func (p *Processor) resolveList(plname string) error {
for _, dentry := range pl.Entries { // Add direct entries for _, dentry := range pl.Entries { // Add direct entries
roughMap[dentry.Plain] = dentry roughMap[dentry.Plain] = dentry
} }
for _, inc := range pl.Inclusions { for _, inc := range pl.Inclusions { // Add included entries
if err := p.resolveList(inc.Source); err != nil { if err := p.resolveList(inc.Source); err != nil {
return fmt.Errorf("failed to resolve inclusion %q: %w", inc.Source, err) return fmt.Errorf("failed to resolve inclusion %q: %w", inc.Source, err)
} }
isFullInc := len(inc.MustAttrs) == 0 && len(inc.BanAttrs) == 0
for _, ientry := range p.finalMap[inc.Source] { for _, ientry := range p.finalMap[inc.Source] {
if isMatchAttrFilters(ientry, inc) { // Add included entries if isFullInc || isMatchAttrFilters(ientry, inc) {
roughMap[ientry.Plain] = ientry roughMap[ientry.Plain] = ientry
} }
} }