Compare commits

..

22 Commits

Author SHA1 Message Date
sergeevms
2c661d32b6 Update salesforce (#3295) 2026-02-20 18:21:58 +08:00
MkQtS
1be2a927c0 category-cryptocurrency: add blockchain.com (#3294) 2026-02-20 16:30:41 +08:00
EvanLiu2000
3490c96b46 Update category-porn (#3291) 2026-02-20 16:27:57 +08:00
allkeltysss
8ae86bbb4a yandex: add yastatic-net.ru (#3293) 2026-02-20 16:16:51 +08:00
MkQtS
db9c0fe466 main.go: improve codes (#3290) 2026-02-19 17:24:13 +08:00
Konstantin
109a50f048 Add more ru bank/financial domains (#3264) 2026-02-19 14:36:27 +08:00
EvanLiu2000
b258a6594e Update missav & category-porn (#3289) 2026-02-19 14:30:57 +08:00
Andrey Cherepkov
8d5ef88729 Update Russian websites (#3269)
* add category-bank-ru and category-finance-ru

* category-ecommerce-ru: include avito

* category-entertainment: add megogo.net

* add kinopoisk

* category-entertainment-ru: add more domains

* category-gov-ru: add more domains

* category-retail-ru: add more domains

* add category-travel-ru

* mailru-group: add more domains

* category-ru: add more domains

* Update category-retail-ru: remove duplicates as they are in x5

* Update category-travel-ru: return taxsee to the ru category

* Update category-ru: add taxsee

* cleanup and reorder

---------

Co-authored-by: MkQtS <81752398+MkQtS@users.noreply.github.com>
2026-02-19 14:10:09 +08:00
MkQtS
491d185657 category-cryptocurrency: add bitcoincore.org (#3287) 2026-02-17 21:16:32 +08:00
Emik
d8852e85ea Add yostar (#3283) 2026-02-17 20:54:50 +08:00
MkQtS
fb9754a371 add zscaler (#3285) 2026-02-17 18:07:56 +08:00
MkQtS
a5fac50ae6 add anker (#3284) 2026-02-17 18:06:03 +08:00
TripleA
94d33011d4 create tld-ru (#3280) 2026-02-17 16:52:16 +08:00
MkQtS
f1688340cd category-cryptocurrency: add walletconnect.org (#3281)
Co-authored-by: sinalphabeta <53267553+sinalphabeta@users.noreply.github.com>
2026-02-15 14:38:51 +08:00
sinalphabeta
515262667d Update category-cryptocurrency (#3277) 2026-02-15 13:16:55 +08:00
MkQtS
06af8b92a1 Add airbnb (#3279)
* add airbnb

* airbnb: add more domains

---------

Co-authored-by: Andrey Cherepkov <4404804+ACherepkov1989@users.noreply.github.com>
2026-02-15 10:58:53 +08:00
MkQtS
be01a25015 Add 2gis (#3278)
* add 2gis

* 2gis: add more domains

---------

Co-authored-by: Andrey Cherepkov <4404804+ACherepkov1989@users.noreply.github.com>
2026-02-15 10:58:33 +08:00
MkQtS
98d161e89a Create pull_request_template.md (#3276)
[skip ci]
2026-02-14 21:19:33 +08:00
NetworK
8523573ba1 telegram: add ton.org (#3273) 2026-02-14 09:00:22 +08:00
jinqiang zhang
94997e5bd6 add grapheneos (#3272) 2026-02-13 22:43:43 +08:00
mcdemon05
939492e1b7 ubisoft: add more domains (#3201) 2026-02-13 22:01:28 +08:00
fanymagnet
d059d7c595 Add HDrezka App information and new domain (#3271) 2026-02-13 21:31:49 +08:00
36 changed files with 563 additions and 165 deletions

14
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,14 @@
<!--
Thanks for your contribution!
Please check the following items: (not mandatory)
- Adjacent rules should be sorted alphabetically
- It's not encouraged to create new list/file containing too few (one or two) rules
- Newly added list should be included in relevant categories if possible
- Subdomains are unnecessary as they are overridden by the parent domain. e.g. `[domain:]example.com` overrides `[domain:]app.example.com`
- Description for your changes is welcome (why the change is necessary, data source of added domains, potential impacts, etc.)
-->

15
data/2gis Normal file
View File

@@ -0,0 +1,15 @@
# https://crt.sh/?id=24119301132
2gis.ae
2gis.am
2gis.az
2gis.by
2gis.com
2gis.com.cy
2gis.cz
2gis.ge
2gis.kg
2gis.kz
2gis.ru
2gis.tj
2gis.ua
2gis.uz

86
data/airbnb Normal file
View File

@@ -0,0 +1,86 @@
# https://crt.sh/?id=23815053677
# https://crt.sh/?id=24021548393
# https://crt.sh/?id=6327797853
abb.travel
accomable.com
airbnb.ae
airbnb.al
airbnb.am
airbnb.at
airbnb.az
airbnb.ba
airbnb.be
airbnb.ca
airbnb.cat
airbnb.ch
airbnb.cl
airbnb.cn
airbnb.co.cr
airbnb.co.id
airbnb.co.il
airbnb.co.in
airbnb.co.kr
airbnb.co.nz
airbnb.co.uk
airbnb.co.ve
airbnb.co.za
airbnb.com
airbnb.com.ar
airbnb.com.au
airbnb.com.bo
airbnb.com.br
airbnb.com.bz
airbnb.com.co
airbnb.com.ec
airbnb.com.ee
airbnb.com.gt
airbnb.com.hk
airbnb.com.hn
airbnb.com.hr
airbnb.com.kh
airbnb.com.mt
airbnb.com.my
airbnb.com.ni
airbnb.com.pa
airbnb.com.pe
airbnb.com.ph
airbnb.com.py
airbnb.com.ro
airbnb.com.sg
airbnb.com.sv
airbnb.com.tr
airbnb.com.tw
airbnb.com.ua
airbnb.com.vn
airbnb.cz
airbnb.de
airbnb.dk
airbnb.es
airbnb.fi
airbnb.fr
airbnb.gr
airbnb.gy
airbnb.hu
airbnb.ie
airbnb.is
airbnb.it
airbnb.jp
airbnb.la
airbnb.lt
airbnb.lu
airbnb.lv
airbnb.me
airbnb.mx
airbnb.nl
airbnb.no
airbnb.org
airbnb.pl
airbnb.pt
airbnb.rs
airbnb.ru
airbnb.se
airbnb.si
airbnb.tools
airbnb.travel
muscache.com
vamo.com

12
data/anker Normal file
View File

@@ -0,0 +1,12 @@
anker-in.com @!cn
anker.com @!cn
anker.com.cn
ankersolix.com @!cn
ankerwork.cn
eufy.com @!cn
eufycn.com
eufylife.com @!cn
eufymake.com @!cn
eufymake.com.cn
soundcore.com @!cn
soundcore.com.cn

40
data/category-bank-ru Normal file
View File

@@ -0,0 +1,40 @@
# Alfa Bank
alfabank.ru
# GazpromBank
gazprombank.ru
gpb.ru
# Mts dengi
dbo-dengi.online
mtsdengi.ru
# PSB Bank
psbank.ru
# RosBank
bankline.ru
rosbank.ru
# RUSSIA Bank
abr.ru
# Russian Agricultural Bank
rshb.ru
# SberBank
sber.ru
sberbank.com
sberbank.ru
# T-Bank (Tinkoff)
cdn-tinkoff.ru
tbank-online.com
tbank.ru
# Tochka bank
tochka-tech.com
tochka.com
# VTB Bank
vtb.ru

View File

@@ -1,5 +1,6 @@
# This list contains Tech & Cyber companies and organizations outside China mainland. # This list contains Tech & Cyber companies and organizations outside China mainland.
include:2gis
include:acer include:acer
include:adobe include:adobe
include:alibabacloud include:alibabacloud
@@ -91,6 +92,7 @@ include:westerndigital
include:wisekey include:wisekey
include:yahoo include:yahoo
include:yandex include:yandex
include:zscaler
# Remote Control # Remote Control
include:category-remote-control include:category-remote-control

View File

@@ -28,12 +28,14 @@ aave.com
bingx.com bingx.com
bitbank.cc bitbank.cc
bitcoin.org bitcoin.org
bitcoincore.org
bitfinex.com bitfinex.com
bitget.com bitget.com
bitmex.com bitmex.com
bitquick.co bitquick.co
bitstamp.net bitstamp.net
bittrex.com bittrex.com
blockchain.com
blockfrost.io blockfrost.io
btcbox.co.jp btcbox.co.jp
cex.io cex.io
@@ -55,6 +57,7 @@ dogecoin.com
dydx.exchange dydx.exchange
fundingrates.xyz fundingrates.xyz
gemini.com gemini.com
gmgn.ai
guardarian.com guardarian.com
hashflow.com hashflow.com
infura.io infura.io
@@ -77,5 +80,7 @@ truefi.io
unisat.io unisat.io
uniswap.org uniswap.org
walletconnect.com walletconnect.com
walletconnect.org
web3modal.org
wintermute.com wintermute.com
zapper.fi zapper.fi

View File

@@ -1,6 +1,7 @@
include:category-ecommerce-ru include:category-ecommerce-ru
include:adidas include:adidas
include:airbnb
include:bestbuy include:bestbuy
include:booking include:booking
include:books include:books

View File

@@ -1,2 +1,3 @@
include:avito
include:ozon include:ozon
include:wildberries include:wildberries

View File

@@ -89,6 +89,7 @@ joox.com
kpacg.com kpacg.com
linetv.tw linetv.tw
megaphone.fm megaphone.fm
megogo.net
mikanani.me mikanani.me
moov.hk moov.hk
odysee.com odysee.com

View File

@@ -1,3 +1,22 @@
# CDNvideo is a leading CDN provider in Russia and the CIS
cdnvideo.ru
trbcdn.net
# Information about films and series
kinorium.com
# Streaming services for watching TV series and movies
include:kinopoisk
include:okko include:okko
include:rutube
include:wink include:wink
24h.tv
amediateka.ru
ivi.ru
premier.one
smotreshka.tv
start.ru
tvigle.ru
viju.ru
# Video hosting
include:rutube

View File

@@ -2,6 +2,7 @@
include:category-bank-ir include:category-bank-ir
include:category-bank-jp include:category-bank-jp
include:category-bank-mm include:category-bank-mm
include:category-bank-ru
include:fibank include:fibank
include:futu include:futu

View File

@@ -41,6 +41,7 @@ include:vrchat
include:wbgames include:wbgames
include:xbox include:xbox
include:ynoproject include:ynoproject
include:yostar
dinopoloclub.com dinopoloclub.com
dodi-repacks.download dodi-repacks.download

View File

@@ -15,7 +15,13 @@ edu.ru
# Other Federal Resources # Other Federal Resources
cbr.ru # Central Bank of Russia cbr.ru # Central Bank of Russia
cikrf.ru # Central Electoral Commission of the Russian Federation
ebs.ru # Unified Biometric System
goskey.ru # GosKey - an electronic signature on a smartphone
izbirkom.ru # Information on ongoing elections and referendums
kremlin.ru # Online representation of the President of Russia
nalog.ru # Federal Tax Service nalog.ru # Federal Tax Service
xn--80ajghhoc2aj1c8b.xn--p1ai # Honest Sign - State Labeling System
# #
# Regional sites and Public Services # Regional sites and Public Services
@@ -149,3 +155,6 @@ chukotka.ru # Chukotka Autonomous Area
jamal.ru # Yamal-Nenets Autonomous Area jamal.ru # Yamal-Nenets Autonomous Area
surgut.ru # Khanty-Mansi Autonomous Area Yugra surgut.ru # Khanty-Mansi Autonomous Area Yugra
yamal.ru # Yamal-Nenets Autonomous Area yamal.ru # Yamal-Nenets Autonomous Area
# Regional health services
zdrav10.ru # Republic of Karelia

View File

@@ -4,6 +4,7 @@ include:creativecommons
include:csis include:csis
include:emojipedia include:emojipedia
include:f-droid include:f-droid
include:grapheneos
include:ieee include:ieee
include:metabrainz include:metabrainz
include:nist include:nist

View File

@@ -137,6 +137,7 @@ porn
18hmanga.com 18hmanga.com
18insta.com 18insta.com
18j.tv 18j.tv
18jav.tv
18jms.com 18jms.com
18mh.co 18mh.co
18mh.me 18mh.me
@@ -2223,6 +2224,8 @@ heavyfetish.com
hegre.com hegre.com
heiguab.top heiguab.top
heijidi.life heijidi.life
heiliao.com
heiliao88.com
heise360181.buzz heise360181.buzz
heise360182.buzz heise360182.buzz
helixstudios.net helixstudios.net
@@ -2690,6 +2693,7 @@ jasmin.com
jav-angel.net jav-angel.net
jav-subtitles.com jav-subtitles.com
jav-vr.net jav-vr.net
jav.com.co
jav.dog jav.dog
jav.gallery jav.gallery
jav.guru jav.guru
@@ -2792,6 +2796,7 @@ javpub.me
javpush.com javpush.com
javqd.com javqd.com
javrank.com javrank.com
javrate.com
javrave.club javrave.club
javroot.com javroot.com
javscat.net javscat.net
@@ -2816,6 +2821,7 @@ javtrust.com
javtube.cc javtube.cc
javtube.com javtube.com
javtube.net javtube.net
javvideoporn.com
javvids.com javvids.com
javxspot.com javxspot.com
javxxx.me javxxx.me
@@ -3587,6 +3593,7 @@ ninpu.cyou
niuc2.com niuc2.com
niziero.info niziero.info
njav.tv njav.tv
njavtv.com
nlsexfilmpjes.com nlsexfilmpjes.com
nlt-media.com nlt-media.com
noc.syosetu.com noc.syosetu.com
@@ -5566,9 +5573,6 @@ xgtd3.com
xgtdr.buzz xgtdr.buzz
xh-porn.com xh-porn.com
xh.video xh.video
xhamster.com
xhamster.desi
xhamster2.com
xhot.pro xhot.pro
xhub.tv xhub.tv
xiangrikui-app.com xiangrikui-app.com
@@ -6157,6 +6161,7 @@ regexp:(^|\.)tqav[1-9][0-9]\.com$
regexp:(^|\.)tt[1-2][0-9]\.tv$ regexp:(^|\.)tt[1-2][0-9]\.tv$
regexp:(^|\.)ttghg[1-9][0-9]\.xyz$ regexp:(^|\.)ttghg[1-9][0-9]\.xyz$
regexp:(^|\.)tttv([1-9][0-9]?|100)\.com$ regexp:(^|\.)tttv([1-9][0-9]?|100)\.com$
regexp:(^|\.)twav[1-9]\.xyz$
regexp:(^|\.)twseb([1-9][0-9]?)?\.com$ regexp:(^|\.)twseb([1-9][0-9]?)?\.com$
regexp:(^|\.)uu[a-z][1-9][0-9]?\.com$ regexp:(^|\.)uu[a-z][1-9][0-9]?\.com$
regexp:(^|\.)whtdh0[1-3]\.cc$ regexp:(^|\.)whtdh0[1-3]\.cc$

View File

@@ -1,6 +1,69 @@
# ABC of Taste
av.ru
# Auchan
auchan.ru
# Bristol
bristol.ru
# Children's World
detmir.ru
# Dixie
dixy.ru
# Dodo Pizza
dodois.com
dodois.io
dodopizza.com
dodopizza.ru
dodostatic.net
# Dostaevsky
dostaevsky.ru
# Eurasia
evrasia.rest
# Fast food restaurant chain "Vkusno i tochka"
vkusnoitochka.ru
# Fix Price # Fix Price
fix-price.com fix-price.com
# Lenta # Lenta
lenta.com lenta.com
lenta.tech lenta.tech
# Magnet
magnit.ru
# Metro
metro-cc.ru
# Pyaterochka, Perekrestok, Chizhik
include:x5
# Red and White
krasnoeibeloe.ru
# Rostics
rostics.ru
uni.rest
unirest.tech
# Sakura
ilovesakura.ru
# Spar
myspar.ru
# Sushi Wok
sushiwok.ru
# Vinlab
winelab.ru
# VkusVill
vkusvill.ru

View File

@@ -1,47 +1,57 @@
# Russian websites # Russian websites
# Russian TLDs
moscow
tatar
ru
su
xn--80adxhks
xn--80asehdb
xn--80aswg
xn--c1avg
xn--d1acj3b
xn--p1acf
xn--p1ai
ru.com ru.com
ru.net ru.net
include:tld-ru
include:category-ecommerce-ru include:category-ecommerce-ru
include:category-entertainment-ru include:category-entertainment-ru
include:category-gov-ru include:category-gov-ru
include:category-retail-ru include:category-retail-ru
include:category-travel-ru
# Public transportation # Well-known companies
include:aviasales
include:mosmetro
include:avito
include:mailru-group include:mailru-group
include:x5
include:yandex include:yandex
# Dodo Pizza # Bank & Finance & Insurance & Securities
dodopizza.ru include:category-bank-ru
dodopizza.com # Credit History Bureaus
dodostatic.net credistory.ru
dodois.com nbki.ru
dodois.io # Currency and stock exchanges
moex.com # Moscow Stock Exchange
spvb.ru # Saint-Petersburg Stock Exchange
# Financial marketplace
banki.ru
finuslugi.ru
# Investment
sistema-capital.com
# Mir payment system
mirpayonline.ru
# National Payment Card System
nspk.ru
# Tipping service
netmonet.co
tips.tips
# Rostics # Telecom operators
rostics.ru beeline.ru
uni.rest dom.ru
unirest.tech megafon.ru
mts.ru
mymts.ru
rostelecom.ru
rt.ru
t2.ru
tele2.ru
yota.ru
trbcdn.net # Other domains
tbank-online.com gazfond-pn.ru # Non-state pension fund GAZFOND pension savings
taxsee.com litres.ru # E-book and audiobook service
meteoinfo.ru # Hydrometeorological Center of Russia
ngenix.net # NGENIX is a Russian provider of acceleration and security services for public web resources
pochta.ru # Russian post
qms.ru # Russian internet speed testing service
rustore.ru # RuStore is a Russian mobile app store for Android
taxsee.com # Taxi for business (self-employed drivers)

38
data/category-travel-ru Normal file
View File

@@ -0,0 +1,38 @@
# Aviasales
include:aviasales
# BlaBlaCar
blablacar.ru
# Bus stations
avtovokzaly.ru
# Ostrovok
ostrovok.ru
# Othello from 2GIS
otello.ru
# Public transport and ticketing
include:mosmetro
full:bilet.nspk.ru
full:metro.spb.ru
full:mos.transport.vtb.ru
full:podorozhnik.spb.ru
full:transport.mos.ru
gorodpay.ru
rrtp.ru
sbertroika.ru
# Russian Railways
rzd-bonus.ru
rzd.ru
# Tutu
tutu.ru
# Yandex Rent
full:arenda.yandex.ru
# Yandex Taxi
full:taxi.yandex.ru

View File

@@ -422,6 +422,7 @@ zhaopin.cn
include:aisiku # 北京艾斯酷科技有限公司 include:aisiku # 北京艾斯酷科技有限公司
include:akiko # 秋子酱科技 include:akiko # 秋子酱科技
include:alibaba @-!cn include:alibaba @-!cn
include:anker @-!cn
include:baidu include:baidu
include:beisen include:beisen
include:bluepoch include:bluepoch

16
data/grapheneos Normal file
View File

@@ -0,0 +1,16 @@
attestation.app
grapheneos.app
grapheneos.ca
grapheneos.com
grapheneos.dev
grapheneos.foundation
grapheneos.info
grapheneos.net
grapheneos.network
grapheneos.online
grapheneos.org
grapheneos.ovh
grapheneos.page
grapheneos.social
seamlessupdate.app
vanadium.app

View File

@@ -8,5 +8,8 @@ hdrezka.org
hdrezka.site hdrezka.site
rezka.ag rezka.ag
# HDrezka App for Android
hdrzk.org
# hdrezka video CDN servers # hdrezka video CDN servers
stream.voidboost.cc stream.voidboost.cc

2
data/kinopoisk Normal file
View File

@@ -0,0 +1,2 @@
kinopoisk.ru
kinopoisk-ru.clstorage.net

View File

@@ -5,5 +5,7 @@ include:vk
boosty.to boosty.to
donationalerts.com donationalerts.com
max.ru
memealerts.com memealerts.com
oneme.ru
tamtam.chat tamtam.chat

View File

@@ -1,5 +1,7 @@
missav.ai missav.ai
missav.com missav.com
missav.live
missav.uno missav.uno
missav.vip missav.vip
missav.ws missav.ws
missav123.com

View File

@@ -25,6 +25,7 @@ quotable.com
radian6.com radian6.com
relateiq.com relateiq.com
salesforce-setup.com salesforce-setup.com
salesforce-sites.com
salesforce.com salesforce.com
salesforce.org salesforce.org
salesforceiq.com salesforceiq.com

View File

@@ -15,5 +15,6 @@ telegram.org
telegram.space telegram.space
telesco.pe telesco.pe
tg.dev tg.dev
ton.org
tx.me tx.me
usercontent.dev usercontent.dev

View File

@@ -18,6 +18,7 @@
# xn--j6w193g # 香港 Hong Kong SAR, People's Republic of China # xn--j6w193g # 香港 Hong Kong SAR, People's Republic of China
include:google-registry-tld include:google-registry-tld
include:tld-ru
# Used by U.S. federal government # Used by U.S. federal government
gov gov
@@ -209,7 +210,6 @@ qa # Qatar
re # Réunion Island re # Réunion Island
ro # Romania ro # Romania
rs # Serbia rs # Serbia
ru # Russia
rw # Rwanda rw # Rwanda
sa # Saudi Arabia sa # Saudi Arabia
sb # Solomon Islands sb # Solomon Islands
@@ -229,7 +229,6 @@ so # Somaliland
sr # Suriname sr # Suriname
ss # South Sudan ss # South Sudan
st # São Tomé and Príncipe st # São Tomé and Príncipe
su # The Union of Soviet Socialist Republic
sv # El Salvador sv # El Salvador
sx # Sint Maarten sx # Sint Maarten
sy # Syria sy # Syria
@@ -329,7 +328,6 @@ okinawa # Okinawa, Japan
osaka # Osaka, Japan osaka # Osaka, Japan
ryukyu # Ryukyu Islands, Japan ryukyu # Ryukyu Islands, Japan
taipei # Taipei, Republic of China (Taiwan) taipei # Taipei, Republic of China (Taiwan)
tatar # Tatar peoples and places
tokyo # Tokyo, Japan tokyo # Tokyo, Japan
yokohama # Yokohama, Japan yokohama # Yokohama, Japan
@@ -358,7 +356,6 @@ istanbul # İstanbul, Turkey
koeln # Cologne, Germany koeln # Cologne, Germany
london # London, United Kingdom london # London, United Kingdom
madrid # Madrid, Spain madrid # Madrid, Spain
moscow # Moscow, Russia
nrw # North Rhine-Westphalia, Germany nrw # North Rhine-Westphalia, Germany
paris # Paris, France paris # Paris, France
ruhr # Ruhr, Germany ruhr # Ruhr, Germany
@@ -467,7 +464,6 @@ shell # Shell Information Technology International Inc
shia # Shia Muslim community shia # Shia Muslim community
style # though the comment actually seems to be about .tattoo style # though the comment actually seems to be about .tattoo
sucks # Vox Populi Registry sucks # Vox Populi Registry
tatar # Limited Liability Company "Coordination Center of Regional Domain of Tatarstan Republic"
tattoo # Tattoo tattoo # Tattoo
vana # Scripps Networks Interactive, Inc. vana # Scripps Networks Interactive, Inc.
virgin # Virgin Enterprises Limited virgin # Virgin Enterprises Limited
@@ -557,7 +553,6 @@ xn--mgbai9azgqp6j # پاکستان Pakistan
xn--mgbai9a5eva00b # پاكستان Pakistan xn--mgbai9a5eva00b # پاكستان Pakistan
xn--ygbi2ammx # فلسطين Palestine xn--ygbi2ammx # فلسطين Palestine
xn--wgbl6a # قطر Qatar xn--wgbl6a # قطر Qatar
xn--p1ai # рф Russian Federation
xn--mgberp4a5d4ar # السعودية Saudi Arabia xn--mgberp4a5d4ar # السعودية Saudi Arabia
xn--mgberp4a5d4a87g # السعودیة Saudi Arabia xn--mgberp4a5d4a87g # السعودیة Saudi Arabia
xn--mgbqly7c0a67fbc # السعودیۃ Saudi Arabia xn--mgbqly7c0a67fbc # السعودیۃ Saudi Arabia

12
data/tld-ru Normal file
View File

@@ -0,0 +1,12 @@
# Russian TLDs
moscow
ru
su
tatar
xn--80adxhks
xn--80asehdb
xn--80aswg
xn--c1avg
xn--d1acj3b
xn--p1acf
xn--p1ai

View File

@@ -6,5 +6,29 @@ ubisoftconnect.com
uplay.com uplay.com
full:ubisoft-uplay-savegames.s3.amazonaws.com full:ubisoft-uplay-savegames.s3.amazonaws.com
full:ubisoft-orbit-savegames.s3.amazonaws.com full:ubisoft-orbit-savegames.s3.amazonaws.com
full:ubistatic1-a.akamaihd.net
full:ubistatic2-a.akamaihd.net
full:ubistatic3-a.akamaihd.net full:ubistatic3-a.akamaihd.net
full:ubistatic4-a.akamaihd.net
full:ubistatic5-a.akamaihd.net
full:ubistatic6-a.akamaihd.net
full:ubistatic7-a.akamaihd.net
full:ubistatic8-a.akamaihd.net
full:ubistatic9-a.akamaihd.net
full:ubistatic10-a.akamaihd.net
full:ubistatic11-a.akamaihd.net
full:ubistatic12-a.akamaihd.net
full:ubistatic13-a.akamaihd.net
full:ubistatic14-a.akamaihd.net
full:ubistatic15-a.akamaihd.net
full:ubistatic16-a.akamaihd.net
full:ubistatic17-a.akamaihd.net
full:ubistatic18-a.akamaihd.net
full:ubistatic19-a.akamaihd.net
full:ubistatic20-a.akamaihd.net
full:ubistatic21-a.akamaihd.net
full:ubistatic22-a.akamaihd.net
full:ubistatic23-a.akamaihd.net
full:ubistatic24-a.akamaihd.net
full:ubisoft.siteintercept.qualtrics.com
full:uplaypc-s-ubisoft.cdn.ubi.com @cn full:uplaypc-s-ubisoft.cdn.ubi.com @cn

View File

@@ -1,3 +1,2 @@
ngenix.net
restream-media.net restream-media.net
wink.ru wink.ru

View File

@@ -3,6 +3,8 @@ xhamster.desi
xhamster.xxx xhamster.xxx
xhamster18.com xhamster18.com
xhamster18.desi xhamster18.desi
xhamster19.com
xhamster3.com
xhamsterlive.com xhamsterlive.com
xhcdn.com xhcdn.com

View File

@@ -55,11 +55,11 @@ yandexcom.net
yandexmetrica.com yandexmetrica.com
yandexwebcache.org yandexwebcache.org
yastat.net yastat.net
yastatic-net.ru
yastatic.net yastatic.net
# Watching movies, included in the Yandex subscription # Watching movies, included in the Yandex subscription
kinopoisk.ru include:kinopoisk
kinopoisk-ru.clstorage.net
# Weather service # Weather service
full:yandex-pogoda.static-storage.net full:yandex-pogoda.static-storage.net

12
data/yostar Normal file
View File

@@ -0,0 +1,12 @@
# Yostar
yo-star.com
yostar.cn @cn
yostar.co.jp
yostar.net
yostarplat.com
# Yostar Pictures
yostar-pictures.co.jp
# Stella Sora
stargazer-games.com
stellasora.global
stellasora.jp

18
data/zscaler Normal file
View File

@@ -0,0 +1,18 @@
# https://crt.sh/?id=23639384976
securecloudtransformation.com
securitypreview.com
threatlabz.com
zdxbeta.net
zdxcloud.net
zpagov.net
zpath.com
zscaler.com
zscaler.jp
zscaler.net
zscalerbeta.net
zscalergov.net
zscalerone.net
zscalershift.com
zscalerthree.net
zscalertwo.net
zscloud.net

222
main.go
View File

@@ -22,18 +22,11 @@ var (
exportLists = flag.String("exportlists", "", "Lists to be flattened and exported in plaintext format, separated by ',' comma") exportLists = flag.String("exportlists", "", "Lists to be flattened and exported in plaintext format, separated by ',' comma")
) )
var (
plMap = make(map[string]*ParsedList)
finalMap = make(map[string][]*Entry)
cirIncMap = make(map[string]bool) // Used for circular inclusion detection
)
type Entry struct { type Entry struct {
Type string Type string
Value string Value string
Attrs []string Attrs []string
Plain string Plain string
Affs []string
} }
type Inclusion struct { type Inclusion struct {
@@ -48,6 +41,12 @@ type ParsedList struct {
Entries []*Entry Entries []*Entry
} }
type Processor struct {
plMap map[string]*ParsedList
finalMap map[string][]*Entry
cirIncMap map[string]bool
}
func makeProtoList(listName string, entries []*Entry) (*router.GeoSite, error) { func makeProtoList(listName string, entries []*Entry) (*router.GeoSite, error) {
site := &router.GeoSite{ site := &router.GeoSite{
CountryCode: listName, CountryCode: listName,
@@ -90,29 +89,27 @@ func writePlainList(listname string, entries []*Entry) error {
return w.Flush() return w.Flush()
} }
func parseEntry(line string) (Entry, error) { func parseEntry(line string) (*Entry, []string, error) {
var entry Entry entry := new(Entry)
parts := strings.Fields(line) parts := strings.Fields(line)
if len(parts) == 0 { if len(parts) == 0 {
return entry, fmt.Errorf("empty line") return entry, nil, fmt.Errorf("empty line")
} }
// Parse type and value // Parse type and value
v := parts[0] typ, val, isTypeSpecified := strings.Cut(parts[0], ":")
colonIndex := strings.Index(v, ":") typ = strings.ToLower(typ)
if colonIndex == -1 { if !isTypeSpecified { // Default RuleType
entry.Type = dlc.RuleTypeDomain // Default type if !validateDomainChars(typ) {
entry.Value = strings.ToLower(v) return entry, nil, fmt.Errorf("invalid domain: %q", typ)
if !validateDomainChars(entry.Value) {
return entry, fmt.Errorf("invalid domain: %q", entry.Value)
} }
entry.Type = dlc.RuleTypeDomain
entry.Value = typ
} else { } else {
typ := strings.ToLower(v[:colonIndex])
val := v[colonIndex+1:]
switch typ { switch typ {
case dlc.RuleTypeRegexp: case dlc.RuleTypeRegexp:
if _, err := regexp.Compile(val); err != nil { if _, err := regexp.Compile(val); err != nil {
return entry, fmt.Errorf("invalid regexp %q: %w", val, err) return entry, nil, fmt.Errorf("invalid regexp %q: %w", val, err)
} }
entry.Type = dlc.RuleTypeRegexp entry.Type = dlc.RuleTypeRegexp
entry.Value = val entry.Value = val
@@ -120,57 +117,60 @@ func parseEntry(line string) (Entry, error) {
entry.Type = dlc.RuleTypeInclude entry.Type = dlc.RuleTypeInclude
entry.Value = strings.ToUpper(val) entry.Value = strings.ToUpper(val)
if !validateSiteName(entry.Value) { if !validateSiteName(entry.Value) {
return entry, fmt.Errorf("invalid include list name: %q", entry.Value) return entry, nil, fmt.Errorf("invalid included list name: %q", entry.Value)
} }
case dlc.RuleTypeDomain, dlc.RuleTypeFullDomain, dlc.RuleTypeKeyword: case dlc.RuleTypeDomain, dlc.RuleTypeFullDomain, dlc.RuleTypeKeyword:
entry.Type = typ entry.Type = typ
entry.Value = strings.ToLower(val) entry.Value = strings.ToLower(val)
if !validateDomainChars(entry.Value) { if !validateDomainChars(entry.Value) {
return entry, fmt.Errorf("invalid domain: %q", entry.Value) return entry, nil, fmt.Errorf("invalid domain: %q", entry.Value)
} }
default: default:
return entry, fmt.Errorf("invalid type: %q", typ) return entry, nil, fmt.Errorf("invalid type: %q", typ)
} }
} }
// Parse attributes and affiliations // Parse attributes and affiliations
var affs []string
for _, part := range parts[1:] { for _, part := range parts[1:] {
if strings.HasPrefix(part, "@") { switch part[0] {
attr := strings.ToLower(part[1:]) // Trim attribute prefix `@` character case '@':
attr := strings.ToLower(part[1:])
if !validateAttrChars(attr) { if !validateAttrChars(attr) {
return entry, fmt.Errorf("invalid attribute: %q", attr) return entry, affs, fmt.Errorf("invalid attribute: %q", attr)
} }
entry.Attrs = append(entry.Attrs, attr) entry.Attrs = append(entry.Attrs, attr)
} else if strings.HasPrefix(part, "&") { case '&':
aff := strings.ToUpper(part[1:]) // Trim affiliation prefix `&` character aff := strings.ToUpper(part[1:])
if !validateSiteName(aff) { if !validateSiteName(aff) {
return entry, fmt.Errorf("invalid affiliation: %q", aff) return entry, affs, fmt.Errorf("invalid affiliation: %q", aff)
} }
entry.Affs = append(entry.Affs, aff) affs = append(affs, aff)
} else { default:
return entry, fmt.Errorf("invalid attribute/affiliation: %q", part) return entry, affs, fmt.Errorf("invalid attribute/affiliation: %q", part)
} }
} }
// Sort attributes
slices.Sort(entry.Attrs)
// Formated plain entry: type:domain.tld:@attr1,@attr2
var plain strings.Builder
plain.Grow(len(entry.Type) + len(entry.Value) + 10)
plain.WriteString(entry.Type)
plain.WriteByte(':')
plain.WriteString(entry.Value)
for i, attr := range entry.Attrs {
if i == 0 {
plain.WriteByte(':')
} else {
plain.WriteByte(',')
}
plain.WriteByte('@')
plain.WriteString(attr)
}
entry.Plain = plain.String()
return entry, nil if entry.Type != dlc.RuleTypeInclude {
slices.Sort(entry.Attrs) // Sort attributes
// Formated plain entry: type:domain.tld:@attr1,@attr2
var plain strings.Builder
plain.Grow(len(entry.Type) + len(entry.Value) + 10)
plain.WriteString(entry.Type)
plain.WriteByte(':')
plain.WriteString(entry.Value)
for i, attr := range entry.Attrs {
if i == 0 {
plain.WriteByte(':')
} else {
plain.WriteByte(',')
}
plain.WriteByte('@')
plain.WriteString(attr)
}
entry.Plain = plain.String()
}
return entry, affs, nil
} }
func validateDomainChars(domain string) bool { func validateDomainChars(domain string) bool {
@@ -206,62 +206,54 @@ func validateSiteName(name string) bool {
return true return true
} }
func loadData(path string) ([]*Entry, error) { func (p *Processor) getOrCreateParsedList(name string) *ParsedList {
pl, exist := p.plMap[name]
if !exist {
pl = &ParsedList{Name: name}
p.plMap[name] = pl
}
return pl
}
func (p *Processor) loadData(listName string, path string) error {
file, err := os.Open(path) file, err := os.Open(path)
if err != nil { if err != nil {
return nil, err return err
} }
defer file.Close() defer file.Close()
var entries []*Entry pl := p.getOrCreateParsedList(listName)
scanner := bufio.NewScanner(file) scanner := bufio.NewScanner(file)
lineIdx := 0 lineIdx := 0
for scanner.Scan() { for scanner.Scan() {
line := scanner.Text()
lineIdx++ lineIdx++
if idx := strings.Index(line, "#"); idx != -1 { line, _, _ := strings.Cut(scanner.Text(), "#") // Remove comments
line = line[:idx] // Remove comments
}
line = strings.TrimSpace(line) line = strings.TrimSpace(line)
if line == "" { if line == "" {
continue continue
} }
entry, err := parseEntry(line) entry, affs, err := parseEntry(line)
if err != nil { if err != nil {
return entries, fmt.Errorf("error in %q at line %d: %w", path, lineIdx, err) return fmt.Errorf("error in %q at line %d: %w", path, lineIdx, err)
} }
entries = append(entries, &entry)
}
return entries, nil
}
func parseList(refName string, refList []*Entry) error {
pl, _ := plMap[refName]
if pl == nil {
pl = &ParsedList{Name: refName}
plMap[refName] = pl
}
for _, entry := range refList {
if entry.Type == dlc.RuleTypeInclude { if entry.Type == dlc.RuleTypeInclude {
if len(entry.Affs) != 0 {
return fmt.Errorf("affiliation is not allowed for include:%q", entry.Value)
}
inc := &Inclusion{Source: entry.Value} inc := &Inclusion{Source: entry.Value}
for _, attr := range entry.Attrs { for _, attr := range entry.Attrs {
if strings.HasPrefix(attr, "-") { if attr[0] == '-' {
inc.BanAttrs = append(inc.BanAttrs, attr[1:]) // Trim attribute prefix `-` character inc.BanAttrs = append(inc.BanAttrs, attr[1:])
} else { } else {
inc.MustAttrs = append(inc.MustAttrs, attr) inc.MustAttrs = append(inc.MustAttrs, attr)
} }
} }
for _, aff := range affs {
apl := p.getOrCreateParsedList(aff)
apl.Inclusions = append(apl.Inclusions, inc)
}
pl.Inclusions = append(pl.Inclusions, inc) pl.Inclusions = append(pl.Inclusions, inc)
} else { } else {
for _, aff := range entry.Affs { for _, aff := range affs {
apl, _ := plMap[aff] apl := p.getOrCreateParsedList(aff)
if apl == nil {
apl = &ParsedList{Name: aff}
plMap[aff] = apl
}
apl.Entries = append(apl.Entries, entry) apl.Entries = append(apl.Entries, entry)
} }
pl.Entries = append(pl.Entries, entry) pl.Entries = append(pl.Entries, entry)
@@ -296,9 +288,7 @@ func polishList(roughMap map[string]*Entry) []*Entry {
domainsMap := make(map[string]bool) domainsMap := make(map[string]bool)
for _, entry := range roughMap { for _, entry := range roughMap {
switch entry.Type { // Bypass regexp, keyword and "full/domain with attr" switch entry.Type { // Bypass regexp, keyword and "full/domain with attr"
case dlc.RuleTypeRegexp: case dlc.RuleTypeRegexp, dlc.RuleTypeKeyword:
finalList = append(finalList, entry)
case dlc.RuleTypeKeyword:
finalList = append(finalList, entry) finalList = append(finalList, entry)
case dlc.RuleTypeDomain: case dlc.RuleTypeDomain:
domainsMap[entry.Value] = true domainsMap[entry.Value] = true
@@ -323,11 +313,11 @@ func polishList(roughMap map[string]*Entry) []*Entry {
pd = "." + pd // So that `domain:example.org` overrides `full:example.org` pd = "." + pd // So that `domain:example.org` overrides `full:example.org`
} }
for { for {
idx := strings.Index(pd, ".") var hasParent bool
if idx == -1 { _, pd, hasParent = strings.Cut(pd, ".") // Go for next parent
if !hasParent {
break break
} }
pd = pd[idx+1:] // Go for next parent
if domainsMap[pd] { if domainsMap[pd] {
isRedundant = true isRedundant = true
break break
@@ -344,36 +334,38 @@ func polishList(roughMap map[string]*Entry) []*Entry {
return finalList return finalList
} }
func resolveList(pl *ParsedList) error { func (p *Processor) resolveList(plname string) error {
if _, pldone := finalMap[pl.Name]; pldone { if _, pldone := p.finalMap[plname]; pldone {
return nil return nil
} }
pl, plexist := p.plMap[plname]
if cirIncMap[pl.Name] { if !plexist {
return fmt.Errorf("circular inclusion in: %q", pl.Name) return fmt.Errorf("list %q not found", plname)
} }
cirIncMap[pl.Name] = true if p.cirIncMap[plname] {
defer delete(cirIncMap, pl.Name) return fmt.Errorf("circular inclusion in: %q", plname)
}
p.cirIncMap[plname] = true
defer delete(p.cirIncMap, plname)
roughMap := make(map[string]*Entry) // Avoid basic duplicates roughMap := make(map[string]*Entry) // Avoid basic duplicates
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 {
incPl, exist := plMap[inc.Source] if _, exist := p.plMap[inc.Source]; !exist {
if !exist { return fmt.Errorf("list %q includes a non-existent list: %q", plname, inc.Source)
return fmt.Errorf("list %q includes a non-existent list: %q", pl.Name, inc.Source)
} }
if err := resolveList(incPl); err != nil { if err := p.resolveList(inc.Source); err != nil {
return err return err
} }
for _, ientry := range finalMap[inc.Source] { for _, ientry := range p.finalMap[inc.Source] {
if isMatchAttrFilters(ientry, inc) { // Add included entries if isMatchAttrFilters(ientry, inc) { // Add included entries
roughMap[ientry.Plain] = ientry roughMap[ientry.Plain] = ientry
} }
} }
} }
finalMap[pl.Name] = polishList(roughMap) p.finalMap[plname] = polishList(roughMap)
return nil return nil
} }
@@ -381,8 +373,8 @@ func run() error {
dir := *dataPath dir := *dataPath
fmt.Printf("using domain lists data in %q\n", dir) fmt.Printf("using domain lists data in %q\n", dir)
// Generate refMap // Generate plMap
refMap := make(map[string][]*Entry) processor := &Processor{plMap: make(map[string]*ParsedList)}
err := filepath.WalkDir(dir, func(path string, d os.DirEntry, err error) error { err := filepath.WalkDir(dir, func(path string, d os.DirEntry, err error) error {
if err != nil { if err != nil {
return err return err
@@ -394,23 +386,16 @@ func run() error {
if !validateSiteName(listName) { if !validateSiteName(listName) {
return fmt.Errorf("invalid list name: %q", listName) return fmt.Errorf("invalid list name: %q", listName)
} }
refMap[listName], err = loadData(path) return processor.loadData(listName, path)
return err
}) })
if err != nil { if err != nil {
return fmt.Errorf("failed to loadData: %w", err) return fmt.Errorf("failed to loadData: %w", err)
} }
// Generate plMap
for refName, refList := range refMap {
if err := parseList(refName, refList); err != nil {
return fmt.Errorf("failed to parseList %q: %w", refName, err)
}
}
// Generate finalMap // Generate finalMap
for plname, pl := range plMap { processor.finalMap = make(map[string][]*Entry, len(processor.plMap))
if err := resolveList(pl); err != nil { processor.cirIncMap = make(map[string]bool)
for plname := range processor.plMap {
if err := processor.resolveList(plname); err != nil {
return fmt.Errorf("failed to resolveList %q: %w", plname, err) return fmt.Errorf("failed to resolveList %q: %w", plname, err)
} }
} }
@@ -419,11 +404,10 @@ func run() error {
if err := os.MkdirAll(*outputDir, 0755); err != nil { if err := os.MkdirAll(*outputDir, 0755); err != nil {
return fmt.Errorf("failed to create output directory: %w", err) return fmt.Errorf("failed to create output directory: %w", err)
} }
// Export plaintext lists
// Export plaintext list
for rawEpList := range strings.SplitSeq(*exportLists, ",") { for rawEpList := range strings.SplitSeq(*exportLists, ",") {
if epList := strings.TrimSpace(rawEpList); epList != "" { if epList := strings.TrimSpace(rawEpList); epList != "" {
entries, exist := finalMap[strings.ToUpper(epList)] entries, exist := processor.finalMap[strings.ToUpper(epList)]
if !exist || len(entries) == 0 { if !exist || len(entries) == 0 {
fmt.Printf("list %q does not exist or is empty\n", epList) fmt.Printf("list %q does not exist or is empty\n", epList)
continue continue
@@ -438,7 +422,7 @@ func run() error {
// Generate dat file // Generate dat file
protoList := new(router.GeoSiteList) protoList := new(router.GeoSiteList)
for siteName, siteEntries := range finalMap { for siteName, siteEntries := range processor.finalMap {
site, err := makeProtoList(siteName, siteEntries) site, err := makeProtoList(siteName, siteEntries)
if err != nil { if err != nil {
return fmt.Errorf("failed to makeProtoList %q: %w", siteName, err) return fmt.Errorf("failed to makeProtoList %q: %w", siteName, err)