Compare commits

...

82 Commits

Author SHA1 Message Date
MkQtS
aa76e186cb Add more cn domains (#3380)
* weiphone: add weiphone.net

* category-education-cn: add more domains

* category-media-cn: add more domains

* geolocation-cn: add more domains
2026-03-22 15:43:41 +08:00
fdrvn
c9348f1db4 category-ip-geo-detect: add myip.wtf (#3379) 2026-03-22 12:28:34 +08:00
深鸣
d62599c8db category-acg: add bestdori.com (#3376) 2026-03-20 13:25:24 +08:00
MkQtS
fab6275217 Update README.md
Add tips for generating custom dat files.

[skip ci]
2026-03-20 11:02:07 +08:00
MkQtS
4c7afec5a9 category-electronic-cn: remove non-cn domains (#3375)
They were added in `espressif` and included in `geolocation-!cn`.
2026-03-20 10:53:04 +08:00
Jarl-Penguin
330c30eb23 category-ip-geo-detect: Add ip.hetzner.com (#3374)
Signed-off-by: Jarl-Penguin <jarlpenguin@outlook.com>
2026-03-20 10:47:36 +08:00
inf
f34f22819e category-dev: add ziglang.org (#3373) 2026-03-20 10:46:09 +08:00
ir0nmand0
baa1409cfb category-entertainment-ru: add beeline.tv (#3372)
Beeline TV (beeline.tv) is a Russian streaming service by VEON (Beeline).
Movies, TV series, and live TV channels for Russian-speaking audience.

Subdomains (covered by domain match): web-prod, rest, images, static, video.
External deps (mediavitrina.ru, vimpelcom.ru) already in category-ru.

Co-authored-by: Dima Dudukin <dima.dudukin.dev@gmail.com>
2026-03-19 18:12:53 +08:00
MkQtS
a22d247c5a qcloud: comment out useless regexp rules (#3371)
Overrided by other domain type rules, but cannot be optimized automatically.

They are actually useless and only affect performance.
2026-03-19 12:43:29 +08:00
yobarerukoto
d311bbe50b geolocation-cn: add gzyowin.com (#3369) 2026-03-18 19:29:43 +08:00
MkQtS
1db558b165 main.go: support to generate multiple custom dats (#3367)
This allows to remove any unwanted lists without modifying the domains
data, and you can generate multiple custom v2ray dat files in a single
command.

As long as the source data is consistent, any list remains in the trimed
dat contains the same rules comparing to the list in full dat.

Use the new option `datprofile` to specify the config json file path.
`outputname` will be ignored when `datprofile` is set.

Co-authored-by: database64128 <free122448@hotmail.com>
2026-03-18 18:32:05 +08:00
Konstantin
9ee0757263 Add Tilda domains (#3368)
* add tilda

* tilda: add to category-dev
2026-03-18 18:05:54 +08:00
MkQtS
714a061ba3 main.go: improve codes (#3366)
* main.go: improve codes

* main.go: add parseInclusion

- seprate from parseEntry
- not allow affiliation for inclusion
2026-03-18 15:58:47 +08:00
TripleA
5ff8142411 Update category-speedtest (#3365) 2026-03-18 00:01:38 +08:00
MkQtS
becbd7a8ad wordpress: add wordpress.net (#3364) 2026-03-16 19:05:25 +08:00
xchacha20-poly1305
cd2d66eb72 baidu: Add xdrtc.com (#3362) 2026-03-15 21:55:53 +08:00
MkQtS
4c4ad053ef nvidia: add nvidia.custhelp.com 2026-03-15 14:51:57 +08:00
MkQtS
6544f6d3a6 oracle: add custhelp.com 2026-03-15 14:51:57 +08:00
MkQtS
673a70c380 category-ai-!cn: add spicywriter.com (#3360) 2026-03-15 14:32:27 +08:00
TripleA
be078767c4 Update category-ip-geo-detect (#3359) 2026-03-15 14:21:52 +08:00
深鸣
15fde0da4b Add more cn domains (#3358) 2026-03-15 14:20:57 +08:00
pover0k
5dd4779425 nodeseek: add nodeget.com (#3357) 2026-03-15 14:16:38 +08:00
Mikhail
eeccde7239 kinopub: add ahc.ovh (#3353)
Add ahc.ovh entry as a sub domains mirror
2026-03-13 21:52:34 +08:00
Larin Sergey
235988ffe4 anthropic: add clau.de (#3350) 2026-03-12 15:14:55 +08:00
MkQtS
a45bf04e9b category-ai-!cn: add more domains (#3352) 2026-03-12 15:08:42 +08:00
MkQtS
f31764e263 annas-archive: add new domains (#3349)
listed in https://en.wikipedia.org/wiki/Anna's_Archive

close https://github.com/v2fly/domain-list-community/issues/3347
2026-03-11 21:45:55 +08:00
MkQtS
540b28d5e4 Add more cn domains (#3348)
* geolocation-cn: remove zsxq.com

already in category-social-media-cn

* category-dev-cn: add zuidaima.com

* geolocation-cn: remove zimuzu.io

not in cn and seems dead

* geolocation-cn: reorder zhaopin.com

* geolocation-cn: reorder airline domains

* geolocation-cn: reorder more airline domains

* geolocation-cn: add more airline domains

* sohu: add 56.com domains
2026-03-11 21:42:32 +08:00
MkQtS
9c06656430 Add more cn domains (#3346)
* geolocation-cn: remove zrblog.net

not in cn

* category-wiki-cn: add allhistory.com

* category-education-cn: add more domains

* netease: add yunxindns.com
2026-03-11 14:03:34 +08:00
letsky192
f524c3b6bf geolocation-!cn: add sinyalee.com (#3345) 2026-03-11 13:52:48 +08:00
MkQtS
3cdb699cac Add more cn domains (#3343)
* keep: add more domains

* geolocation-cn: add more payment domains
2026-03-09 13:51:10 +08:00
MkQtS
6bb4a68f2f category-dev: add cve.org (#3342) 2026-03-09 12:18:58 +08:00
TripleA
0d1c2bc257 Update category-ip-geo-detect (#3332) 2026-03-09 11:55:50 +08:00
MkQtS
8a08dcc7ed category-cdn-!cn: add cdnjs.com 2026-03-08 23:13:00 +08:00
MkQtS
61fd24725c Update jsdelivr 2026-03-08 23:13:00 +08:00
MkQtS
7e797d86ec category-dev: merge single-domain entries 2026-03-08 23:13:00 +08:00
MkQtS
910b069cc0 Update category-documents-cn (#3339)
* remove doc88 and docin

too few rules inside

* category-documents-cn: add more domains
2026-03-08 22:00:03 +08:00
MkQtS
92f9940fb7 remove knovel (#3338)
Elsevier acquired Knovel in 2013

`data/knovel` has only one domain: `knovel.com`, and it's already in
`data/elsevier`
2026-03-08 21:27:45 +08:00
allebaton
08bafd1b33 geolocation-!cn: add dynatrace.com and familysearch.org (#3337) 2026-03-08 17:17:02 +08:00
ambroyz
873495a1fd samsung: add iot domains (#3336)
Added domains required for downloading smartthings addons for wearable devices. For example, Samsung SmartTag 2.

Co-authored-by: Mikhail Brusnikin <ambroyz@gmail.com>
2026-03-07 21:33:06 +08:00
Emik
c4793eb3bf geolocation-!cn: add app-pay.jp (#3335) 2026-03-07 11:30:00 +08:00
TripleA
a32151e070 Add new ru domains (#3333) 2026-03-06 21:47:23 +08:00
JimmFly
c5db233e0b category-ai-!cn: add lovart.ai (#3334) 2026-03-06 21:44:24 +08:00
Emik
785a18e405 category-games-!cn: add muvluv-girls-garden.com (#3331) 2026-03-06 14:48:39 +08:00
MkQtS
e1943122f3 mozilla: remove two redundant subdomains and rust (#3330)
Rust now belongs to Rust Foundation, not mozilla

`*.services.mozilla.com` is overrided by `mozilla.com`, so comment them out
2026-03-06 13:12:41 +08:00
MkQtS
2a73fa8675 category-social-media-!cn: add onlyfans.com 2026-03-06 12:30:58 +08:00
MkQtS
42ff85b0a7 category-entertainment: add sendvid.com 2026-03-06 12:30:58 +08:00
MkQtS
764958ebf7 category-android-app-download: add uptodown domains 2026-03-06 12:30:58 +08:00
MkQtS
a25ac04c82 apkmirror: add apkmirror.disqus.com 2026-03-06 12:30:58 +08:00
MkQtS
168baf0e6a Update build.yml
add dlc.dat_plain.yml to release branch

[skipci]
2026-03-06 11:57:00 +08:00
TripleA
2f78f1c626 category-ip-geo-detect: add checkip.amazonaws.com (#3327) 2026-03-06 11:52:22 +08:00
Patrick Gu
ddc1e21783 Add plex list (#3319)
with notes for some confusing domains
2026-03-05 15:05:42 +08:00
Sergey Morgunov
4437fb0c51 jetbrains: add jetbrains.cloud (#3326) 2026-03-04 23:45:40 +08:00
MkQtS
d70840823b Misc updates (#3324)
* tiktok: add ttcdn-us.com

* category-entertainment-cn: add dongdianqiu.com

* geolocation-cn: add kaadas domains
2026-03-03 18:19:03 +08:00
MkQtS
5c0ddc9f24 category-entertainment-cn: add 172mix.com (#3323) 2026-03-03 17:58:20 +08:00
MkQtS
b119839e7d icloud: add icloud.cn (#3322) 2026-03-03 17:49:33 +08:00
Minwe LUO
a335e24269 category-ai-!cn: add diabrowser.engineering for Dia login (#3321) 2026-03-03 17:19:23 +08:00
wakesend
d9d97a7132 Porn updates (#3313)
- illusion is dead. remove it from other categories
- dlsite is included in both category-entertainment and category-porn, no need to include it in geolocation-!cn
- dlsite: add dlaf.jp
- add illgames
- create category-urlshortner
2026-03-03 17:16:58 +08:00
ᡠᠵᡠᡳ ᡠᠵᡠ ᠮᠠᠨᡩ᠋ᠠᠨ
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
0-Kutya-0
882f48e486 category-ip-geo-detect: add check-host.net (#3316) 2026-03-02 13:53:25 +08:00
Ivan
614b291120 category-ru: add mil.ru (#3315)
Ministry of Defense of the Russian Federation

Co-authored-by: karspls <iaplekh@gmail.com>
2026-03-02 13:51:03 +08:00
grill-glitch
2b3211df98 geolocation-cn: add monika.love and edgemonix.top (#3314) 2026-03-02 13:43:57 +08:00
direnquanbuKO
71e31ba221 apple: mark more sub domains with cn attr (#3312)
Apple Music API endpoints
2026-02-27 17:35:44 +08:00
MkQtS
b11bfaa138 sina: add weibopay.com (#3311) 2026-02-27 13:11:31 +08:00
MkQtS
afb9e6cad0 main.go: clean up (#3310)
[skip ci]
2026-02-27 13:09:18 +08:00
Konstantin
5f7c4aa60a yandex: add yandexwebcache.net (#3308) 2026-02-27 13:03:46 +08:00
Nikita Ugnich
48eb616779 perplexity: add ppl-ai-file-upload.s3.amazonaws.com (#3307) 2026-02-27 13:02:30 +08:00
Ivan
d57e3b3f45 category-gov-ru: add general radio frequency center domain (#3306)
Co-authored-by: Ivan Plekhanov <iaplekh@gmail.com>
2026-02-27 13:00:09 +08:00
dependabot[bot]
c308e3430d Chore: bump actions/upload-artifact from 6 to 7 (#3309)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-27 12:10:39 +08:00
MkQtS
9a46bff5f3 amazon: add more domains (#3304)
* aws: add awswaf.com

Close https://github.com/v2fly/domain-list-community/issues/3303

* amazon: add more domains

source: https://crt.sh/?id=23663232392

* amazon: add more domains

source: https://crt.sh/?id=22217736606
2026-02-25 14:18:09 +08:00
MkQtS
051556734c category-dev: add packagecloud.io (#3302) 2026-02-24 16:45:44 +08:00
wakesend
8829b0ea28 Add mixi (#3299) 2026-02-24 16:37:58 +08:00
Konstantin
a201aae131 category-ru: add t1.cloud and yclients.com; kinopub: add smarttvcdn.online (#3298) 2026-02-24 16:25:50 +08:00
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
84 changed files with 750 additions and 285 deletions

View File

@@ -61,7 +61,7 @@ jobs:
git config --local user.name "github-actions[bot]" git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git checkout -b release git checkout -b release
git add *.txt *.sha256sum dlc.dat dlc.dat.zip dlc.dat.xz git add *.txt *.sha256sum dlc.dat dlc.dat_plain.yml dlc.dat.zip dlc.dat.xz
git commit -m "${{ env.RELEASE_NAME }}" git commit -m "${{ env.RELEASE_NAME }}"
git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}" git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
git push -f -u origin release git push -f -u origin release

View File

@@ -34,7 +34,7 @@ jobs:
mv dlc.dat TEST-${{ github.run_number }}-dlc.dat mv dlc.dat TEST-${{ github.run_number }}-dlc.dat
- name: Upload TEST-${{ github.run_number }}-dlc.dat - name: Upload TEST-${{ github.run_number }}-dlc.dat
uses: actions/upload-artifact@v6 uses: actions/upload-artifact@v7
with: with:
name: TEST-${{ github.run_number }}-dlc.dat name: TEST-${{ github.run_number }}-dlc.dat
path: TEST-${{ github.run_number }}-dlc.dat path: TEST-${{ github.run_number }}-dlc.dat

6
.gitignore vendored
View File

@@ -4,9 +4,9 @@
/domain-list-community /domain-list-community
/domain-list-community.exe /domain-list-community.exe
# Generated dat file. # Generated dat files.
dlc.dat /*.dat
# Exported plaintext lists. # Exported plaintext lists.
/*.yml
/*.txt /*.txt
/*.yml

View File

@@ -86,6 +86,8 @@ Each file in the `data` directory can be used as a rule in this format: `geosite
Run `go run ./ --help` for more usage information. Run `go run ./ --help` for more usage information.
For anyone who wants to generate custom `.dat` files, you may read [#3370](https://github.com/v2fly/domain-list-community/discussions/3370).
## Structure of data ## Structure of data
All data are under `data` directory. Each file in the directory represents a sub-list of domains, named by the file name. File content is in the following format. All data are under `data` directory. Each file in the directory represents a sub-list of domains, named by the file name. File content is in the following format.
@@ -105,7 +107,7 @@ regexp:^odd[1-7]\.example\.org(\.[a-z]{2})?$
> Adding new `regexp` and `keyword` rules is discouraged because it is easy to use them incorrectly, and proxy software cannot efficiently match these types of rules. > Adding new `regexp` and `keyword` rules is discouraged because it is easy to use them incorrectly, and proxy software cannot efficiently match these types of rules.
> [!NOTE] > [!NOTE]
> The following types of rules are **NOT** fully compatible with the ones that defined by user in V2Ray config file. Do **Not** copy and paste directly. > The following types of rules are **NOT** fully compatible with the ones that defined by user in V2Ray config file. Do **NOT** copy and paste directly.
- Comment begins with `#`. It may begin anywhere in the file. The content in the line after `#` is treated as comment and ignored in production. - Comment begins with `#`. It may begin anywhere in the file. The content in the line after `#` is treated as comment and ignored in production.
- Subdomain begins with `domain:`, followed by a valid domain name. The prefix `domain:` may be omitted. - Subdomain begins with `domain:`, followed by a valid domain name. The prefix `domain:` may be omitted.
@@ -114,7 +116,7 @@ regexp:^odd[1-7]\.example\.org(\.[a-z]{2})?$
- Regular expression begins with `regexp:`, followed by a valid regular expression (per Golang's standard). - Regular expression begins with `regexp:`, followed by a valid regular expression (per Golang's standard).
- Domain rules (including `domain`, `full`, `keyword`, and `regexp`) may have none, one or more attributes. Each attribute begins with `@` and followed by the name of the attribute. Attributes will remain available in final lists and `dlc.dat`. - Domain rules (including `domain`, `full`, `keyword`, and `regexp`) may have none, one or more attributes. Each attribute begins with `@` and followed by the name of the attribute. Attributes will remain available in final lists and `dlc.dat`.
- Domain rules may have none, one or more affiliations, which additionally adds the domain rule into the affiliated target list. Each affiliation begins with `&` and followed by the name of the target list (nomatter whether the target has a dedicated file in data path). This is a method for data management, and will not remain in the final lists or `dlc.dat`. - Domain rules may have none, one or more affiliations, which additionally adds the domain rule into the affiliated target list. Each affiliation begins with `&` and followed by the name of the target list (nomatter whether the target has a dedicated file in data path). This is a method for data management, and will not remain in the final lists or `dlc.dat`.
- Inclusion begins with `include:`, followed by the name of another valid domain list. A simple `include:listb` in file `lista` means adding all domain rules of `listb` into `lista`. Inclusions with attributes stands for selective inclusion. `include:listb @attr1 @-attr2` means only adding those domain rules *with* `@attr1` **and** *without* `@attr2`. This is a special type for data management, and will not remain in the final lists or `dlc.dat`. - Inclusion begins with `include:`, followed by the name of another valid domain list. `include:listb` in file `lista` means adding all domain rules of `listb` into `lista`. Inclusions with attributes stand for selective inclusion. `include:listb @attr1 @-attr2` means only adding those domain rules *with* `@attr1` **and** *without* `@attr2`. This is a special type for data management, and will not remain in the final lists or `dlc.dat`.
## How it works ## How it works

View File

@@ -33,6 +33,7 @@ aboutamazon.in
aboutamazon.it aboutamazon.it
aboutamazon.jp aboutamazon.jp
aboutamazon.pl aboutamazon.pl
aboutamazon.sg
alexafund.cn @cn alexafund.cn @cn
alexafund.com.cn @cn alexafund.com.cn @cn
amaaozn.com amaaozn.com
@@ -42,24 +43,35 @@ amazon-lantern.com
amazon-launchpad.com amazon-launchpad.com
amazon.ae amazon.ae
amazon.ca amazon.ca
amazon.cl
amazon.cn @cn amazon.cn @cn
amazon.co.jp amazon.co.jp
amazon.co.uk amazon.co.uk
amazon.co.za
amazon.com amazon.com
amazon.com.au amazon.com.au
amazon.com.be
amazon.com.br amazon.com.br
amazon.com.co
amazon.com.mx amazon.com.mx
amazon.com.ng
amazon.com.tr amazon.com.tr
amazon.de amazon.de
amazon.dev amazon.dev
amazon.eg
amazon.es amazon.es
amazon.fr amazon.fr
amazon.ie
amazon.in amazon.in
amazon.it amazon.it
amazon.jobs amazon.jobs
amazon.jp amazon.jp
amazon.lu
amazon.nl amazon.nl
amazon.pl
amazon.red amazon.red
amazon.sa
amazon.se
amazon.sg amazon.sg
amazonalexavoxcon.com amazonalexavoxcon.com
amazonauthorinsights.com amazonauthorinsights.com
@@ -103,6 +115,7 @@ media-amazon.com
primeday.cn @cn primeday.cn @cn
primeday.com.cn @cn primeday.com.cn @cn
primeday.info primeday.info
seattlespheres.com
siege-amazon.com siege-amazon.com
ssl-images-amazon.com ssl-images-amazon.com
ueberamazon.de ueberamazon.de

View File

@@ -1,5 +1,8 @@
annas-archive.gd
annas-archive.gl
annas-archive.in annas-archive.in
annas-archive.li annas-archive.li
annas-archive.org annas-archive.org
annas-archive.pk
annas-archive.pm annas-archive.pm
annas-archive.se annas-archive.se

View File

@@ -1,8 +1,9 @@
anthropic.com anthropic.com
clau.de
claude.ai claude.ai
claude.com claude.com
claudeusercontent.com
claudemcpclient.com claudemcpclient.com
claudeusercontent.com
# CDN # CDN
full:servd-anthropic-website.b-cdn.net full:servd-anthropic-website.b-cdn.net

View File

@@ -1 +1,3 @@
apkmirror.com apkmirror.com
full:apkmirror.disqus.com

View File

@@ -752,6 +752,7 @@ courier-push-apple.com.akadns.net
full:amp-api-edge-lb-cn.itunes-apple.com.akadns.net @cn full:amp-api-edge-lb-cn.itunes-apple.com.akadns.net @cn
full:amp-api-edge-lb.itunes-apple.com.akadns.net @cn full:amp-api-edge-lb.itunes-apple.com.akadns.net @cn
full:amp-api-edge.apps.apple.com @cn full:amp-api-edge.apps.apple.com @cn
full:amp-api-edge.music.apple.com @cn
full:amp-api-search-edge.apps.apple.com @cn full:amp-api-search-edge.apps.apple.com @cn
full:amp-api.apps.apple.com @cn full:amp-api.apps.apple.com @cn
full:amp-api.music.apple.com @cn full:amp-api.music.apple.com @cn
@@ -782,6 +783,8 @@ full:js-cdn.music.apple.com @cn
full:km.support.apple.com @cn full:km.support.apple.com @cn
full:maps.apple.com @cn full:maps.apple.com @cn
full:misc-assets.itunes.apple.com @cn full:misc-assets.itunes.apple.com @cn
full:musicstatus.music.apple.com @cn
full:mvod.itunes.apple.com @cn
full:myapp.itunes.apple.com @cn full:myapp.itunes.apple.com @cn
full:np-edge.itunes.apple.com @cn full:np-edge.itunes.apple.com @cn
full:osxapps.itunes.apple.com @cn full:osxapps.itunes.apple.com @cn
@@ -794,6 +797,7 @@ full:se2.itunes.apple.com @cn
full:search.itunes.apple.com @cn full:search.itunes.apple.com @cn
full:sf-api-token-service.itunes.apple.com @cn full:sf-api-token-service.itunes.apple.com @cn
full:sp.itunes.apple.com @cn full:sp.itunes.apple.com @cn
full:speedysub.music.apple.com @cn
full:streamingaudio.itunes.apple.com @cn full:streamingaudio.itunes.apple.com @cn
full:su.itunes.apple.com @cn full:su.itunes.apple.com @cn
full:sync.itunes.apple.com @cn full:sync.itunes.apple.com @cn

View File

@@ -40,6 +40,7 @@ awssecworkshops.com
awsstatic.com awsstatic.com
awsthinkbox.com awsthinkbox.com
awstrack.me awstrack.me
awswaf.com
cdkworkshop.com cdkworkshop.com
cloudfront.com cloudfront.com
cloudfront.net cloudfront.net

View File

@@ -64,6 +64,7 @@ shifen.com
smartapps.cn smartapps.cn
tieba.com tieba.com
tiebaimg.com tiebaimg.com
xdrtc.com
xianfae.com xianfae.com
xiaodutv.com xiaodutv.com
yoojia.com yoojia.com

View File

@@ -1,4 +1,5 @@
# Game # Game
bestdori.com
colorfulstage.com colorfulstage.com
# Idol # Idol

View File

@@ -30,14 +30,20 @@ clipdrop.co
jasper.ai jasper.ai
chutes.ai chutes.ai
clawhub.ai
copilot.microsoft.com copilot.microsoft.com
devin.ai devin.ai
diabrowser.com diabrowser.com
diabrowser.engineering
dify.ai dify.ai
duck.ai duck.ai
gateway.ai.cloudflare.com gateway.ai.cloudflare.com
h2o.ai
kiro.dev kiro.dev
lovart.ai
meta.ai meta.ai
mistral.ai mistral.ai
openart.ai openart.ai
openclaw.ai
openrouter.ai openrouter.ai
spicywriter.com

View File

@@ -1,3 +1,7 @@
include:apkcombo include:apkcombo
include:apkmirror include:apkmirror
include:apkpure include:apkpure
# Uptodown
uptodown.com
utdstc.com

View File

@@ -5,6 +5,10 @@ alfabank.ru
gazprombank.ru gazprombank.ru
gpb.ru gpb.ru
# Mts dengi
dbo-dengi.online
mtsdengi.ru
# PSB Bank # PSB Bank
psbank.ru psbank.ru
@@ -28,5 +32,9 @@ cdn-tinkoff.ru
tbank-online.com tbank-online.com
tbank.ru tbank.ru
# Tochka bank
tochka-tech.com
tochka.com
# VTB Bank # VTB Bank
vtb.ru vtb.ru

View File

@@ -3,6 +3,7 @@ include:cdn77
include:cloudflare include:cloudflare
include:fastly include:fastly
include:imgix include:imgix
include:jsdelivr
include:limelight include:limelight
include:pagecdn include:pagecdn
include:quantil include:quantil
@@ -13,3 +14,6 @@ include:vrcdn
b-cdn.net b-cdn.net
bunny.net bunny.net
bunnycdn.com bunnycdn.com
# cdnjs
cdnjs.com

View File

@@ -66,6 +66,7 @@ include:openweather
include:oracle include:oracle
include:panasonic include:panasonic
include:pccw include:pccw
include:plex
include:qnap include:qnap
include:qualcomm include:qualcomm
include:qwant include:qwant

View File

@@ -35,6 +35,7 @@ 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

View File

@@ -33,22 +33,17 @@ include:java
include:jetbrains include:jetbrains
include:jetbrains-ai include:jetbrains-ai
include:jfrog include:jfrog
include:jsdelivr
include:kubernetes include:kubernetes
include:microsoft-dev include:microsoft-dev
include:mongodb include:mongodb
include:nginx include:nginx
include:nixos
include:openwrt include:openwrt
include:osdn
include:perl include:perl
include:polymer include:polymer
include:python include:python
include:python-community
include:qt include:qt
include:readthedocs include:readthedocs
include:redis include:redis
include:remirepo
include:ruby include:ruby
include:rust include:rust
include:redhat include:redhat
@@ -59,10 +54,9 @@ include:stackexchange
include:strikingly include:strikingly
include:termux include:termux
include:thelinuxfoundation include:thelinuxfoundation
include:topcoder include:tilda
include:unity include:unity
include:v8 include:v8
include:vim
adventofcode.com adventofcode.com
alpinelinux.org alpinelinux.org
@@ -71,11 +65,11 @@ artixlinux.org
atom.io atom.io
badgen.net badgen.net
bitvise.com bitvise.com
cdnjs.com
centos.org centos.org
chocolatey.org chocolatey.org
clojure.org clojure.org
cnpmjs.org cnpmjs.org
cve.org
cygwin.com cygwin.com
cython.org cython.org
deno.com deno.com
@@ -123,16 +117,20 @@ notepad-plus-plus.org
openresty.org openresty.org
openssl.org openssl.org
opensuse.org opensuse.org
osdn.net
packagecloud.io
packagist.org packagist.org
pcre.org pcre.org
phantomjs.org phantomjs.org
php.net php.net
piwheels.org
postgresql.org postgresql.org
putty.org putty.org
r-project.org r-project.org
raspberrypi.org raspberrypi.org
raspbian.org raspbian.org
regex101.com regex101.com
remirepo.net
rpmfusion.org rpmfusion.org
scientificlinux.org scientificlinux.org
scoop.sh scoop.sh
@@ -142,9 +140,11 @@ sqlite.org
sublimetext.com sublimetext.com
tampermonkey.net tampermonkey.net
termius.com termius.com
topcoder.com
unpkg.com unpkg.com
videojs.com videojs.com
videolan.org videolan.org
vim.org
wapm.io wapm.io
wasmer.io wasmer.io
webflow.com webflow.com
@@ -153,4 +153,5 @@ wireshark.org
x.org x.org
xposed.info xposed.info
yarnpkg.com yarnpkg.com
ziglang.org
zsh.org zsh.org

View File

@@ -25,3 +25,4 @@ jinrishici.com
openvela.com openvela.com
pingcode.com pingcode.com
tipdm.org tipdm.org
zuidaima.com

View File

@@ -1,2 +1,13 @@
include:doc88 1ppt.com
include:docin 360doc.com
52ppt.com
badou.com
book118.com
doc88.com
docin.com
douding.cn
haohaodoc.com
lazyer.net
renrendoc.com
wenkeju.com
ypppt.com

View File

@@ -10,6 +10,8 @@ include:shanbay
include:xueersi include:xueersi
include:yuanfudao include:yuanfudao
edu.cn
# 雨课堂 # 雨课堂
include:yuketang include:yuketang
## 雨豆课堂 ## 雨豆课堂
@@ -19,8 +21,6 @@ yushiyan.net
## 学堂在线 ## 学堂在线
xuetangx.com xuetangx.com
edu.cn
# 国家智慧教育公共服务平台 # 国家智慧教育公共服务平台
cbern.com.cn cbern.com.cn
smartedu.cn smartedu.cn
@@ -91,6 +91,7 @@ eoffcn.com
jinrongren.net jinrongren.net
offcn.com offcn.com
zggqzp.com zggqzp.com
zgjsks.com
zgsydw.com zgsydw.com
# 高考100 # 高考100
gk100.com gk100.com
@@ -105,6 +106,9 @@ xir.cn
# 日语测试 # 日语测试
j-test.com j-test.com
nattest-china.com nattest-china.com
# 菁优网
jyeoo.com
jyeoo.net
# 课播云校 # 课播云校
keboyunxiao.com keboyunxiao.com
# 课堂派 # 课堂派
@@ -118,6 +122,11 @@ llscdn.com
llsserver.com llsserver.com
# 马哥教育 # 马哥教育
magedu.com magedu.com
# 墨墨背单词
maimemo.com
maimemostatus.com
# 墨墨记忆卡
markji.com
# CIS NanoMasters # CIS NanoMasters
neoscholar.com neoscholar.com
neoschool.com neoschool.com
@@ -127,6 +136,8 @@ oldboyedu.com
pigai.org pigai.org
# 公考知识库 # 公考知识库
saduck.top saduck.top
# 外研在线
unipus.cn
# 未来云校 # 未来云校
weilaiyunxiao.com weilaiyunxiao.com
# 北京嘉瑞新创教育咨询有限公司 # 北京嘉瑞新创教育咨询有限公司

View File

@@ -17,11 +17,10 @@ bouffalolab.com
cxmt.com cxmt.com
# 乐鑫信息科技 # 乐鑫信息科技
#include:espressif
esp8266.cn esp8266.cn
esp8266.com
esp8266.com.cn esp8266.com.cn
espressif.cn espressif.cn
espressif.com
espressif.com.cn espressif.com.cn
# 华秋电子 # 华秋电子

View File

@@ -97,6 +97,7 @@ omobi.cc
oranum.com oranum.com
overcast.fm overcast.fm
qobuz.com qobuz.com
sendvid.com
syosetu.com syosetu.com
weverse.io weverse.io
yande.re yande.re

View File

@@ -44,6 +44,8 @@ ldmnq.com
lsplayer.com lsplayer.com
yeshen.com yeshen.com
# 172Mix 舞曲音乐
172mix.com
# 17K小说 # 17K小说
17k.com 17k.com
# https://github.com/supzhang/epg # https://github.com/supzhang/epg
@@ -55,14 +57,19 @@ anitabi.cn
# 暴风影音 # 暴风影音
baofeng.com baofeng.com
baofeng.net baofeng.net
# 街机地图
bemanicn.com
# 布咕阅读 # 布咕阅读
bgwxc.com bgwxc.com
# B站空降助手 # B站空降助手
bsbsb.top bsbsb.top
# CdkeyNoGap
cdkeynogap.com
# 动漫之家 #703 # 动漫之家 #703
dmzj.com dmzj.com
muwai.com muwai.com
# 懂球帝 # 懂球帝
dongdianqiu.com
dongqiudi.com dongqiudi.com
# 飞卢小说 # 飞卢小说
faloo.com faloo.com

View File

@@ -11,6 +11,7 @@ include:okko
include:wink include:wink
24h.tv 24h.tv
amediateka.ru amediateka.ru
beeline.tv
ivi.ru ivi.ru
premier.one premier.one
smotreshka.tv smotreshka.tv

View File

@@ -13,7 +13,7 @@ include:gaijin
include:garena include:garena
include:gog include:gog
include:hoyoverse include:hoyoverse
include:illusion # Dead include:illusion
include:itchio include:itchio
include:lowiro include:lowiro
include:modrinth include:modrinth
@@ -55,6 +55,7 @@ joinsquad.com
loverslab.com loverslab.com
minecraft.wiki minecraft.wiki
mobimon.com.tw mobimon.com.tw
muvluv-girls-garden.com
nexus-cdn.com nexus-cdn.com
nexusmods.com nexusmods.com
noxygames.com noxygames.com

View File

@@ -18,8 +18,10 @@ cbr.ru # Central Bank of Russia
cikrf.ru # Central Electoral Commission of the Russian Federation cikrf.ru # Central Electoral Commission of the Russian Federation
ebs.ru # Unified Biometric System ebs.ru # Unified Biometric System
goskey.ru # GosKey - an electronic signature on a smartphone goskey.ru # GosKey - an electronic signature on a smartphone
grfc.ru # General radio frequency center
izbirkom.ru # Information on ongoing elections and referendums izbirkom.ru # Information on ongoing elections and referendums
kremlin.ru # Online representation of the President of Russia kremlin.ru # Online representation of the President of Russia
mil.ru # Ministry of Defense of the Russian Federation
nalog.ru # Federal Tax Service nalog.ru # Federal Tax Service
xn--80ajghhoc2aj1c8b.xn--p1ai # Honest Sign - State Labeling System xn--80ajghhoc2aj1c8b.xn--p1ai # Honest Sign - State Labeling System

View File

@@ -1,66 +1,145 @@
include:ipip
2ip.io 2ip.io
2ip.ru 2ip.ru
2ip.ua 2ip.ua
51degrees.com
abstractapi.com abstractapi.com
apiip.net
apivoid.com
bigdatacloud.net bigdatacloud.net
check-host.net
checkip.org
checkip.ru
country.is
curlmyip.net
dadata.ru
db-ip.com db-ip.com
extreme-ip-lookup.com extreme-ip-lookup.com
find-my-ip.com
find-my-ip.net
findip.net
flagfox.net
fraudguard.io fraudguard.io
fraudlogix.com
freegeoip.app freegeoip.app
freeipapi.com freeipapi.com
geodatatool.com
geoip.noc.gov.ru
geojs.io
geolocation-db.com
geoplugin.com
geoplugin.net geoplugin.net
getipintel.net getipintel.net
greip.io
hackertarget.com
httpbin.org
icanhazip.com
ident.me
ifconfig.co ifconfig.co
ifconfig.es
ifconfig.me ifconfig.me
ip-adress.com
ip-api.com ip-api.com
ip-api.io
ip-api.ru
ip-check.info
ip-score.com ip-score.com
ip.me
ip.sb
ip2c.org
ip2location.com ip2location.com
ip2location.io ip2location.io
ip2ruscity.com
ip4.me ip4.me
ip6.me ip6.me
ip6only.me ip6only.me
ip8.com ip8.com
ipaddr.site
ipaddress.com
ipaddress.my ipaddress.my
ipaddress.sh
ipapi.co ipapi.co
ipapi.com
ipapi.is
ipbase.com ipbase.com
ipcalf.com
ipchicken.com ipchicken.com
ipdata.co ipdata.co
ipecho.net
ipfind.io ipfind.io
ipfinder.io
ipgeolocation.io ipgeolocation.io
ipify.org ipify.org
ipinfo.io ipinfo.io
iplark.com @cn
ipleak.net ipleak.net
ipligence.com
iplocate.io iplocate.io
iplocation.com
iplocation.io iplocation.io
iplocation.net iplocation.net
ipqualityscore.com ipqualityscore.com
ipquery.io
ipregistry.co ipregistry.co
iproyal.com
ipstack.com ipstack.com
ipverify.com
ipw.cn @cn
ipwhois.io ipwhois.io
ipxapi.com
l2.io
maxmind.com maxmind.com
mon-ip.com mon-ip.com
monip.org monip.org
my.ipinfo.app
myexternalip.com myexternalip.com
myip.com myip.com
myip.ms myip.ms
myip.ru myip.ru
myip.wtf
myipaddress.com myipaddress.com
myiplookup.com
mylocation.org
osint.sh
proxycheck.io proxycheck.io
realip.cc
seeip.org seeip.org
showmyip.com showmyip.com
showmyipaddress.com showmyipaddress.com
spur.us
sxgeo.city sxgeo.city
sypexgeo.net sypexgeo.net
tnx.nl
tracemyip.org tracemyip.org
trustmyip.com
wgetip.com
whatismyip.com whatismyip.com
whatismyip.net whatismyip.net
whatismyip.org whatismyip.org
whatismyipaddress.com whatismyipaddress.com
whatismyipaddress.net
whatismyisp.com whatismyisp.com
whatismyv6.com whatismyv6.com
whatsmyip.com whatsmyip.com
whatsmyip.org whatsmyip.org
where-am-i.co where-am-i.co
whoer.net whoer.net
whoerip.com
whoisxmlapi.com
wieistmeineip.de wieistmeineip.de
wtfismyip.com wtfismyip.com
# Subdomains/internal api used for ip-geo-detect
full:checkip.amazonaws.com
full:ipv4-check-perf.radar.cloudflare.com
full:ipv6-check-perf.radar.cloudflare.com
geoip.noc.gov.ru
ip.hetzner.com
ip.mail.ru
ip.nic.ru
ip.tyk.nu
ipgeo.vercel.app
ipv4-internet.yandex.net
ipv6-internet.yandex.net
whois.pconline.com.cn @cn

View File

@@ -135,6 +135,10 @@ kksmg.com
statickksmg.com statickksmg.com
# 晚点 # 晚点
latepost.com latepost.com
# 雷科技
leikeji.com
# 雷峰网
leiphone.com
# 今日观察网 # 今日观察网
miercn.com miercn.com
# 快科技 # 快科技
@@ -206,14 +210,21 @@ techweb.com.cn
thecover.cn thecover.cn
# 澎湃新闻 # 澎湃新闻
thepaper.cn thepaper.cn
# 潮新闻/浙江日报
8531.cn
tidenews.com.cn
# 人人都是产品经理 # 人人都是产品经理
woshipm.com woshipm.com
# 新华日报
xhby.net
# 西陆网 # 西陆网
xilu.com xilu.com
# 新快报 # 新快报
xkb.com.cn xkb.com.cn
# 第一财经 # 第一财经
yicai.com yicai.com
# 扬子晚报
yzwb.net
# ZEALER # ZEALER
zealer.com zealer.com
# 知产力 # 知产力

View File

@@ -25,8 +25,9 @@ include:hentaichen
include:hentaivn include:hentaivn
include:heyzo include:heyzo
include:hooligapps include:hooligapps
include:illusion # Dead include:illusion
include:illusion-nonofficial include:illusion-nonofficial
include:illgames
include:jable include:jable
include:japonx include:japonx
include:javbus include:javbus
@@ -137,6 +138,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 +2225,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,12 +2694,14 @@ 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
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
@@ -2758,6 +2764,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
@@ -2791,7 +2798,9 @@ javprime.net
javpub.me javpub.me
javpush.com javpush.com
javqd.com javqd.com
javquick.com
javrank.com javrank.com
javrate.com
javrave.club javrave.club
javroot.com javroot.com
javscat.net javscat.net
@@ -2816,6 +2825,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 +3597,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 +5577,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 +6165,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

@@ -24,10 +24,15 @@ spvb.ru # Saint-Petersburg Stock Exchange
# Financial marketplace # Financial marketplace
banki.ru banki.ru
finuslugi.ru finuslugi.ru
# Investment
sistema-capital.com
# Mir payment system # Mir payment system
mirpayonline.ru mirpayonline.ru
# National Payment Card System # National Payment Card System
nspk.ru nspk.ru
# Tipping service
netmonet.co
tips.tips
# Telecom operators # Telecom operators
beeline.ru beeline.ru
@@ -49,4 +54,6 @@ ngenix.net # NGENIX is a Russian provider of acceleration and security servi
pochta.ru # Russian post pochta.ru # Russian post
qms.ru # Russian internet speed testing service qms.ru # Russian internet speed testing service
rustore.ru # RuStore is a Russian mobile app store for Android rustore.ru # RuStore is a Russian mobile app store for Android
t1.cloud # Russian cloud storage provider
taxsee.com # Taxi for business (self-employed drivers) taxsee.com # Taxi for business (self-employed drivers)
yclients.com # Russian SaaS platform for online booking and business automation for service companies

View File

@@ -8,7 +8,6 @@ include:doi
include:elsevier include:elsevier
include:google-scholar include:google-scholar
include:ieee include:ieee
include:knovel
include:mit include:mit
include:proquest include:proquest
include:sci-hub include:sci-hub

View File

@@ -6,9 +6,20 @@ include:instagram
include:linkedin include:linkedin
include:mailru include:mailru
include:misskey include:misskey
include:mixi
include:ok include:ok
include:threads include:threads
include:twitter include:twitter
include:vk include:vk
onlyfans.com
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

@@ -3,33 +3,62 @@ include:openspeedtest
cnspeedtest.cn @cn cnspeedtest.cn @cn
fast.com fast.com
fastspeedtest.com
linkmeter.net
measurementlab.net measurementlab.net
meter.net
nperf.com nperf.com
openspeedtest.ru
speed.cloudflare.com speed.cloudflare.com
speed.dler.io speed.dler.io
speed.ee
speed.hinet.net speed.hinet.net
speed.nccu.edu.tw speed.nccu.edu.tw
speed.neu6.edu.cn @cn speed.neu6.edu.cn @cn
speed.nju.edu.cn @cn
speed.nuaa.edu.cn @cn speed.nuaa.edu.cn @cn
speed.qlu.edu.cn @cn speed.qlu.edu.cn @cn
speed.ujs.edu.cn @cn speed.ujs.edu.cn @cn
speed6.ujs.edu.cn @cn
speed2.hinet.net speed2.hinet.net
speed5.ntu.edu.tw speed5.ntu.edu.tw
speed6.ujs.edu.cn @cn
speedcheck.org
speedgeo.net
speedof.me
speedtest.cesnet.cz
speedtest.ch
speedtest.citylink.pro
speedtest.cn @cn speedtest.cn @cn
speedtest.co.za
speedtest.de
speedtest.dno-it.ru
speedtest.frontier.com
speedtest.im speedtest.im
speedtest.mail.ru
speedtest.mfcyun.com @cn speedtest.mfcyun.com @cn
speedtest.net.in
speedtest.net.ua
speedtest.net.uk
speedtest.org
speedtest.rt.ru
speedtest.ru
speedtest.shaw.ca
speedtest.shu.edu.cn @cn speedtest.shu.edu.cn @cn
speedtest6.shu.edu.cn @cn speedtest.su
speedtest.uz
speedtest.volia.com
speedtest.xaut.edu.cn @cn speedtest.xaut.edu.cn @cn
speedtest.xfinity.com speedtest.xfinity.com
speedtestcustom.com speedtest.xyz
test.ustc.edu.cn @cn speedtest24.ru
test6.ustc.edu.cn @cn speedtest6.shu.edu.cn @cn
test.nju.edu.cn @cn test.nju.edu.cn @cn
test.ustc.edu.cn @cn
test6.nju.edu.cn @cn test6.nju.edu.cn @cn
speed.nju.edu.cn @cn test6.ustc.edu.cn @cn
testmy.net testmy.net
testmyspeed.com
testskorosti.ru
xnfz.seu.edu.cn @cn xnfz.seu.edu.cn @cn
full:hk-global-bgp.hkg.speedtest.yecaoyun.com @!cn full:hk-global-bgp.hkg.speedtest.yecaoyun.com @!cn

View File

@@ -0,0 +1,3 @@
include:bitly
include:shorturl
include:tinyurl

View File

@@ -1,3 +1,4 @@
allhistory.com
fgo.wiki fgo.wiki
jikipedia.com jikipedia.com
mbalib.com mbalib.com

View File

@@ -16,6 +16,9 @@ miguvideo.com
# 中移金科 # 中移金科
cmft.com.cn cmft.com.cn
# 中移支付 和包
cmpay.com
# 中移在线 # 中移在线
cmcc-cs.cn cmcc-cs.cn
online-cmcc.cn online-cmcc.cn

View File

@@ -1,10 +1,11 @@
include:ctexcel include:ctexcel
189.cn 189.cn
bestpay.cn
bestpay.com.cn
chinatelecom-h.com chinatelecom-h.com
chinatelecom.com.cn chinatelecom.com.cn
chinatelecomglobal.com @!cn chinatelecomglobal.com @!cn
chinatelecomhk.com @!cn
chntel.com chntel.com
vnet.cn vnet.cn
chinatelecomhk.com @!cn

View File

@@ -18,6 +18,7 @@ cuguplus.com @!cn
cuniq.com @!cn cuniq.com @!cn
cuniq.sg @!cn cuniq.sg @!cn
mychinaunicom.com mychinaunicom.com
unicompayment.com
wo.cn wo.cn
wo.com.cn wo.com.cn
wo116114.com wo116114.com

View File

@@ -1,6 +1,7 @@
chobit.cc chobit.cc
ci-en.jp ci-en.jp
ci-en.net ci-en.net
dlaf.jp
dlsite.com dlsite.com
dlsite.com.tw dlsite.com.tw
dlsite.jp dlsite.jp

View File

@@ -1 +0,0 @@
doc88.com

View File

@@ -1,2 +0,0 @@
docin.com
douding.cn

View File

@@ -65,3 +65,6 @@ supercachenode.com
ultracachenode.com ultracachenode.com
woaihuoshan.com woaihuoshan.com
wohst8.com wohst8.com
# 抖音支付
douyinpay.com

View File

@@ -45,6 +45,8 @@ include:paypal
include:softbank include:softbank
include:stripe include:stripe
include:visa include:visa
## アプリペイ
app-pay.jp
# CDN companies & Services # CDN companies & Services
include:category-cdn-!cn include:category-cdn-!cn
@@ -83,7 +85,6 @@ include:embl
include:freecodecamp include:freecodecamp
include:kaggle include:kaggle
include:khanacademy include:khanacademy
include:knovel
include:laracasts include:laracasts
include:libgen include:libgen
include:lifewire include:lifewire
@@ -156,6 +157,7 @@ include:category-enhance-gaming
include:category-mobile-repair include:category-mobile-repair
include:category-ntp include:category-ntp
include:category-password-management include:category-password-management
include:category-urlshortner
include:category-web-archive include:category-web-archive
include:decryptipastore # iOS include:decryptipastore # iOS
@@ -170,7 +172,6 @@ include:addtoany
include:adguard include:adguard
include:aptoide include:aptoide
include:arphic include:arphic
include:bitly
include:blender include:blender
include:brightcove include:brightcove
include:buymeacoffee include:buymeacoffee
@@ -224,7 +225,6 @@ include:sb
include:setapp include:setapp
include:sharethis include:sharethis
include:shopify include:shopify
include:shorturl
include:slideshare include:slideshare
include:sourceforge include:sourceforge
include:squareup include:squareup
@@ -234,7 +234,6 @@ include:svp
include:test-ipv6 include:test-ipv6
include:tex include:tex
include:tidelift include:tidelift
include:tinyurl
include:trello include:trello
include:tumblr include:tumblr
include:tutanota include:tutanota
@@ -259,6 +258,10 @@ cookielaw.org
onetrust.com onetrust.com
osano.com osano.com
usercentrics.eu usercentrics.eu
## Dynatrace
dynatrace.com
## FamilySearch
familysearch.org
## Greasy Fork ## Greasy Fork
greasyfork.org greasyfork.org
## Online LaTeX Editor ## Online LaTeX Editor
@@ -308,7 +311,6 @@ wiki.gg
# Others # Others
include:avaxhome include:avaxhome
include:dlsite
include:espressif include:espressif
include:familymart include:familymart
include:fzdm include:fzdm
@@ -324,3 +326,5 @@ include:tsquare
include:windy include:windy
include:xdty include:xdty
include:xingrz include:xingrz
sinyalee.com

View File

@@ -45,6 +45,8 @@ include:taikang
## 航财通·校园付 ## 航财通·校园付
cc-pay.cn cc-pay.cn
## 合利宝
helipay.com
## 徽商期货有限责任公司 ## 徽商期货有限责任公司
hsqh.net hsqh.net
## 上海陆金所 ## 上海陆金所
@@ -53,6 +55,8 @@ lufax.com
lufaxcdn.com lufaxcdn.com
## 银豹收银系统 ## 银豹收银系统
pospal.cn pospal.cn
## 上海付费通
shfft.com
# CDN or SDWAN # CDN or SDWAN
include:category-cdn-cn include:category-cdn-cn
@@ -180,6 +184,10 @@ wuyou.net # 无忧启动论坛
x-station.cn # X电站 x-station.cn # X电站
znds.com # 智能电视网 znds.com # 智能电视网
# DCC Forum心跳文学部中文论坛
edgemonix.top # 图床
monika.love
423down.com # 423Down 423down.com # 423Down
acwifi.net # 路由器技术分享 acwifi.net # 路由器技术分享
appinn.com # 小众软件 appinn.com # 小众软件
@@ -214,27 +222,73 @@ mingxuan.store
gov.cn gov.cn
## 中国气象局 ## 中国气象局
cma.cn cma.cn
## 政务和公益机构域名注册管理中心
conac.cn
## 中央气象台 ## 中央气象台
nmc.cn nmc.cn
## 中国互联网联合辟谣平台
piyao.org.cn
# Public transportation # Public transportation
include:airchina # 中国国际航空 ## 中国国际航空
include:hainanairlines # 海南航空 include:airchina
## 海南航空
include:hainanairlines
## 长安航空
airchangan.com
## 桂林航空
airguilin.com
## 中国东方航空
ceair.com
## 春秋航空
ch.com
china-sss.com
springairlines.com
## 华夏航空
chinaexpressair.com
## 中国南方航空
csair.com
## 中国联合航空
flycua.com
## 广西北部湾航空
gxairlines.com
## 河北航空
hbhk.com.cn
## 首都航空
jdair.net
## 吉祥航空
juneyaoair.com
## 长龙航空
loongair.cn
## 祥鹏航空
luckyair.net
## 山东航空
sda.cn
## 深圳航空
shenzhenair.com
## 四川航空
sichuanair.com
## 天津航空
tianjin-air.com
## 西藏航空
tibetairlines.com.cn
## 乌鲁木齐航空
urumqi-air.com
## 厦门航空
xiamenair.com
## 中国民航局
caac.gov.cn
## 信天游(航空电子客票验真)
travelskymobile.cn
## 航旅纵横
umetrip.com
umetrip.com.cn
umetrip.net.cn
ume-trip.cn
## 飞常准
variflight.com
# 中国民航局 caac.gov.cn
ceair.com # 中国东方航空
chinaexpressair.com # 华夏航空
csair.com # 中国南方航空
flycua.com # 中国联合航空
hbhk.com.cn # 河北航空
jdair.net # 首都航空
juneyaoair.com # 吉祥航空
luckyair.net # 祥鹏航空
sichuanair.com # 四川航空
tibetairlines.com.cn # 西藏航空
travelskymobile.cn # 信天游(航空电子客票验真)
variflight.com # 飞常准
xiamenair.com # 厦门航空
## Railway ## Railway
12306.cn 12306.cn
95306.cn 95306.cn
@@ -249,11 +303,6 @@ kuajing84.com
mygolbs.com mygolbs.com
## 宁停车 ## 宁停车
ningtingche.com ningtingche.com
## 航旅纵横
umetrip.com
umetrip.com.cn
umetrip.net.cn
ume-trip.cn
# Science & Technology & Knowledge & Scholar & Press & E-learning & Education # Science & Technology & Knowledge & Scholar & Press & E-learning & Education
include:category-education-cn include:category-education-cn
@@ -276,10 +325,14 @@ webterren.com
## 国学大师网 ## 国学大师网
guoxuedashi.com guoxuedashi.com
guoxuemi.com guoxuemi.com
## 志愿汇
zyh365.com
## 温州市图书馆 ## 温州市图书馆
wzlib.cn wzlib.cn
## 中国大百科全书
zgbk.com
## 浙江图书馆
zjlib.cn
## 志愿汇
zyh365.com
# Services & Softwares # Services & Softwares
include:category-ai-cn include:category-ai-cn
@@ -417,6 +470,7 @@ xbext.com
yinxiang.com yinxiang.com
## 智联招聘 ## 智联招聘
zhaopin.cn zhaopin.cn
zhaopin.com
# Tech companies & Orginations # Tech companies & Orginations
include:aisiku # 北京艾斯酷科技有限公司 include:aisiku # 北京艾斯酷科技有限公司
@@ -487,6 +541,9 @@ hlgdata.com
huanleguang.com huanleguang.com
ttxsapp.com.cn ttxsapp.com.cn
xsbapp.cn xsbapp.cn
# 凯迪仕
juziwulian.com
kaadas.com
# Telecommunication # Telecommunication
include:chinabroadnet include:chinabroadnet
@@ -599,7 +656,6 @@ ycrx360.com
35.com 35.com
3533.com 3533.com
360aiyi.com 360aiyi.com
360doc.com
360jq.com 360jq.com
360zhyx.com 360zhyx.com
365azw.com 365azw.com
@@ -636,7 +692,6 @@ ycrx360.com
52z.com 52z.com
53kf.com 53kf.com
55.com 55.com
56.com
5577.com 5577.com
55bbs.com 55bbs.com
58pic.com 58pic.com
@@ -682,8 +737,6 @@ aiemy.com
aiketour.com aiketour.com
aiops.com aiops.com
aipai.com aipai.com
airchangan.com
airguilin.com
aiskycn.com aiskycn.com
aizhan.com aizhan.com
aldwx.com # 京ICP备17030349号-1 aldwx.com # 京ICP备17030349号-1
@@ -747,7 +800,6 @@ cecdc.com
cecport.com cecport.com
centanet.com centanet.com
cerambath.org cerambath.org
ch.com
chachaba.com chachaba.com
changba.com changba.com
chaojituzi.net chaojituzi.net
@@ -932,7 +984,6 @@ gupzs.com
gushiwen.org gushiwen.org
guzhangting.com guzhangting.com
gwdang.com gwdang.com
gxairlines.com
gxb.io gxb.io
gzcqs.com gzcqs.com
gzwanju.com gzwanju.com
@@ -1069,8 +1120,6 @@ lascn.net
lawxp.com lawxp.com
leangoo.com leangoo.com
leanote.com leanote.com
leikeji.com
leiphone.com
leiting.com leiting.com
leju.com leju.com
leturich.org leturich.org
@@ -1290,7 +1339,6 @@ taoche.com
te5.com te5.com
tenxcloud.com tenxcloud.com
tianjimedia.com tianjimedia.com
tianjin-air.com
tianlailive.com tianlailive.com
tietuku.com tietuku.com
tiexue.net tiexue.net
@@ -1326,7 +1374,6 @@ ucbug.com
uggame.com uggame.com
uoko.com uoko.com
urselect.com urselect.com
urumqi-air.com
useso.com useso.com
uuu9.com uuu9.com
uzzf.com uzzf.com
@@ -1353,7 +1400,6 @@ weand.com
weavatar.com weavatar.com
weicaifu.com weicaifu.com
weilaicaijing.com weilaicaijing.com
weiphone.net
weixing.com weixing.com
weiyangx.com weiyangx.com
welltrend-edu.com welltrend-edu.com
@@ -1460,7 +1506,6 @@ youxigt.com
youzu.com youzu.com
yoyojie.com yoyojie.com
yoyou.com yoyou.com
ypppt.com
yrz.name yrz.name
yslyhr.com yslyhr.com
ysten.com ysten.com
@@ -1483,7 +1528,6 @@ zastatic.com
zczj.com zczj.com
zdfans.com zdfans.com
zgjm.org zgjm.org
zgjsks.com
zglxw.com zglxw.com
zgzcw.com zgzcw.com
zhanbuba.com zhanbuba.com
@@ -1491,7 +1535,6 @@ zhangyoubao.com
zhanzhang.net zhanzhang.net
zhaodanji.com zhaodanji.com
zhaokao.net zhaokao.net
zhaopin.com
zhcw.com zhcw.com
zhenai.com zhenai.com
zhibo8.cc zhibo8.cc
@@ -1502,15 +1545,11 @@ zhongkao.com
zhuangjiba.com zhuangjiba.com
zhuanyewanjia.com zhuanyewanjia.com
zhuayoukong.com zhuayoukong.com
zimuzu.io
zixiaomao.com zixiaomao.com
zixuntop.com zixuntop.com
zmengzhu.com zmengzhu.com
zpb365.com zpb365.com
zrblog.net
zsxq.com
zuhaowan.com zuhaowan.com
zuidaima.com
zuowen.com zuowen.com
zuowen8.com zuowen8.com
zuowenwang.net zuowenwang.net
@@ -1586,3 +1625,6 @@ ao-x.ac.cn
# 万集科技 京ICP备18036282号-2 # 万集科技 京ICP备18036282号-2
wanji.net.cn wanji.net.cn
# 广州市雅望互联网服务有限公司
gzyowin.com

View File

@@ -8,6 +8,7 @@ icloud-content.com
icloud-isupport.com icloud-isupport.com
icloud-sandbox.com icloud-sandbox.com
icloud.ch icloud.ch
icloud.cn @cn
icloud.com icloud.com
icloud.com.cn @cn icloud.com.cn @cn
icloud.de icloud.de

3
data/illgames Normal file
View File

@@ -0,0 +1,3 @@
# Also known as "Illusion"
illgames.jp
japan-illgames.com

View File

@@ -1,2 +1,3 @@
# Dead: https://en.wikipedia.org/wiki/Illusion_(company)
illusion.co.jp illusion.co.jp
illusion.jp illusion.jp

View File

@@ -1,13 +1,15 @@
datalore.io
intellij.com intellij.com
intellij.net intellij.net
intellij.org intellij.org
jb.gg
jetbrains.cloud
jetbrains.com jetbrains.com
jetbrains.net jetbrains.net
jetbrains.space jetbrains.space
jetbrains.team jetbrains.team
datalore.io
kotlinlang.org kotlinlang.org
youtrack.cloud
cdn.jetbrains.com @cn cdn.jetbrains.com @cn
download-cdn.jetbrains.com.cn @cn download-cdn.jetbrains.com.cn @cn
jb.gg
youtrack.cloud

View File

@@ -1,5 +1,3 @@
esm.run
jsdelivr.com jsdelivr.com
jsdelivr.net jsdelivr.net
esm.run
full:cdn.jsdelivr.net

View File

@@ -1,2 +1,5 @@
calorietech.com
gotokeep.com gotokeep.com
keep.com
keep.com.cn
keepcdn.com keepcdn.com

View File

@@ -3,6 +3,7 @@ kinopub.online
kpdl.link kpdl.link
# Mirror sites # Mirror sites
ahc.ovh # sub domains mirror
gfw.ovh # sub domains mirror gfw.ovh # sub domains mirror
mos-gorsud.co # kinopub domain to generate a mirror site through gfw.ovh mos-gorsud.co # kinopub domain to generate a mirror site through gfw.ovh
@@ -11,5 +12,6 @@ cdn-service.space
cdn2cdn.com cdn2cdn.com
cdn2site.com cdn2site.com
pushbr.com # poster images CDN pushbr.com # poster images CDN
smarttvcdn.online
regexp:(\w+)-static-[0-9]+\.cdntogo\.net$ regexp:(\w+)-static-[0-9]+\.cdntogo\.net$

View File

@@ -1 +0,0 @@
knovel.com

View File

@@ -9,3 +9,7 @@ max.ru
memealerts.com memealerts.com
oneme.ru oneme.ru
tamtam.chat tamtam.chat
youla.io
youla.ru
full:youla-web-static.mrgcdn.ru

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

3
data/mixi Normal file
View File

@@ -0,0 +1,3 @@
mixi.co.jp
mixi.jp
mixi.net

View File

@@ -1,6 +1,5 @@
include:firefox include:firefox
include:mdn include:mdn
include:rust
mozgcp.net mozgcp.net
mozilla.com mozilla.com
@@ -24,7 +23,10 @@ seamonkey-project.org
thunderbird.net thunderbird.net
# Mozilla Location Service # Mozilla Location Service
location.services.mozilla.com # * Overrided by above `mozilla.com`
# * In March 2024, Mozilla announced the project was being discontinued
#location.services.mozilla.com
# Mozilla Push Service # Mozilla Push Service
push.services.mozilla.com # * Overrided by above `mozilla.com`
#push.services.mozilla.com

View File

@@ -32,6 +32,7 @@ static163.net
ydstatic.com ydstatic.com
yeah.net yeah.net
youdao.com youdao.com
yunxindns.com
yunxinfw.com yunxinfw.com
zhuanzfx.com zhuanzfx.com

View File

@@ -1 +0,0 @@
nixos.org

View File

@@ -1,5 +1,6 @@
22112211.xyz 22112211.xyz
deepflood.com deepflood.com
nodeget.com
nodeimage.com nodeimage.com
nodequality.com nodequality.com
nodeseek.com nodeseek.com

View File

@@ -59,6 +59,7 @@ tegrazone.com
tegrazone.jp tegrazone.jp
tegrazone.kr tegrazone.kr
full:nvidia.custhelp.com
full:nvidia.tt.omtrdc.net full:nvidia.tt.omtrdc.net
# NVIDIA 文件下载服务器中国镜像 # NVIDIA 文件下载服务器中国镜像

View File

@@ -1,3 +1,6 @@
ok.ru ok.ru
okcdn.ru okcdn.ru
mycdn.me mycdn.me
full:st-ok-pts.cdn-vk.ru
full:st-ok.cdn-vk.ru

View File

@@ -1,10 +1,14 @@
# All .oracle domains # All .oracle domains
oracle oracle
include:addthis
include:java
ateam-oracle.com ateam-oracle.com
bronto.com bronto.com
covid19-rx.org covid19-rx.org
covid19rx.org covid19rx.org
custhelp.com
oracle.com oracle.com
oraclecloud.com oraclecloud.com
oraclefoundation.org oraclefoundation.org
@@ -12,6 +16,3 @@ oracleimg.com
oracleinfinity.io oracleinfinity.io
sun.com sun.com
virtualbox.org virtualbox.org
include:addthis
include:java

View File

@@ -1 +0,0 @@
osdn.net

View File

@@ -2,4 +2,5 @@ perplexity.ai
perplexity.com perplexity.com
pplx.ai pplx.ai
full:ppl-ai-file-upload.s3.amazonaws.com
full:pplx-res.cloudinary.com full:pplx-res.cloudinary.com

14
data/plex Normal file
View File

@@ -0,0 +1,14 @@
# Plex Media Server domains
# Basic domains for Plex services
plex.com
plex.services
plex.tv
plexapp.com
# Note for Plex users
# * Plex's mechanism requires certain domains to go through a direct connection.
# * Using a proxy for these domains may cause the system to malfunction.
# * If you wish to access plex domains through a proxy, remember to ensure the following domains remain directly connected.
# * Related domains:
# plex.direct
# v4.plex.tv

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

@@ -1 +0,0 @@
piwheels.org

View File

@@ -258,13 +258,14 @@ tdnsv14.net
tdnsv15.net tdnsv15.net
# myqcloud inside mainland China # myqcloud inside mainland China
regexp:\.(.+-)?ap-beijing(-.+)?\.myqcloud\.com$ #北京 # overrided by myqcloud.com
regexp:\.(.+-)?ap-nanjing(-.+)?\.myqcloud\.com$ # #regexp:\.(.+-)?ap-beijing(-.+)?\.myqcloud\.com$ #
regexp:\.(.+-)?ap-shanghai(-.+)?\.myqcloud\.com$ #上海 #regexp:\.(.+-)?ap-nanjing(-.+)?\.myqcloud\.com$ #南京
regexp:\.(.+-)?ap-guangzhou(-.+)?\.myqcloud\.com$ #广州 #regexp:\.(.+-)?ap-shanghai(-.+)?\.myqcloud\.com$ #上海
regexp:\.(.+-)?ap-chengdu(-.+)?\.myqcloud\.com$ #成都 #regexp:\.(.+-)?ap-guangzhou(-.+)?\.myqcloud\.com$ #广州
regexp:\.(.+-)?ap-chongqing(-.+)?\.myqcloud\.com$ #重庆 #regexp:\.(.+-)?ap-chengdu(-.+)?\.myqcloud\.com$ #成都
regexp:\.(.+-)?ap-shenzhen(-.+)?\.myqcloud\.com$ #深圳 #regexp:\.(.+-)?ap-chongqing(-.+)?\.myqcloud\.com$ #重庆
#regexp:\.(.+-)?ap-shenzhen(-.+)?\.myqcloud\.com$ #深圳
# COS 使用到的非中国大陆的地域与可用区,参见 https://cloud.tencent.com/document/product/436/6224 # COS 使用到的非中国大陆的地域与可用区,参见 https://cloud.tencent.com/document/product/436/6224
ap-hongkong.myqcloud.com @!cn #中国香港 ap-hongkong.myqcloud.com @!cn #中国香港
@@ -282,13 +283,14 @@ eu-frankfurt.myqcloud.com @!cn #法兰克福
eu-moscow.myqcloud.com @!cn #莫斯科 eu-moscow.myqcloud.com @!cn #莫斯科
# tencentcos inside mainland China # tencentcos inside mainland China
regexp:\.(.+-)?ap-beijing(-.+)?\.tencentcos\.(cn|com(\.cn)?)$ #北京 # overrided by tencentcos.cn, tencentcos.com, tencentcos.com.cn
regexp:\.(.+-)?ap-nanjing(-.+)?\.tencentcos\.(cn|com(\.cn)?)$ # #regexp:\.(.+-)?ap-beijing(-.+)?\.tencentcos\.(cn|com(\.cn)?)$ #
regexp:\.(.+-)?ap-shanghai(-.+)?\.tencentcos\.(cn|com(\.cn)?)$ #上海 #regexp:\.(.+-)?ap-nanjing(-.+)?\.tencentcos\.(cn|com(\.cn)?)$ #南京
regexp:\.(.+-)?ap-guangzhou(-.+)?\.tencentcos\.(cn|com(\.cn)?)$ #广州 #regexp:\.(.+-)?ap-shanghai(-.+)?\.tencentcos\.(cn|com(\.cn)?)$ #上海
regexp:\.(.+-)?ap-chengdu(-.+)?\.tencentcos\.(cn|com(\.cn)?)$ #成都 #regexp:\.(.+-)?ap-guangzhou(-.+)?\.tencentcos\.(cn|com(\.cn)?)$ #广州
regexp:\.(.+-)?ap-chongqing(-.+)?\.tencentcos\.(cn|com(\.cn)?)$ #重庆 #regexp:\.(.+-)?ap-chengdu(-.+)?\.tencentcos\.(cn|com(\.cn)?)$ #成都
regexp:\.(.+-)?ap-shenzhen(-.+)?\.tencentcos\.(cn|com(\.cn)?)$ #深圳 #regexp:\.(.+-)?ap-chongqing(-.+)?\.tencentcos\.(cn|com(\.cn)?)$ #重庆
#regexp:\.(.+-)?ap-shenzhen(-.+)?\.tencentcos\.(cn|com(\.cn)?)$ #深圳
# tencentcos outside mainland China # tencentcos outside mainland China
# regexp:.+\.ap-hongkong\.tencentcos\.(cn|com(\.cn)?)$ @!cn #中国香港 # regexp:.+\.ap-hongkong\.tencentcos\.(cn|com(\.cn)?)$ @!cn #中国香港

View File

@@ -1 +0,0 @@
remirepo.net

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

@@ -19,7 +19,9 @@ samsungeshop.com.cn @cn
samsunggalaxyfriends.com samsunggalaxyfriends.com
samsunghealth.com samsunghealth.com
samsungiotcloud.com samsungiotcloud.com
samsungiots.com
samsungknox.com samsungknox.com
samsungosp.com samsungosp.com
samsungqbe.com samsungqbe.com
samsungrs.com samsungrs.com
smartthings.com

View File

@@ -19,13 +19,14 @@ th.weibo.com @!cn
tw.weibo.com @!cn tw.weibo.com @!cn
us.weibo.com @!cn us.weibo.com @!cn
videoself.cn videoself.cn
wbimg.com
wbimg.cn wbimg.cn
wbimg.com
wcdn.cn wcdn.cn
weibo.cn weibo.cn
weibo.com weibo.com
weibo.com.cn weibo.com.cn
weibocdn.com weibocdn.com
weibopay.com
xhaiwai.com xhaiwai.com
# Ads/tracking # Ads/tracking

View File

@@ -9,6 +9,10 @@ itc.cn
sohu.com sohu.com
sohucs.com sohucs.com
# 56网
56.com
56img.com
# Ads/tracking # Ads/tracking
adnet.sohu.com @ads adnet.sohu.com @ads
ads.sohu.com @ads ads.sohu.com @ads

View File

@@ -20,6 +20,7 @@ tiktokv.eu @!cn
tiktokv.us @!cn tiktokv.us @!cn
tiktokw.eu @!cn tiktokw.eu @!cn
tiktokw.us @!cn tiktokw.us @!cn
ttcdn-us.com @!cn
ttlivecdn.com @!cn ttlivecdn.com @!cn
ttoverseaus.net @!cn ttoverseaus.net @!cn
ttwstatic.com @!cn ttwstatic.com @!cn

5
data/tilda Normal file
View File

@@ -0,0 +1,5 @@
tilda.cc
tilda.ru
tilda.ws
tildaapi.com
tildacdn.com

View File

@@ -1 +0,0 @@
topcoder.com

View File

@@ -1 +0,0 @@
vim.org

View File

@@ -1,3 +1,4 @@
feng.com feng.com
fengimg.com fengimg.com
weiphone.net
wfdata.club wfdata.club

View File

@@ -1,6 +1,7 @@
videopress.com videopress.com
w.org w.org
wordpress.com wordpress.com
wordpress.net
wordpress.org wordpress.org
wordpress.tv wordpress.tv
wp-themes.com wp-themes.com

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

@@ -53,8 +53,10 @@ yandexadexchange.net
yandexcloud.net yandexcloud.net
yandexcom.net yandexcom.net
yandexmetrica.com yandexmetrica.com
yandexwebcache.net
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

449
main.go
View File

@@ -2,6 +2,7 @@ package main
import ( import (
"bufio" "bufio"
"encoding/json"
"flag" "flag"
"fmt" "fmt"
"os" "os"
@@ -19,21 +20,15 @@ var (
dataPath = flag.String("datapath", "./data", "Path to your custom 'data' directory") dataPath = flag.String("datapath", "./data", "Path to your custom 'data' directory")
outputName = flag.String("outputname", "dlc.dat", "Name of the generated dat file") outputName = flag.String("outputname", "dlc.dat", "Name of the generated dat file")
outputDir = flag.String("outputdir", "./", "Directory to place all generated files") outputDir = flag.String("outputdir", "./", "Directory to place all generated files")
datProfile = flag.String("datprofile", "", "Path of config file used to assemble custom dats")
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,7 +43,30 @@ type ParsedList struct {
Entries []*Entry Entries []*Entry
} }
func makeProtoList(listName string, entries []*Entry) (*router.GeoSite, error) { type Processor struct {
plMap map[string]*ParsedList
finalMap map[string][]*Entry
cirIncMap map[string]bool
}
type GeoSites struct {
Sites []*router.GeoSite
SiteIdx map[string]int
}
type DatTask struct {
Name string `json:"name"`
Mode string `json:"mode"`
Lists []string `json:"lists"`
}
const (
ModeAll string = "all"
ModeAllowlist string = "allowlist"
ModeDenylist string = "denylist"
)
func makeProtoList(listName string, entries []*Entry) *router.GeoSite {
site := &router.GeoSite{ site := &router.GeoSite{
CountryCode: listName, CountryCode: listName,
Domain: make([]*router.Domain, 0, len(entries)), Domain: make([]*router.Domain, 0, len(entries)),
@@ -74,7 +92,91 @@ func makeProtoList(listName string, entries []*Entry) (*router.GeoSite, error) {
} }
site.Domain = append(site.Domain, pdomain) site.Domain = append(site.Domain, pdomain)
} }
return site, nil return site
}
func loadTasks(path string) ([]DatTask, error) {
f, err := os.Open(path)
if err != nil {
return nil, err
}
defer f.Close()
var tasks []DatTask
dec := json.NewDecoder(f)
if err := dec.Decode(&tasks); err != nil {
return nil, fmt.Errorf("failed to decode json: %w", err)
}
for i, t := range tasks {
if t.Name == "" {
return nil, fmt.Errorf("task[%d]: name is required", i)
}
switch t.Mode {
case ModeAll, ModeAllowlist, ModeDenylist:
default:
return nil, fmt.Errorf("task[%d] %q: invalid mode %q", i, t.Name, t.Mode)
}
}
return tasks, nil
}
func (gs *GeoSites) assembleDat(task DatTask) error {
datFileName := strings.ToLower(filepath.Base(task.Name))
geoSiteList := new(router.GeoSiteList)
switch task.Mode {
case ModeAll:
geoSiteList.Entry = gs.Sites
case ModeAllowlist:
allowedIdxes := make([]int, 0, len(task.Lists))
for _, list := range task.Lists {
if idx, ok := gs.SiteIdx[strings.ToUpper(list)]; ok {
allowedIdxes = append(allowedIdxes, idx)
} else {
return fmt.Errorf("list %q not found for allowlist task", list)
}
}
slices.Sort(allowedIdxes)
allowedlen := len(allowedIdxes)
if allowedlen == 0 {
return fmt.Errorf("allowlist needs at least one valid list")
}
geoSiteList.Entry = make([]*router.GeoSite, allowedlen)
for i, idx := range allowedIdxes {
geoSiteList.Entry[i] = gs.Sites[idx]
}
case ModeDenylist:
deniedMap := make(map[int]bool, len(task.Lists))
for _, list := range task.Lists {
if idx, ok := gs.SiteIdx[strings.ToUpper(list)]; ok {
deniedMap[idx] = true
} else {
fmt.Printf("[Warn] list %q not found in denylist task %q", list, task.Name)
}
}
deniedlen := len(deniedMap)
if deniedlen == 0 {
fmt.Printf("[Warn] nothing to deny in task %q", task.Name)
geoSiteList.Entry = gs.Sites
} else {
geoSiteList.Entry = make([]*router.GeoSite, 0, len(gs.Sites)-deniedlen)
for i, site := range gs.Sites {
if !deniedMap[i] {
geoSiteList.Entry = append(geoSiteList.Entry, site)
}
}
}
}
protoBytes, err := proto.Marshal(geoSiteList)
if err != nil {
return fmt.Errorf("failed to marshal: %w", err)
}
if err := os.WriteFile(filepath.Join(*outputDir, datFileName), protoBytes, 0644); err != nil {
return fmt.Errorf("failed to write file %q: %w", datFileName, err)
}
fmt.Printf("dat %q has been generated successfully\n", datFileName)
return nil
} }
func writePlainList(listname string, entries []*Entry) error { func writePlainList(listname string, entries []*Entry) error {
@@ -90,72 +192,55 @@ func writePlainList(listname string, entries []*Entry) error {
return w.Flush() return w.Flush()
} }
func parseEntry(line string) (Entry, error) { func parseEntry(typ, rule string) (*Entry, []string, error) {
var entry Entry entry := &Entry{Type: typ}
parts := strings.Fields(line) parts := strings.Fields(rule)
if len(parts) == 0 { if len(parts) == 0 {
return entry, fmt.Errorf("empty line") return entry, nil, fmt.Errorf("empty domain rule")
} }
// Parse value
// Parse type and value switch entry.Type {
v := parts[0] case dlc.RuleTypeRegexp:
colonIndex := strings.Index(v, ":") if _, err := regexp.Compile(parts[0]); err != nil {
if colonIndex == -1 { return entry, nil, fmt.Errorf("invalid regexp %q: %w", parts[0], err)
entry.Type = dlc.RuleTypeDomain // Default type }
entry.Value = strings.ToLower(v) entry.Value = parts[0]
case dlc.RuleTypeDomain, dlc.RuleTypeFullDomain, dlc.RuleTypeKeyword:
entry.Value = strings.ToLower(parts[0])
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)
}
} else {
typ := strings.ToLower(v[:colonIndex])
val := v[colonIndex+1:]
switch typ {
case dlc.RuleTypeRegexp:
if _, err := regexp.Compile(val); err != nil {
return entry, fmt.Errorf("invalid regexp %q: %w", val, err)
}
entry.Type = dlc.RuleTypeRegexp
entry.Value = val
case dlc.RuleTypeInclude:
entry.Type = dlc.RuleTypeInclude
entry.Value = strings.ToUpper(val)
if !validateSiteName(entry.Value) {
return entry, fmt.Errorf("invalid include list name: %q", entry.Value)
}
case dlc.RuleTypeDomain, dlc.RuleTypeFullDomain, dlc.RuleTypeKeyword:
entry.Type = typ
entry.Value = strings.ToLower(val)
if !validateDomainChars(entry.Value) {
return entry, fmt.Errorf("invalid domain: %q", entry.Value)
}
default:
return entry, fmt.Errorf("invalid type: %q", typ)
} }
default:
return entry, nil, fmt.Errorf("unknown rule type: %q", entry.Type)
} }
plen := len(entry.Type) + len(entry.Value) + 1
// 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, "&") { plen += 2 + len(attr)
aff := strings.ToUpper(part[1:]) // Trim affiliation prefix `&` character case '&':
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("unknown field: %q", part)
} }
} }
// Sort attributes
slices.Sort(entry.Attrs) slices.Sort(entry.Attrs) // Sort attributes
// Formated plain entry: type:domain.tld:@attr1,@attr2 // Formated plain entry: type:domain.tld:@attr1,@attr2
var plain strings.Builder var plain strings.Builder
plain.Grow(len(entry.Type) + len(entry.Value) + 10) plain.Grow(plen)
plain.WriteString(entry.Type) plain.WriteString(entry.Type)
plain.WriteByte(':') plain.WriteByte(':')
plain.WriteString(entry.Value) plain.WriteString(entry.Value)
@@ -169,11 +254,49 @@ func parseEntry(line string) (Entry, error) {
plain.WriteString(attr) plain.WriteString(attr)
} }
entry.Plain = plain.String() entry.Plain = plain.String()
return entry, affs, nil
}
return entry, nil func parseInclusion(rule string) (*Inclusion, error) {
parts := strings.Fields(rule)
if len(parts) == 0 {
return nil, fmt.Errorf("empty inclusion")
}
inc := &Inclusion{Source: strings.ToUpper(parts[0])}
if !validateSiteName(inc.Source) {
return inc, fmt.Errorf("invalid included list name: %q", inc.Source)
}
// Parse attributes
for _, part := range parts[1:] {
switch part[0] {
case '@':
attr := strings.ToLower(part[1:])
if attr[0] == '-' {
battr := attr[1:]
if !validateAttrChars(battr) {
return inc, fmt.Errorf("invalid ban attribute: %q", battr)
}
inc.BanAttrs = append(inc.BanAttrs, battr)
} else {
if !validateAttrChars(attr) {
return inc, fmt.Errorf("invalid must attribute: %q", attr)
}
inc.MustAttrs = append(inc.MustAttrs, attr)
}
case '&':
return inc, fmt.Errorf("affiliation is not allowed for inclusion")
default:
return inc, fmt.Errorf("unknown field: %q", part)
}
}
return inc, nil
} }
func validateDomainChars(domain string) bool { func validateDomainChars(domain string) bool {
if domain == "" {
return false
}
for i := range domain { for i := range domain {
c := domain[i] c := domain[i]
if (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '.' || c == '-' { if (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '.' || c == '-' {
@@ -185,9 +308,12 @@ func validateDomainChars(domain string) bool {
} }
func validateAttrChars(attr string) bool { func validateAttrChars(attr string) bool {
if attr == "" {
return false
}
for i := range attr { for i := range attr {
c := attr[i] c := attr[i]
if (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '!' || c == '-' { if (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '!' {
continue continue
} }
return false return false
@@ -196,6 +322,9 @@ func validateAttrChars(attr string) bool {
} }
func validateSiteName(name string) bool { func validateSiteName(name string) bool {
if name == "" {
return false
}
for i := range name { for i := range name {
c := name[i] c := name[i]
if (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '!' || c == '-' { if (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '!' || c == '-' {
@@ -206,74 +335,60 @@ 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) typ, rule, isTypeSpecified := strings.Cut(line, ":")
if err != nil { if !isTypeSpecified { // Default RuleType
return entries, fmt.Errorf("error in %q at line %d: %w", path, lineIdx, err) typ, rule = dlc.RuleTypeDomain, typ
} else {
typ = strings.ToLower(typ)
} }
entries = append(entries, &entry) if typ == dlc.RuleTypeInclude {
} inc, err := parseInclusion(rule)
return entries, nil if err != nil {
} return fmt.Errorf("error in %q at line %d: %w", path, lineIdx, err)
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 len(entry.Affs) != 0 {
return fmt.Errorf("affiliation is not allowed for include:%q", entry.Value)
}
inc := &Inclusion{Source: entry.Value}
for _, attr := range entry.Attrs {
if strings.HasPrefix(attr, "-") {
inc.BanAttrs = append(inc.BanAttrs, attr[1:]) // Trim attribute prefix `-` character
} else {
inc.MustAttrs = append(inc.MustAttrs, attr)
}
} }
pl.Inclusions = append(pl.Inclusions, inc) pl.Inclusions = append(pl.Inclusions, inc)
} else { } else {
for _, aff := range entry.Affs { entry, affs, err := parseEntry(typ, rule)
apl, _ := plMap[aff] if err != nil {
if apl == nil { return fmt.Errorf("error in %q at line %d: %w", path, lineIdx, err)
apl = &ParsedList{Name: aff} }
plMap[aff] = apl for _, aff := range affs {
} apl := p.getOrCreateParsedList(aff)
apl.Entries = append(apl.Entries, entry) apl.Entries = append(apl.Entries, entry)
} }
pl.Entries = append(pl.Entries, entry) pl.Entries = append(pl.Entries, entry)
} }
} }
return nil return scanner.Err()
} }
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
} }
@@ -296,9 +411,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 +436,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 +457,39 @@ 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 { // Add included entries
incPl, exist := plMap[inc.Source] if err := p.resolveList(inc.Source); err != nil {
if !exist { return fmt.Errorf("failed to resolve inclusion %q: %w", inc.Source, err)
return fmt.Errorf("list %q includes a non-existent list: %q", pl.Name, inc.Source)
} }
if err := resolveList(incPl); err != nil { isFullInc := len(inc.MustAttrs) == 0 && len(inc.BanAttrs) == 0
return err for _, ientry := range p.finalMap[inc.Source] {
} if isFullInc || isMatchAttrFilters(ientry, inc) {
for _, ientry := range finalMap[inc.Source] {
if isMatchAttrFilters(ientry, inc) { // Add included entries
roughMap[ientry.Plain] = ientry roughMap[ientry.Plain] = ientry
} }
} }
} }
finalMap[pl.Name] = polishList(roughMap) if len(roughMap) == 0 {
return fmt.Errorf("empty list")
}
p.finalMap[plname] = polishList(roughMap)
return nil return nil
} }
@@ -381,8 +497,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,77 +510,82 @@ 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 { sitesCount := len(processor.plMap)
if err := resolveList(pl); err != nil { processor.finalMap = make(map[string][]*Entry, sitesCount)
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)
} }
} }
processor.plMap = nil
// Make sure output directory exists // Make sure output directory exists
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 {
fmt.Printf("list %q does not exist or is empty\n", epList) fmt.Printf("[Warn] list %q does not exist\n", epList)
continue continue
} }
if err := writePlainList(epList, entries); err != nil { if err := writePlainList(epList, entries); err != nil {
fmt.Printf("failed to write list %q: %v\n", epList, err) fmt.Printf("[Error] failed to write list %q: %v\n", epList, err)
continue continue
} }
fmt.Printf("list %q has been generated successfully.\n", epList) fmt.Printf("list %q has been generated successfully\n", epList)
} }
} }
// Generate dat file // Generate proto sites
protoList := new(router.GeoSiteList) gs := &GeoSites{
for siteName, siteEntries := range finalMap { Sites: make([]*router.GeoSite, 0, sitesCount),
site, err := makeProtoList(siteName, siteEntries) SiteIdx: make(map[string]int, sitesCount),
if err != nil {
return fmt.Errorf("failed to makeProtoList %q: %w", siteName, err)
}
protoList.Entry = append(protoList.Entry, site)
} }
// Sort protoList so the marshaled list is reproducible for siteName, siteEntries := range processor.finalMap {
slices.SortFunc(protoList.Entry, func(a, b *router.GeoSite) int { gs.Sites = append(gs.Sites, makeProtoList(siteName, siteEntries))
}
processor = nil
// Sort proto sites so the generated file is reproducible
slices.SortFunc(gs.Sites, func(a, b *router.GeoSite) int {
return strings.Compare(a.CountryCode, b.CountryCode) return strings.Compare(a.CountryCode, b.CountryCode)
}) })
for i := range sitesCount {
gs.SiteIdx[gs.Sites[i].CountryCode] = i
}
protoBytes, err := proto.Marshal(protoList) // Load tasks and generate dat files
if err != nil { var tasks []DatTask
return fmt.Errorf("failed to marshal: %w", err) if *datProfile == "" {
tasks = []DatTask{{Name: *outputName, Mode: ModeAll}}
} else {
var err error
tasks, err = loadTasks(*datProfile)
if err != nil {
return fmt.Errorf("failed to loadTasks %q: %v", *datProfile, err)
}
} }
if err := os.WriteFile(filepath.Join(*outputDir, *outputName), protoBytes, 0644); err != nil { for _, task := range tasks {
return fmt.Errorf("failed to write output: %w", err) if err := gs.assembleDat(task); err != nil {
fmt.Printf("[Error] failed to assembleDat %q: %v", task.Name, err)
}
} }
fmt.Printf("%q has been generated successfully.\n", *outputName)
return nil return nil
} }
func main() { func main() {
flag.Parse() flag.Parse()
if err := run(); err != nil { if err := run(); err != nil {
fmt.Printf("Fatal error: %v\n", err) fmt.Printf("[Fatal] critical error: %v\n", err)
os.Exit(1) os.Exit(1)
} }
} }