mirror of
https://github.com/Loyalsoldier/v2ray-rules-dat.git
synced 2026-01-13 04:57:12 +08:00
Compare commits
118 Commits
2020060322
...
2024120622
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d1d9d86c6 | ||
|
|
c62962b3a3 | ||
|
|
6ef9d7fe53 | ||
|
|
49674b1965 | ||
|
|
0cfe32fca3 | ||
|
|
d0de54a692 | ||
|
|
e3a5b8659f | ||
|
|
bf0dd8bb98 | ||
|
|
7d24a931c8 | ||
|
|
67b3167659 | ||
|
|
03b709e5ac | ||
|
|
4e03d6b1ea | ||
|
|
171a33c9ad | ||
|
|
4ad108cc03 | ||
|
|
a42e1fc7eb | ||
|
|
89dc99780a | ||
|
|
6a45361741 | ||
|
|
c6b6ce1b55 | ||
|
|
7a937e7cf3 | ||
|
|
f6a48e35eb | ||
|
|
1728a3bf05 | ||
|
|
467b44b760 | ||
|
|
49289a0a3c | ||
|
|
106d799bf3 | ||
|
|
1971d7a499 | ||
|
|
012a6308ee | ||
|
|
12e336e982 | ||
|
|
03d4e100dc | ||
|
|
1aaa2c3955 | ||
|
|
41248053f3 | ||
|
|
2ed2fba720 | ||
|
|
6961566065 | ||
|
|
2af1272d91 | ||
|
|
ac755bf110 | ||
|
|
12939697c3 | ||
|
|
9926d01d75 | ||
|
|
a5493afd04 | ||
|
|
2f1bd7ab4d | ||
|
|
036184df55 | ||
|
|
4ed156d7f2 | ||
|
|
ad309a7706 | ||
|
|
8cb84a1a3a | ||
|
|
235e8968c2 | ||
|
|
080cc5f1bc | ||
|
|
13c933da65 | ||
|
|
29deedd739 | ||
|
|
a1f75daf61 | ||
|
|
7e34cb7a21 | ||
|
|
18f0a8301a | ||
|
|
c99bec25ad | ||
|
|
d54f2a5424 | ||
|
|
ba6139b8fe | ||
|
|
9486e7b460 | ||
|
|
0fae67f885 | ||
|
|
ccc66630b4 | ||
|
|
a14c3c75f7 | ||
|
|
755fb3a7dd | ||
|
|
ef437ef849 | ||
|
|
7518b62b89 | ||
|
|
3b5d3a6e3c | ||
|
|
d8eb17e6af | ||
|
|
63e7a195b6 | ||
|
|
7b7796af37 | ||
|
|
bca4f6aad8 | ||
|
|
7d6e9bcafa | ||
|
|
8b4b8a8480 | ||
|
|
bfd0a1bb8b | ||
|
|
4f9d05fe91 | ||
|
|
824225fdab | ||
|
|
ee3c14f985 | ||
|
|
51e9036dd0 | ||
|
|
96c87a28e4 | ||
|
|
a53a0ae385 | ||
|
|
0409cd0700 | ||
|
|
3eab7b50bb | ||
|
|
ef25cd9548 | ||
|
|
56a1f9a3e9 | ||
|
|
1db68c7c32 | ||
|
|
e045a62c16 | ||
|
|
763593d1d2 | ||
|
|
009d45de30 | ||
|
|
bc34b4ccb5 | ||
|
|
71ad6509d7 | ||
|
|
a45cb43350 | ||
|
|
1f67d96328 | ||
|
|
4bc33dbb67 | ||
|
|
4e13d64b85 | ||
|
|
9307cf6d71 | ||
|
|
bd473323eb | ||
|
|
cc0f3550ec | ||
|
|
af804d9879 | ||
|
|
cc7852a932 | ||
|
|
b55e79edda | ||
|
|
1e2773eda5 | ||
|
|
9d2366d892 | ||
|
|
dc95dd0f1f | ||
|
|
7f98db18f7 | ||
|
|
1e4898fd50 | ||
|
|
501e8d121e | ||
|
|
842c180663 | ||
|
|
0463521801 | ||
|
|
6308edf8f2 | ||
|
|
1e0bafc21f | ||
|
|
992b02fa83 | ||
|
|
fc4062c3e7 | ||
|
|
9bdbf8e49a | ||
|
|
320f8849ff | ||
|
|
368a00b913 | ||
|
|
bcefb05796 | ||
|
|
45ade5b9ff | ||
|
|
05b4021505 | ||
|
|
896b809632 | ||
|
|
8148a3bac2 | ||
|
|
54b01cd838 | ||
|
|
d9ffcd313b | ||
|
|
14f9756d78 | ||
|
|
f3acc73a29 | ||
|
|
4d73ef6f3d |
15
.github/dependabot.yml
vendored
Normal file
15
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
timezone: "Asia/Shanghai"
|
||||
time: "07:00"
|
||||
pull-request-branch-name:
|
||||
separator: "-"
|
||||
177
.github/workflows/build.yml
vendored
177
.github/workflows/build.yml
vendored
@@ -1,177 +0,0 @@
|
||||
name: Build V2Ray rules dat files
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 22 * * *"
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- hidden
|
||||
paths-ignore:
|
||||
- "**/README.md"
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Go 1.14
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.14
|
||||
|
||||
- name: Set $GOPATH and more variables
|
||||
run: |
|
||||
echo "::set-env name=RELEASE_NAME::Released on $(date +%Y%m%d%H%M)"
|
||||
echo "::set-env name=TAG_NAME::$(date +%Y%m%d%H%M)"
|
||||
echo "::set-env name=GEOIP_REPO::github.com/Loyalsoldier/geoip"
|
||||
echo "::set-env name=GEOSITE_REPO::github.com/v2ray/domain-list-community"
|
||||
echo "::set-env name=CHINA_DOMAINS_URL::https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf"
|
||||
echo "::set-env name=GOOGLE_DOMAINS_URL::https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/google.china.conf"
|
||||
echo "::set-env name=APPLE_DOMAINS_URL::https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/apple.china.conf"
|
||||
echo "::set-env name=GFWLIST_DOMAINS_URL::https://cokebar.github.io/gfwlist2dnsmasq/gfwlist_domain.txt"
|
||||
echo "::set-env name=GFWLIST_EXTRAS_DOMAINS_URL::https://raw.githubusercontent.com/pexcn/gfwlist-extras/master/gfwlist-extras.txt"
|
||||
echo "::set-env name=GREATFIRE_DOMAINS_URL::https://raw.githubusercontent.com/wongsyrone/domain-block-list/master/domains.txt"
|
||||
echo "::set-env name=GREATFIRE_DOMAINS_MINE_URL::https://raw.githubusercontent.com/Loyalsoldier/cn-blocked-domain/release/domains.txt"
|
||||
echo "::set-env name=PROFILES_URL::https://raw.githubusercontent.com/ConnersHua/Profiles/master/Shadow/Pro.conf"
|
||||
echo "::set-env name=GEQ1AN_RULES_APPLE_URL::https://raw.githubusercontent.com/GeQ1an/Rules/master/QuantumultX/Filter/Apple.list"
|
||||
echo "::set-env name=GEQ1AN_RULES_MICROSOFT_URL::https://raw.githubusercontent.com/GeQ1an/Rules/master/QuantumultX/Filter/Optional/Microsoft.list"
|
||||
echo "::set-env name=GEQ1AN_RULES_GLOBAL_MEDIA_URL::https://raw.githubusercontent.com/GeQ1an/Rules/master/QuantumultX/Filter/GMedia.list"
|
||||
echo "::set-env name=GEQ1AN_RULES_OUTSIDE_URL::https://raw.githubusercontent.com/GeQ1an/Rules/master/QuantumultX/Filter/Outside.list"
|
||||
echo "::set-env name=GEQ1AN_RULES_REJECT_URL::https://raw.githubusercontent.com/GeQ1an/Rules/master/QuantumultX/Filter/AdBlock.list"
|
||||
echo "::set-env name=LHIE1_RULES_PROXY_URL::https://raw.githubusercontent.com/lhie1/Rules/master/Surge/Surge%203/Provider/Proxy.list"
|
||||
echo "::set-env name=LHIE1_RULES_REJECT_URL::https://raw.githubusercontent.com/lhie1/Rules/master/Surge/Surge%203/Provider/Reject.list"
|
||||
echo "::set-env name=ADAWAY_REJECT_URL::https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt"
|
||||
echo "::set-env name=GOPATH::$(dirname $GITHUB_WORKSPACE)"
|
||||
echo "::add-path::$(dirname $GITHUB_WORKSPACE)/bin"
|
||||
shell: bash
|
||||
|
||||
- name: Checkout the "hidden" branch
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: hidden
|
||||
|
||||
- name: Get GeoLite2 zip file
|
||||
run: |
|
||||
curl -L -o GeoLite2-Country-CSV.zip "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country-CSV&license_key=JvbzLLx7qBZT&suffix=zip"
|
||||
unzip GeoLite2-Country-CSV.zip
|
||||
rm -f GeoLite2-Country-CSV.zip
|
||||
mv GeoLite2* geoip
|
||||
|
||||
- name: Generate geoip.dat file
|
||||
run: |
|
||||
go get -u -v -insecure $GEOIP_REPO
|
||||
geoip --country=./geoip/GeoLite2-Country-Locations-en.csv --ipv4=./geoip/GeoLite2-Country-Blocks-IPv4.csv --ipv6=./geoip/GeoLite2-Country-Blocks-IPv6.csv --cnipv4url=https://raw.githubusercontent.com/pexcn/daily/gh-pages/chnroute/chnroute.txt
|
||||
mkdir -p ./publish
|
||||
mv ./geoip.dat ./publish/
|
||||
|
||||
- name: Download geosite project
|
||||
run: |
|
||||
go get -u -v -insecure $GEOSITE_REPO
|
||||
|
||||
- name: Get and add direct domains into temp-direct.txt file
|
||||
run: |
|
||||
curl -sSL $CHINA_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "$1\n"' > temp-direct.txt
|
||||
|
||||
- name: Get and add proxy domains into temp-proxy.txt file
|
||||
run: |
|
||||
curl -sSL $GFWLIST_DOMAINS_URL | perl -ne '/^((?=^.{3,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})+)/ && print "$1\n"' > temp-proxy.txt
|
||||
curl -sSL $GFWLIST_EXTRAS_DOMAINS_URL | perl -ne 'print if not /^(#|\s)/' >> temp-proxy.txt
|
||||
curl -sSL $GREATFIRE_DOMAINS_URL | perl -ne '/^((?=^.{3,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})+)/ && print "$1\n"' >> temp-proxy.txt
|
||||
curl -sSL $GREATFIRE_DOMAINS_MINE_URL | perl -ne '/^((?=^.{3,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})+)/ && print "$1\n"' >> temp-proxy.txt
|
||||
curl -sSL $GOOGLE_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "$1\n"' >> temp-proxy.txt
|
||||
curl -sSL $APPLE_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "$1\n"' >> temp-proxy.txt
|
||||
curl -sSL $PROFILES_URL | awk -F ',' '/^DOMAIN(,|\-SUFFIX,).+PROXY/ {print $2}' >> temp-proxy.txt
|
||||
curl -sSL $GEQ1AN_RULES_APPLE_URL | awk -F ',' '/^(HOST|DOMAIN)(,|\-SUFFIX,).+Apple/ {print $2}' >> temp-proxy.txt
|
||||
curl -sSL $GEQ1AN_RULES_MICROSOFT_URL | awk -F ',' '/^(HOST|DOMAIN)(,|\-SUFFIX,).+Microsoft/ {print $2}' >> temp-proxy.txt
|
||||
curl -sSL $GEQ1AN_RULES_GLOBAL_MEDIA_URL | awk -F ',' '/^(HOST|DOMAIN)(,|\-SUFFIX,).+GMedia/ {print $2}' >> temp-proxy.txt
|
||||
curl -sSL $GEQ1AN_RULES_OUTSIDE_URL | awk -F ',' '/^(HOST|DOMAIN)(,|\-SUFFIX,).+Outside/ {print $2}' >> temp-proxy.txt
|
||||
curl -sSL $LHIE1_RULES_PROXY_URL | awk -F ',' '/^(HOST|DOMAIN)(,|\-SUFFIX,).+/ {print $2}' >> temp-proxy.txt
|
||||
|
||||
- name: Get and add reject domains into temp-reject.txt file
|
||||
run: |
|
||||
curl -sSL $PROFILES_URL | awk -F ',' '/^DOMAIN(,|\-SUFFIX,).+REJECT/ {print $2}' > temp-reject.txt
|
||||
curl -sSL $GEQ1AN_RULES_REJECT_URL | awk -F ',' '/^(HOST|DOMAIN)(,|\-SUFFIX,).+AdBlock/ {print $2}' >> temp-reject.txt
|
||||
curl -sSL $LHIE1_RULES_REJECT_URL | awk -F ',' '/^DOMAIN(,|\-SUFFIX,).+/ {print $2}' >> temp-reject.txt
|
||||
curl -sSL $ADAWAY_REJECT_URL | grep "127.0.0.1" | sed '1d' | awk '{print $2}' >> temp-reject.txt
|
||||
|
||||
- name: Add proxy, direct and reject domains from "hidden" branch to appropriate temp files
|
||||
run: |
|
||||
cat proxy.txt >> temp-proxy.txt
|
||||
cat direct.txt >> temp-direct.txt
|
||||
cat reject.txt >> temp-reject.txt
|
||||
|
||||
- name: Sort and generate redundant lists
|
||||
run: |
|
||||
cat temp-proxy.txt | sort --ignore-case -u | perl -ne '/^((?=^.{3,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})+)/ && print "$1\n"' > proxy-list-with-redundant
|
||||
cat temp-proxy.txt | sort --ignore-case -u | perl -ne 'print if not /^((?=^.{3,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})+)/' > proxy-excluse-list
|
||||
cat temp-direct.txt | sort --ignore-case -u | perl -ne '/^((?=^.{3,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})+)/ && print "$1\n"' > direct-list-with-redundant
|
||||
cat temp-direct.txt | sort --ignore-case -u | perl -ne 'print if not /^((?=^.{3,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})+)/' > direct-excluse-list
|
||||
cat temp-reject.txt | sort --ignore-case -u | perl -ne '/^((?=^.{3,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})+)/ && print "$1\n"' > reject-list-with-redundant
|
||||
cat temp-reject.txt | sort --ignore-case -u | perl -ne 'print if not /^((?=^.{3,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})+)/' > reject-excluse-list
|
||||
|
||||
- name: Remove redundant domains
|
||||
run: |
|
||||
chmod +x findRedundantDomain.py
|
||||
./findRedundantDomain.py ./direct-list-with-redundant ./direct-list-deleted-unsort
|
||||
./findRedundantDomain.py ./proxy-list-with-redundant ./proxy-list-deleted-unsort
|
||||
./findRedundantDomain.py ./reject-list-with-redundant ./reject-list-deleted-unsort
|
||||
[ ! -f "direct-list-deleted-unsort" ] && touch direct-list-deleted-unsort
|
||||
[ ! -f "proxy-list-deleted-unsort" ] && touch proxy-list-deleted-unsort
|
||||
[ ! -f "reject-list-deleted-unsort" ] && touch reject-list-deleted-unsort
|
||||
sort ./direct-list-deleted-unsort > ./direct-list-deleted-sort
|
||||
sort ./proxy-list-deleted-unsort > ./proxy-list-deleted-sort
|
||||
sort ./reject-list-deleted-unsort > ./reject-list-deleted-sort
|
||||
diff ./direct-list-deleted-sort ./direct-list-with-redundant | awk '/^>/{print $2}' > ./direct-list-without-redundant
|
||||
diff ./proxy-list-deleted-sort ./proxy-list-with-redundant | awk '/^>/{print $2}' > ./proxy-list-without-redundant
|
||||
diff ./reject-list-deleted-sort ./reject-list-with-redundant | awk '/^>/{print $2}' > ./reject-list-without-redundant
|
||||
|
||||
- name: Remove domains from "need-to-remove" lists in "hidden" branch and remove domains end with ".cn" in proxy-list
|
||||
run: |
|
||||
diff ./direct-need-to-remove.txt ./direct-list-without-redundant | awk '/^>/{print $2}' > $GOPATH/src/$GEOSITE_REPO/data/direct-list
|
||||
diff ./proxy-need-to-remove.txt ./proxy-list-without-redundant | awk '/^>/{print $2}' | perl -ne 'print if not /\.cn$/' > $GOPATH/src/$GEOSITE_REPO/data/proxy-list
|
||||
diff ./reject-need-to-remove.txt ./reject-list-without-redundant | awk '/^>/{print $2}' > $GOPATH/src/$GEOSITE_REPO/data/reject-list
|
||||
|
||||
- name: Add list into appropriate category file
|
||||
run: |
|
||||
cd $GOPATH/src/$GEOSITE_REPO/data
|
||||
echo "include:proxy-list" >> geolocation-\!cn
|
||||
echo "include:direct-list" >> cn
|
||||
echo "include:reject-list" >> category-ads-all
|
||||
|
||||
- name: Build geosite.dat file
|
||||
run: |
|
||||
domain-list-community --datapath=${{ env.GOPATH }}/src/${{ env.GEOSITE_REPO }}/data
|
||||
mv ./dlc.dat ./publish/geosite.dat
|
||||
mv ./*-excluse-list ./publish/
|
||||
cp -f $GOPATH/src/$GEOSITE_REPO/data/{proxy,direct,reject}-list ./publish/
|
||||
|
||||
- name: Zip files and generate sha256 hash
|
||||
run: |
|
||||
cd ./publish
|
||||
zip rules.zip {proxy,direct,reject}-list *.dat
|
||||
sha256sum geoip.dat > geoip.dat.sha256sum
|
||||
sha256sum geosite.dat > geosite.dat.sha256sum
|
||||
sha256sum rules.zip > rules.zip.sha256sum
|
||||
|
||||
- name: Release and upload assets
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: ${{ env.RELEASE_NAME }}
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
files: |
|
||||
./publish/*
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Git push assets to "release" branch
|
||||
run: |
|
||||
cd publish
|
||||
git init
|
||||
git config --local user.name "${{ github.actor }}"
|
||||
git config --local user.email "${{ github.actor }}@users.noreply.github.com"
|
||||
git checkout -b release
|
||||
git add .
|
||||
git commit -m "${{ env.RELEASE_NAME }}"
|
||||
git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
|
||||
git push -f -u origin release
|
||||
211
.github/workflows/run.yml
vendored
Normal file
211
.github/workflows/run.yml
vendored
Normal file
@@ -0,0 +1,211 @@
|
||||
name: Build V2Ray rules dat files
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 22 * * *"
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- "**/README.md"
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set variables
|
||||
run: |
|
||||
echo "RELEASE_NAME=Released on $(date +%Y%m%d%H%M)" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$(date +%Y%m%d%H%M)" >> $GITHUB_ENV
|
||||
echo "CHINA_DOMAINS_URL=https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf" >> $GITHUB_ENV
|
||||
echo "GOOGLE_DOMAINS_URL=https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/google.china.conf" >> $GITHUB_ENV
|
||||
echo "APPLE_DOMAINS_URL=https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/apple.china.conf" >> $GITHUB_ENV
|
||||
echo "EASYLISTCHINA_EASYLIST_REJECT_URL=https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt" >> $GITHUB_ENV
|
||||
echo "PETERLOWE_REJECT_URL=https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext" >> $GITHUB_ENV
|
||||
echo "ADGUARD_DNS_REJECT_URL=https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt" >> $GITHUB_ENV
|
||||
echo "DANPOLLOCK_REJECT_URL=https://someonewhocares.org/hosts/hosts" >> $GITHUB_ENV
|
||||
echo "CUSTOM_DIRECT=https://raw.githubusercontent.com/Loyalsoldier/domain-list-custom/release/cn.txt" >> $GITHUB_ENV
|
||||
echo "CUSTOM_PROXY=https://raw.githubusercontent.com/Loyalsoldier/domain-list-custom/release/geolocation-!cn.txt" >> $GITHUB_ENV
|
||||
echo "WIN_SPY=https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt" >> $GITHUB_ENV
|
||||
echo "WIN_UPDATE=https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/update.txt" >> $GITHUB_ENV
|
||||
echo "WIN_EXTRA=https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/extra.txt" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- name: Checkout the "hidden" branch of this repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: hidden
|
||||
|
||||
- name: Checkout Loyalsoldier/domain-list-custom
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: Loyalsoldier/domain-list-custom
|
||||
path: custom
|
||||
|
||||
- name: Checkout v2fly/domain-list-community
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: v2fly/domain-list-community
|
||||
path: community
|
||||
|
||||
- name: Checkout cokebar/gfwlist2dnsmasq
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: cokebar/gfwlist2dnsmasq
|
||||
path: gfwlist2dnsmasq
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: ./custom/go.mod
|
||||
cache-dependency-path: ./custom/go.sum
|
||||
|
||||
- name: Get geoip.dat relative files
|
||||
run: |
|
||||
wget https://github.com/Loyalsoldier/geoip/raw/release/geoip.dat
|
||||
wget https://github.com/Loyalsoldier/geoip/raw/release/geoip.dat.sha256sum
|
||||
|
||||
- name: Generate GFWList domains
|
||||
run: |
|
||||
cd gfwlist2dnsmasq || exit 1
|
||||
chmod +x ./gfwlist2dnsmasq.sh
|
||||
./gfwlist2dnsmasq.sh -l -o ./temp-gfwlist.txt
|
||||
|
||||
- name: Get and add direct domains into temp-direct.txt file
|
||||
run: |
|
||||
curl -sSL $CHINA_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "$1\n"' > temp-direct.txt
|
||||
curl -sSL ${CUSTOM_DIRECT} | perl -ne '/^(domain):([^:]+)(\n$|:@.+)/ && print "$2\n"' >> temp-direct.txt
|
||||
|
||||
- name: Get and add proxy domains into temp-proxy.txt file
|
||||
run: |
|
||||
cat ./gfwlist2dnsmasq/temp-gfwlist.txt | perl -ne '/^((?=^.{3,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})+)/ && print "$1\n"' > temp-proxy.txt
|
||||
curl -sSL $GOOGLE_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "$1\n"' >> temp-proxy.txt
|
||||
curl -sSL $APPLE_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "$1\n"' >> temp-proxy.txt
|
||||
curl -sSL ${CUSTOM_PROXY} | grep -Ev ":@cn" | perl -ne '/^(domain):([^:]+)(\n$|:@.+)/ && print "$2\n"' >> temp-proxy.txt
|
||||
|
||||
- name: Get and add reject domains into temp-reject.txt file
|
||||
run: |
|
||||
curl -sSL $EASYLISTCHINA_EASYLIST_REJECT_URL | perl -ne '/^\|\|([-_0-9a-zA-Z]+(\.[-_0-9a-zA-Z]+){1,64})\^$/ && print "$1\n"' | perl -ne 'print if not /^[0-9]{1,3}(\.[0-9]{1,3}){3}$/' > temp-reject.txt
|
||||
curl -sSL $ADGUARD_DNS_REJECT_URL | perl -ne '/^\|\|([-_0-9a-zA-Z]+(\.[-_0-9a-zA-Z]+){1,64})\^$/ && print "$1\n"' | perl -ne 'print if not /^[0-9]{1,3}(\.[0-9]{1,3}){3}$/' >> temp-reject.txt
|
||||
curl -sSL $PETERLOWE_REJECT_URL | perl -ne '/^127\.0\.0\.1\s([-_0-9a-zA-Z]+(\.[-_0-9a-zA-Z]+){1,64})$/ && print "$1\n"' >> temp-reject.txt
|
||||
curl -sSL $DANPOLLOCK_REJECT_URL | perl -ne '/^127\.0\.0\.1\s([-_0-9a-zA-Z]+(\.[-_0-9a-zA-Z]+){1,64})/ && print "$1\n"' | sed '1d' >> temp-reject.txt
|
||||
|
||||
- name: Reserve `full`, `regexp` and `keyword` type of rules from custom lists to "reserve" files
|
||||
run: |
|
||||
curl -sSL ${CUSTOM_DIRECT} | perl -ne '/^((full|regexp|keyword):[^:]+)(\n$|:@.+)/ && print "$1\n"' | sort --ignore-case -u > direct-reserve.txt
|
||||
curl -sSL ${CUSTOM_PROXY} | grep -Ev ":@cn" | perl -ne '/^((full|regexp|keyword):[^:]+)(\n$|:@.+)/ && print "$1\n"' | sort --ignore-case -u > proxy-reserve.txt
|
||||
|
||||
- name: Add proxy, direct and reject domains from "hidden" branch to appropriate temp files
|
||||
run: |
|
||||
cat proxy.txt >> temp-proxy.txt
|
||||
cat direct.txt >> temp-direct.txt
|
||||
cat reject.txt >> temp-reject.txt
|
||||
|
||||
- name: Sort and generate redundant lists
|
||||
run: |
|
||||
cat temp-proxy.txt | sort --ignore-case -u > proxy-list-with-redundant
|
||||
cat temp-direct.txt | sort --ignore-case -u > direct-list-with-redundant
|
||||
cat temp-reject.txt | sort --ignore-case -u > reject-list-with-redundant
|
||||
|
||||
- name: Remove redundant domains
|
||||
run: |
|
||||
chmod +x findRedundantDomain.py
|
||||
./findRedundantDomain.py ./direct-list-with-redundant ./direct-list-deleted-unsort
|
||||
./findRedundantDomain.py ./proxy-list-with-redundant ./proxy-list-deleted-unsort
|
||||
./findRedundantDomain.py ./reject-list-with-redundant ./reject-list-deleted-unsort
|
||||
[ ! -f "direct-list-deleted-unsort" ] && touch direct-list-deleted-unsort
|
||||
[ ! -f "proxy-list-deleted-unsort" ] && touch proxy-list-deleted-unsort
|
||||
[ ! -f "reject-list-deleted-unsort" ] && touch reject-list-deleted-unsort
|
||||
sort ./direct-list-deleted-unsort > ./direct-list-deleted-sort
|
||||
sort ./proxy-list-deleted-unsort > ./proxy-list-deleted-sort
|
||||
sort ./reject-list-deleted-unsort > ./reject-list-deleted-sort
|
||||
diff ./direct-list-deleted-sort ./direct-list-with-redundant | awk '/^>/{print $2}' > ./direct-list-without-redundant
|
||||
diff ./proxy-list-deleted-sort ./proxy-list-with-redundant | awk '/^>/{print $2}' > ./proxy-list-without-redundant
|
||||
diff ./reject-list-deleted-sort ./reject-list-with-redundant | awk '/^>/{print $2}' > ./reject-list-without-redundant
|
||||
|
||||
- name: Remove domains from "need-to-remove" lists in "hidden" branch
|
||||
run: |
|
||||
diff ./direct-need-to-remove.txt ./direct-list-without-redundant | awk '/^>/{print $2}' > temp-cn.txt
|
||||
diff ./proxy-need-to-remove.txt ./proxy-list-without-redundant | awk '/^>/{print $2}' > temp-geolocation-\!cn.txt
|
||||
diff ./reject-need-to-remove.txt ./reject-list-without-redundant | awk '/^>/{print $2}' > temp-category-ads-all.txt
|
||||
|
||||
- name: Write lists to data directory
|
||||
run: |
|
||||
cat temp-cn.txt | sort --ignore-case -u | perl -ne '/^((?=^.{1,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})*)/ && print "$1\n"' > ./community/data/cn
|
||||
cat temp-cn.txt | sort --ignore-case -u | perl -ne 'print if not /^((?=^.{3,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})+)/' > direct-tld-list.txt
|
||||
cat temp-geolocation-\!cn.txt | sort --ignore-case -u | perl -ne '/^((?=^.{1,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})*)/ && print "$1\n"' > ./community/data/geolocation-\!cn
|
||||
cat temp-geolocation-\!cn.txt | sort --ignore-case -u | perl -ne 'print if not /^((?=^.{3,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})+)/' > proxy-tld-list.txt
|
||||
cat temp-category-ads-all.txt | sort --ignore-case -u | perl -ne '/^((?=^.{1,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})*)/ && print "$1\n"' > ./community/data/category-ads-all
|
||||
cat temp-category-ads-all.txt | sort --ignore-case -u | perl -ne 'print if not /^((?=^.{3,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})+)/' > reject-tld-list.txt
|
||||
|
||||
- name: Add `full`, `regexp` and `keyword` type of rules back into "cn", "geolocation-!cn" and "category-ads-all" list
|
||||
run: |
|
||||
[ -f "direct-reserve.txt" ] && cat direct-reserve.txt >> ./community/data/cn
|
||||
[ -f "proxy-reserve.txt" ] && cat proxy-reserve.txt >> ./community/data/geolocation-\!cn
|
||||
[ -f "reject-reserve.txt" ] && cat reject-reserve.txt >> ./community/data/category-ads-all
|
||||
cp ./community/data/cn direct-list.txt
|
||||
cp ./community/data/geolocation-\!cn proxy-list.txt
|
||||
cp ./community/data/category-ads-all reject-list.txt
|
||||
|
||||
- name: Create `china-list`、`google-cn`、`apple-cn`、`gfw`、`greatfire` lists
|
||||
run: |
|
||||
curl -sSL $CHINA_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "$1\n"' > ./community/data/china-list
|
||||
curl -sSL $CHINA_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "$1\n"' > china-list.txt
|
||||
curl -sSL $GOOGLE_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "full:$1\n"' > ./community/data/google-cn
|
||||
curl -sSL $GOOGLE_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "full:$1\n"' > google-cn.txt
|
||||
curl -sSL $APPLE_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "full:$1\n"' > ./community/data/apple-cn
|
||||
curl -sSL $APPLE_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "full:$1\n"' > apple-cn.txt
|
||||
cat ./gfwlist2dnsmasq/temp-gfwlist.txt | perl -ne '/^((?=^.{3,255})[a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})+)/ && print "$1\n"' >> ./community/data/gfw
|
||||
cat ./community/data/gfw | sort --ignore-case -u > gfw.txt
|
||||
cat ./community/data/greatfire | sort --ignore-case -u > greatfire.txt
|
||||
curl -sSL $WIN_SPY | grep "0.0.0.0" | awk '{print $2}' > ./community/data/win-spy
|
||||
curl -sSL $WIN_SPY | grep "0.0.0.0" | awk '{print $2}' > win-spy.txt
|
||||
curl -sSL $WIN_UPDATE | grep "0.0.0.0" | awk '{print $2}' > ./community/data/win-update
|
||||
curl -sSL $WIN_UPDATE | grep "0.0.0.0" | awk '{print $2}' > win-update.txt
|
||||
curl -sSL $WIN_EXTRA | grep "0.0.0.0" | awk '{print $2}' > ./community/data/win-extra
|
||||
curl -sSL $WIN_EXTRA | grep "0.0.0.0" | awk '{print $2}' > win-extra.txt
|
||||
|
||||
- name: Build geosite.dat file
|
||||
run: |
|
||||
cd custom || exit 1
|
||||
go run ./ --datapath=../community/data
|
||||
|
||||
- name: Move and zip files and generate sha256 hash
|
||||
run: |
|
||||
install -Dp ./geoip.dat ./publish/geoip.dat
|
||||
install -Dp ./geoip.dat.sha256sum ./publish/geoip.dat.sha256sum
|
||||
install -Dp ./custom/publish/geosite.dat ./publish/geosite.dat
|
||||
install -p {proxy,direct,reject}-tld-list.txt ./publish/
|
||||
install -p {proxy,direct,reject}-list.txt ./publish/
|
||||
install -p {china-list,apple-cn,google-cn,gfw,greatfire,win-spy,win-update,win-extra}.txt ./publish/
|
||||
cd ./publish || exit 1
|
||||
zip rules.zip {proxy,direct,reject}-list.txt geoip.dat geosite.dat
|
||||
sha256sum geosite.dat > geosite.dat.sha256sum
|
||||
sha256sum rules.zip > rules.zip.sha256sum
|
||||
|
||||
- name: Release and upload assets
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
release_name: ${{ env.RELEASE_NAME }}
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
file_glob: true
|
||||
file: ./publish/*
|
||||
|
||||
- name: Git push assets to "release" branch
|
||||
run: |
|
||||
cd publish || exit 1
|
||||
git init
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git checkout -b release
|
||||
git add .
|
||||
git commit -m "${{ env.RELEASE_NAME }}"
|
||||
git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
|
||||
git push -f -u origin release
|
||||
|
||||
- name: Purge jsdelivr CDN
|
||||
run: |
|
||||
cd publish || exit 1
|
||||
for file in $(ls); do
|
||||
curl -i "https://purge.jsdelivr.net/gh/${{ github.repository }}@release/${file}"
|
||||
done
|
||||
400
README.md
400
README.md
@@ -1,53 +1,103 @@
|
||||
# 简介 
|
||||
# 简介
|
||||
|
||||
**V2Ray** 规则文件加强版,可代替 V2Ray 官方 `geoip.dat` 和 `geosite.dat` 规则文件。利用 GitHub Actions 北京时间每天早上 6 点自动构建,保证规则最新。
|
||||
|
||||
## 说明
|
||||
|
||||
本项目适用于命令行版本 V2Ray 客户端。第三方桌面图形界面版(GUI)V2Ray 客户端一般都有路由规则图形化配置界面,但一般也都支持使用自定义 V2Ray JSON 配置和 dat 规则文件,请自行研究并修改配置。第三方移动设备版 V2Ray 客户端情况比较复杂,大概率不支持使用自定义 V2Ray JSON 配置和 dat 规则文件,请知悉。
|
||||
[**V2Ray**](https://github.com/v2fly/v2ray-core) 路由规则文件加强版,可代替 V2Ray 官方 `geoip.dat` 和 `geosite.dat`,适用于 [V2Ray](https://github.com/v2fly/v2ray-core)、[Xray-core](https://github.com/XTLS/Xray-core)、[mihomo](https://github.com/MetaCubeX/mihomo/tree/Meta)、[hysteria](https://github.com/apernet/hysteria)、[Trojan-Go](https://github.com/p4gefau1t/trojan-go)、[leaf](https://github.com/eycorsican/leaf)。使用 GitHub Actions 北京时间每天早上 6 点自动构建,保证规则最新。
|
||||
|
||||
## 规则文件生成方式
|
||||
|
||||
### geoip.dat
|
||||
|
||||
- 通过仓库 [@Loyalsoldier/geoip](https://github.com/Loyalsoldier/geoip) 生成
|
||||
- 其中全球 IP 地址(IPv4 和 IPv6)来源于 [MaxMind GeoLite2](https://dev.maxmind.com/geoip/geoip2/geolite2/),`CN`(中国大陆)类别下的 IPv4 地址来源于 [@pexcn/chnroute.txt](https://github.com/pexcn/daily/blob/gh-pages/chnroute/chnroute.txt)
|
||||
- 默认使用 [MaxMind GeoLite2 Country CSV 数据](https://github.com/Loyalsoldier/geoip/blob/release/GeoLite2-Country-CSV.zip)生成各个国家和地区的 GeoIP 文件。所有可供使用的国家和地区 geoip 类别(如 `geoip:cn`,两位英文字母表示国家或地区),请查看:[https://www.iban.com/country-codes](https://www.iban.com/country-codes)
|
||||
- 中国大陆 (`geoip:cn`) IPv4 地址数据融合了 [IPIP.net](https://github.com/17mon/china_ip_list/blob/master/china_ip_list.txt) 和 [@gaoyifan/china-operator-ip](https://github.com/gaoyifan/china-operator-ip/blob/ip-lists/china.txt)
|
||||
- 中国大陆 (`geoip:cn`) IPv6 地址数据融合了 MaxMind GeoLite2 和 [@gaoyifan/china-operator-ip](https://github.com/gaoyifan/china-operator-ip/blob/ip-lists/china6.txt)
|
||||
- 新增类别(方便有特殊需求的用户使用):
|
||||
- `geoip:cloudflare`
|
||||
- `geoip:cloudfront`
|
||||
- `geoip:facebook`
|
||||
- `geoip:fastly`
|
||||
- `geoip:google`
|
||||
- `geoip:netflix`
|
||||
- `geoip:telegram`
|
||||
- `geoip:twitter`
|
||||
|
||||
> 希望定制 `geoip.dat` 文件?需要适用于其他代理软件的 GeoIP 格式文件?查看项目 [@Loyalsoldier/geoip](https://github.com/Loyalsoldier/geoip)。
|
||||
|
||||
### geosite.dat
|
||||
|
||||
- 通过仓库 [@v2ray/domain-list-community](https://github.com/v2ray/domain-list-community) 生成
|
||||
- 基于 [@v2fly/domain-list-community/data](https://github.com/v2fly/domain-list-community/tree/master/data) 数据,通过仓库 [@Loyalsoldier/domain-list-custom](https://github.com/Loyalsoldier/domain-list-custom) 生成
|
||||
- **加入大量中国大陆域名、Apple 域名和 Google 域名**:
|
||||
- [@felixonmars/dnsmasq-china-list/accelerated-domains.china.conf](https://github.com/felixonmars/dnsmasq-china-list/blob/master/accelerated-domains.china.conf) 加入到 `geosite:cn` 类别中
|
||||
- [@felixonmars/dnsmasq-china-list/apple.china.conf](https://github.com/felixonmars/dnsmasq-china-list/blob/master/apple.china.conf) 加入到 `geosite:geolocation-!cn` 类别中
|
||||
- [@felixonmars/dnsmasq-china-list/google.china.conf](https://github.com/felixonmars/dnsmasq-china-list/blob/master/google.china.conf) 加入到 `geosite:geolocation-!cn` 类别中
|
||||
- **加入最新 GFWList 域名**:通过仓库 [@cokebar/gfwlist2dnsmasq](https://github.com/cokebar/gfwlist2dnsmasq) 生成并加入到 `geosite:geolocation-!cn` 类别中
|
||||
- **加入附加 GFWList 域名**:通过仓库 [@pexcn/gfwlist-extras](https://github.com/pexcn/gfwlist-extras) 获取并加入到 `geosite:geolocation-!cn` 类别中
|
||||
- **加入 Greatfire Analyzer 检测到的屏蔽域名**:通过仓库 [@wongsyrone/domain-block-list](https://github.com/wongsyrone/domain-block-list) 和 [@Loyalsoldier/cn-blocked-domain](https://github.com/Loyalsoldier/cn-blocked-domain) 获取 [Greatfire Analyzer](https://zh.greatfire.org/analyzer) 检测到的屏蔽域名,并加入到 `geosite:geolocation-!cn` 类别中
|
||||
- **加入 AdAway 广告域名**:通过仓库 [@AdAway/adaway.github.io/hosts.txt](https://github.com/AdAway/adaway.github.io/blob/master/hosts.txt) 获取并加入到 `geosite:category-ads-all` 类别中
|
||||
- **加入更多代理域名和广告域名**:通过仓库 [@ConnersHua/Profiles](https://github.com/ConnersHua/Profiles/tree/master)、[@GeQ1an/Rules](https://github.com/GeQ1an/Rules/tree/master/QuantumultX) 和 [@lhie1/Rules](https://github.com/lhie1/Rules/tree/master) 获取更多代理域名、广告域名,并分别加入到 `geosite:geolocation-!cn` 和 `geosite:category-ads-all` 类别中
|
||||
- [@felixonmars/dnsmasq-china-list/accelerated-domains.china.conf](https://github.com/felixonmars/dnsmasq-china-list/blob/master/accelerated-domains.china.conf) 加入到 `geosite:china-list` 和 `geosite:cn` 类别中
|
||||
- [@felixonmars/dnsmasq-china-list/apple.china.conf](https://github.com/felixonmars/dnsmasq-china-list/blob/master/apple.china.conf) 加入到 `geosite:geolocation-!cn` 类别中(如希望本文件中的 Apple 域名直连,请参考下面 [geosite 的 Routing 配置方式](https://github.com/Loyalsoldier/v2ray-rules-dat#geositedat-1))
|
||||
- [@felixonmars/dnsmasq-china-list/google.china.conf](https://github.com/felixonmars/dnsmasq-china-list/blob/master/google.china.conf) 加入到 `geosite:geolocation-!cn` 类别中(如希望本文件中的 Google 域名直连,请参考下面 [geosite 的 Routing 配置方式](https://github.com/Loyalsoldier/v2ray-rules-dat#geositedat-1))
|
||||
- **加入 GFWList 域名**:
|
||||
- 基于 [@gfwlist/gfwlist](https://github.com/gfwlist/gfwlist) 数据,通过仓库 [@cokebar/gfwlist2dnsmasq](https://github.com/cokebar/gfwlist2dnsmasq) 生成
|
||||
- 加入到 `geosite:gfw` 类别中,供习惯于 PAC 模式并希望使用 [GFWList](https://github.com/gfwlist/gfwlist) 的用户使用
|
||||
- 同时加入到 `geosite:geolocation-!cn` 类别中
|
||||
- **加入 EasyList 和 EasyListChina 广告域名**:通过 [@AdblockPlus/EasylistChina+Easylist.txt](https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt) 获取并加入到 `geosite:category-ads-all` 类别中
|
||||
- **加入 AdGuard DNS Filter 广告域名**:通过 [@AdGuard/DNS-filter](https://kb.adguard.com/en/general/adguard-ad-filters#dns-filter) 获取并加入到 `geosite:category-ads-all` 类别中
|
||||
- **加入 Peter Lowe 广告和隐私跟踪域名**:通过 [@PeterLowe/adservers](https://pgl.yoyo.org/adservers) 获取并加入到 `geosite:category-ads-all` 类别中
|
||||
- **加入 Dan Pollock 广告域名**:通过 [@DanPollock/hosts](https://someonewhocares.org/hosts) 获取并加入到 `geosite:category-ads-all` 类别中
|
||||
- **加入 Windows 操作系统相关的系统升级和隐私跟踪域名**:
|
||||
- 基于 [@crazy-max/WindowsSpyBlocker](https://github.com/crazy-max/WindowsSpyBlocker/tree/master/data/hosts) 数据
|
||||
- [**慎用**] Windows 操作系统使用的隐私跟踪域名 [@crazy-max/WindowsSpyBlocker/hosts/spy.txt](https://github.com/crazy-max/WindowsSpyBlocker/blob/master/data/hosts/spy.txt) 加入到 `geosite:win-spy` 类别中
|
||||
- [**慎用**] Windows 操作系统使用的系统升级域名 [@crazy-max/WindowsSpyBlocker/hosts/update.txt](https://github.com/crazy-max/WindowsSpyBlocker/blob/master/data/hosts/update.txt) 加入到 `geosite:win-update` 类别中
|
||||
- [**慎用**] Windows 操作系统附加的隐私跟踪域名 [@crazy-max/WindowsSpyBlocker/hosts/extra.txt](https://github.com/crazy-max/WindowsSpyBlocker/blob/master/data/hosts/extra.txt) 加入到 `geosite:win-extra` 类别中
|
||||
- 关于这三个类别的使用方式,请参考下面 [geosite 的 Routing 配置方式](https://github.com/Loyalsoldier/v2ray-rules-dat#geositedat-1)
|
||||
- **可添加自定义直连、代理和广告域名**:由于上游域名列表更新缓慢或缺失某些域名,所以引入**需要添加的域名**列表。[`hidden 分支`](https://github.com/Loyalsoldier/v2ray-rules-dat/tree/hidden)里的三个文件 `direct.txt`、`proxy.txt` 和 `reject.txt`,分别存放自定义的需要添加的直连、代理、广告域名,最终分别加入到 `geosite:cn`、`geosite:geolocation-!cn` 和 `geosite:category-ads-all` 类别中
|
||||
- **可移除自定义直连、代理和广告域名**:由于上游域名列表存在需要被移除的域名,所以引入**需要移除的域名**列表。[`hidden 分支`](https://github.com/Loyalsoldier/v2ray-rules-dat/tree/hidden)里的三个文件 `direct-need-to-remove.txt`、`proxy-need-to-remove.txt` 和 `reject-need-to-remove.txt`,分别存放自定义的需要从 `direct-list`(直连域名列表)、`proxy-list`(代理域名列表)和 `reject-list`(广告域名列表) 移除的域名
|
||||
|
||||
## 规则文件下载及使用方式
|
||||
## 规则文件下载地址
|
||||
|
||||
**下载地址**:
|
||||
> 如果无法访问域名 `raw.githubusercontent.com`,可以使用第二个地址 `cdn.jsdelivr.net`。
|
||||
> 如果无法访问域名 `cdn.jsdelivr.net`,可以将其替换为 `fastly.jsdelivr.net`。
|
||||
>
|
||||
> *.sha256sum 为校验文件。
|
||||
|
||||
- **geoip.dat**:[https://github.com/Loyalsoldier/v2ray-rules-dat/raw/release/geoip.dat](https://github.com/Loyalsoldier/v2ray-rules-dat/raw/release/geoip.dat)
|
||||
- **geosite.dat**:[https://github.com/Loyalsoldier/v2ray-rules-dat/raw/release/geosite.dat](https://github.com/Loyalsoldier/v2ray-rules-dat/raw/release/geosite.dat)
|
||||
- **geoip.dat**:
|
||||
- [https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat](https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat)
|
||||
- [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geoip.dat](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geoip.dat)
|
||||
- **geosite.dat**:
|
||||
- [https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat](https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat)
|
||||
- [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geosite.dat](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geosite.dat)
|
||||
- **直连域名列表 direct-list.txt**:
|
||||
- [https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/direct-list.txt](https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/direct-list.txt)
|
||||
- [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/direct-list.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/direct-list.txt)
|
||||
- **代理域名列表 proxy-list.txt**:
|
||||
- [https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/proxy-list.txt](https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/proxy-list.txt)
|
||||
- [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/proxy-list.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/proxy-list.txt)
|
||||
- **广告域名列表 reject-list.txt**:
|
||||
- [https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/reject-list.txt](https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/reject-list.txt)
|
||||
- [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/reject-list.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/reject-list.txt)
|
||||
- **@felixonmars/dnsmasq-china-list 仓库收集的在中国大陆可直连的域名列表 china-list.txt**:
|
||||
- [https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/china-list.txt](https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/china-list.txt)
|
||||
- [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/china-list.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/china-list.txt)
|
||||
- **Apple 在中国大陆可直连的域名列表 apple-cn.txt**:
|
||||
- [https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/apple-cn.txt](https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/apple-cn.txt)
|
||||
- [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/apple-cn.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/apple-cn.txt)
|
||||
- **Google 在中国大陆可直连的域名列表 google-cn.txt**:
|
||||
- [https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/google-cn.txt](https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/google-cn.txt)
|
||||
- [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/google-cn.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/google-cn.txt)
|
||||
- **GFWList 域名列表 gfw.txt**:
|
||||
- [https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/gfw.txt](https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/gfw.txt)
|
||||
- [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/gfw.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/gfw.txt)
|
||||
- **Windows 操作系统使用的隐私跟踪域名列表 win-spy.txt**:
|
||||
- [https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/win-spy.txt](https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/win-spy.txt)
|
||||
- [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/win-spy.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/win-spy.txt)
|
||||
- **Windows 操作系统使用的系统升级域名列表 win-update.txt**:
|
||||
- [https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/win-update.txt](https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/win-update.txt)
|
||||
- [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/win-update.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/win-update.txt)
|
||||
- **Windows 操作系统使用的附加隐私跟踪域名列表 win-extra.txt**:
|
||||
- [https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/win-extra.txt](https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/win-extra.txt)
|
||||
- [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/win-extra.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/win-extra.txt)
|
||||
|
||||
**使用方式**:
|
||||
|
||||
1. 点击上面下载地址,下载 `geoip.dat` 和 `geosite.dat`
|
||||
2. 把下载下来的 `geoip.dat` 和 `geosite.dat` 文件放入到 V2Ray 的规则文件目录,替换掉原来的 `geoip.dat` 和 `geosite.dat`
|
||||
3. 修改 V2Ray 配置文件,配置参考下面 👇👇👇
|
||||
|
||||
## 参考配置
|
||||
## 规则文件使用方式
|
||||
|
||||
### geoip.dat
|
||||
|
||||
跟 V2Ray 官方 `geoip.dat` 配置方式相同。
|
||||
|
||||
**Routing 配置方式**:
|
||||
<details>
|
||||
<summary>点击查看在 <b>V2Ray</b> 和 <b>Xray-core</b> 中的使用方法</summary>
|
||||
<br/>
|
||||
<p>需要先下载 <code>geoip.dat</code> 格式文件,并放置在程序目录内。</p>
|
||||
|
||||
```json
|
||||
"routing": {
|
||||
@@ -57,18 +107,100 @@
|
||||
"outboundTag": "Direct",
|
||||
"ip": [
|
||||
"geoip:cn",
|
||||
"geoip:private"
|
||||
"geoip:private",
|
||||
"ext:cn.dat:cn",
|
||||
"ext:private.dat:private",
|
||||
"ext:geoip-only-cn-private.dat:cn",
|
||||
"ext:geoip-only-cn-private.dat:private"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Proxy",
|
||||
"ip": [
|
||||
"geoip:us",
|
||||
"geoip:jp",
|
||||
"geoip:facebook",
|
||||
"geoip:telegram",
|
||||
"ext:geoip-asn.dat:facebook",
|
||||
"ext:geoip-asn.dat:telegram"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>点击查看在 <b>mihomo</b> 中的使用方法</summary>
|
||||
|
||||
```yaml
|
||||
geodata-mode: true
|
||||
geox-url:
|
||||
geoip: "https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geoip.dat"
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>点击查看在 <b>hysteria</b> 中的使用方法</summary>
|
||||
<br/>
|
||||
<p>需要先下载 <code>geoip.dat</code> 格式文件,并放置在 hysteria 程序目录内。</p>
|
||||
|
||||
```
|
||||
direct(geoip:cn)
|
||||
proxy(geoip:telegram)
|
||||
proxy(geoip:us)
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>点击查看在 <b>Trojan-Go</b> 中的使用方法</summary>
|
||||
<br/>
|
||||
<p>需要先下载 <code>geoip.dat</code> 格式文件,并放置在 Trojan-Go 程序目录内。</p>
|
||||
|
||||
```json
|
||||
"router": {
|
||||
"enabled": true,
|
||||
"bypass": ["geoip:cn"],
|
||||
"proxy": ["geoip:telegram", "geoip:us"],
|
||||
"block": ["geoip:jp"],
|
||||
"default_policy": "proxy",
|
||||
"geoip": "./geoip.dat"
|
||||
}
|
||||
```
|
||||
</details>
|
||||
|
||||
### geosite.dat
|
||||
|
||||
跟 V2Ray 官方 `geosite.dat` 配置方式相同。
|
||||
跟 V2Ray 官方 `geosite.dat` 配置方式相同。相比官方 `geosite.dat` 文件,本项目特有的类别:
|
||||
|
||||
**Routing 配置方式**:
|
||||
- `geosite:china-list`:包含 [@felixonmars/dnsmasq-china-list/accelerated-domains.china.conf](https://github.com/felixonmars/dnsmasq-china-list/blob/master/accelerated-domains.china.conf) 文件里的域名,供有特殊 DNS 分流需求的用户使用。
|
||||
- `geosite:apple-cn`:包含 [@felixonmars/dnsmasq-china-list/apple.china.conf](https://github.com/felixonmars/dnsmasq-china-list/blob/master/apple.china.conf) 文件里的域名,供希望 Apple 域名直连(不走代理)的用户使用。
|
||||
- `geosite:google-cn`:包含 [@felixonmars/dnsmasq-china-list/google.china.conf](https://github.com/felixonmars/dnsmasq-china-list/blob/master/google.china.conf) 文件里的域名,供希望 Google 域名直连(不走代理)的用户使用。
|
||||
- [**慎用**]`geosite:win-spy`:包含 [@crazy-max/WindowsSpyBlocker/hosts/spy.txt](https://github.com/crazy-max/WindowsSpyBlocker/blob/master/data/hosts/spy.txt) 文件里的域名,供希望屏蔽 Windows 操作系统隐私跟踪域名的用户使用。
|
||||
- [**慎用**]`geosite:win-update`:包含 [@crazy-max/WindowsSpyBlocker/hosts/update.txt](https://github.com/crazy-max/WindowsSpyBlocker/blob/master/data/hosts/update.txt) 文件里的域名,供希望屏蔽 Windows 操作系统自动升级的用户使用。
|
||||
- [**慎用**]`geosite:win-extra`:包含 [@crazy-max/WindowsSpyBlocker/hosts/extra.txt](https://github.com/crazy-max/WindowsSpyBlocker/blob/master/data/hosts/extra.txt) 文件里的域名,供希望屏蔽 Windows 操作系统附加隐私跟踪域名的用户使用。
|
||||
|
||||
> ⚠️ 注意:在 Routing 配置中,类别越靠前(上),优先级越高,所以 `geosite:apple-cn` 和 `geosite:google-cn` 要放置在 `geosite:geolocation-!cn` 前(上)面才能生效。
|
||||
|
||||
#### 高级用法
|
||||
|
||||
v2fly/domain-list-community 项目 [data](https://github.com/v2fly/domain-list-community/tree/master/data) 目录中某些列表里的规则会被标记诸如 `@cn` 的 attribute(如下所示),意为该域名在中国大陆有接入点,可直连。
|
||||
|
||||
```
|
||||
steampowered.com.8686c.com @cn
|
||||
steamstatic.com.8686c.com @cn
|
||||
```
|
||||
|
||||
对于玩 Steam 国区游戏,想要直连的用户,可以设置类别 `geosite:steam@cn` 为直连,意为将 [steam](https://github.com/v2fly/domain-list-community/blob/master/data/steam) 列表内所有被标记了 `@cn` attribute 的规则(域名)设置为直连。同理,由于 [category-games](https://github.com/v2fly/domain-list-community/blob/master/data/category-games) 列表包含了 `steam`、`ea`、`blizzard`、`epicgames` 和 `nintendo` 等常见的游戏厂商。设置类别 `geosite:category-games@cn` 为直连,即可节省大量服务器流量。
|
||||
|
||||
> ⚠️ 注意:在 Routing 配置中,类别越靠前(上),优先级越高,所以 `geosite:category-games@cn` 等所有带有 `@cn` attribute 的规则都要放置在 `geosite:geolocation-!cn` 前(上)面才能生效。
|
||||
>
|
||||
> `category-games` 列表内的规则(域名)可能会有疏漏,请留意规则命中情况。如发现遗漏,欢迎到项目 v2fly/domain-list-community 提 [issue](https://github.com/v2fly/domain-list-community/issues) 反馈。
|
||||
|
||||
#### 配置参考下面 👇👇👇
|
||||
|
||||
**白名单模式 Routing 配置方式**:
|
||||
|
||||
```json
|
||||
"routing": {
|
||||
@@ -76,23 +208,62 @@
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Reject",
|
||||
"domain": [
|
||||
"geosite:category-ads-all"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Proxy",
|
||||
"domain": [
|
||||
"geosite:geolocation-!cn"
|
||||
]
|
||||
"domain": ["geosite:category-ads-all"]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Direct",
|
||||
"domain": [
|
||||
"geosite:cn"
|
||||
"geosite:private",
|
||||
"geosite:apple-cn",
|
||||
"geosite:google-cn",
|
||||
"geosite:tld-cn",
|
||||
"geosite:category-games@cn"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Proxy",
|
||||
"domain": ["geosite:geolocation-!cn"]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Direct",
|
||||
"domain": ["geosite:cn"]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Proxy",
|
||||
"network": "tcp,udp"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**黑名单模式 Routing 配置方式:**
|
||||
|
||||
```json
|
||||
"routing": {
|
||||
"rules": [
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Reject",
|
||||
"domain": ["geosite:category-ads-all"]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Proxy",
|
||||
"domain": ["geosite:gfw"]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Proxy",
|
||||
"ip": ["geoip:telegram"]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Direct",
|
||||
"network": "tcp,udp"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -102,71 +273,84 @@
|
||||
|
||||
```json
|
||||
"dns": {
|
||||
"hosts": {
|
||||
"dns.google": "8.8.8.8",
|
||||
"dns.pub": "119.29.29.29",
|
||||
"dns.alidns.com": "223.5.5.5",
|
||||
"geosite:category-ads-all": "127.0.0.1"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"address": "1.1.1.1",
|
||||
"port": 53,
|
||||
"domains": [
|
||||
"geosite:geolocation-!cn"
|
||||
]
|
||||
"address": "https://1.1.1.1/dns-query",
|
||||
"domains": ["geosite:geolocation-!cn"],
|
||||
"expectIPs": ["geoip:!cn"]
|
||||
},
|
||||
"8.8.8.8",
|
||||
{
|
||||
"address": "114.114.114.114",
|
||||
"port": 53,
|
||||
"domains": [
|
||||
"geosite:cn"
|
||||
]
|
||||
"domains": ["geosite:cn", "geosite:category-games@cn"],
|
||||
"expectIPs": ["geoip:cn"],
|
||||
"skipFallback": true
|
||||
},
|
||||
"8.8.8.8",
|
||||
"223.5.5.5"
|
||||
{
|
||||
"address": "localhost",
|
||||
"skipFallback": true
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### 自用 V2Ray 客户端完整配置(仅供参考,根据自身需求酌情修改)
|
||||
### 自用 V2Ray v4 版本客户端配置(不适用于 V2Ray v5 及更新的版本)
|
||||
|
||||
下面为自用 V2Ray 客户端完整配置,注意事项:
|
||||
注意事项:
|
||||
|
||||
- 由于下面客户端配置使用了 DoH DNS 功能,所以必须使用 v4.22.0 或更新版本的 [V2Ray](https://github.com/v2ray/v2ray-core/releases)
|
||||
- 下面客户端配置使 V2Ray 在本机开启 SOCKS 代理(监听 1080 端口)和 HTTP 代理(监听 2080 端口)
|
||||
- BT 流量统统直连(实测依然会有部分 BT 流量走代理,尚不清楚是不是 V2Ray 的 bug。如果服务商禁止 BT 下载的话,请不要为下载软件设置代理)
|
||||
- 由于下面客户端配置的 DNS 使用了 `skipFallback` 选项,所以必须使用 v4.37.2 或更新版本的 [V2Ray](https://github.com/v2fly/v2ray-core/releases)
|
||||
- 下面客户端配置使 V2Ray 在本机开启 SOCKS 代理(监听 1080 端口)和 HTTP 代理(监听 2080 端口),允许局域网内其他设备连接并使用代理
|
||||
- BT 流量统统直连(实测依然会有部分 BT 流量走代理,如果服务商禁止 BT 下载,请不要为下载软件设置代理)
|
||||
- 最后,不命中任何路由规则的请求和流量,统统走代理
|
||||
- `outbounds` 里的第一个大括号内的配置,即为 V2Ray 代理服务的配置。请根据自身需求进行修改,并参照 V2Ray 官网配置说明中的 [配置文件 > 文件格式 > OutboundObject](https://www.v2fly.org/chapter_02/01_overview.html#outboundobject) 部分进行补全
|
||||
- `outbounds` 里的第一个大括号内的配置,即为 V2Ray 代理服务的配置。请根据自身需求进行修改,并参照 V2Ray 官网配置文档中的 [配置 > Outbounds > OutboundObject](https://www.v2fly.org/config/outbounds.html#outboundobject) 部分进行补全
|
||||
|
||||
```json
|
||||
```jsonc
|
||||
{
|
||||
"log": {
|
||||
"loglevel": "warning"
|
||||
},
|
||||
"dns": {
|
||||
"hosts": {
|
||||
"dns.google": "8.8.8.8"
|
||||
"dns.google": "8.8.8.8",
|
||||
"dns.pub": "119.29.29.29",
|
||||
"dns.alidns.com": "223.5.5.5",
|
||||
"geosite:category-ads-all": "127.0.0.1"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"address": "https://1.1.1.1/dns-query",
|
||||
"domains": [
|
||||
"geosite:geolocation-!cn"
|
||||
]
|
||||
"domains": ["geosite:geolocation-!cn", "geosite:google@cn"],
|
||||
"expectIPs": ["geoip:!cn"]
|
||||
},
|
||||
"https://1.1.1.1/dns-query",
|
||||
"https://dns.google/dns-query",
|
||||
"8.8.8.8",
|
||||
{
|
||||
"address": "114.114.114.114",
|
||||
"port": 53,
|
||||
"domains": [
|
||||
"geosite:cn"
|
||||
"geosite:cn",
|
||||
"geosite:icloud",
|
||||
"geosite:category-games@cn"
|
||||
],
|
||||
"expectIPs": [
|
||||
"geoip:cn"
|
||||
]
|
||||
"expectIPs": ["geoip:cn"],
|
||||
"skipFallback": true
|
||||
},
|
||||
{
|
||||
"address": "localhost",
|
||||
"skipFallback": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"protocol": "socks",
|
||||
"listen": "127.0.0.1",
|
||||
"listen": "0.0.0.0",
|
||||
"port": 1080,
|
||||
"tag": "Socks-In",
|
||||
"settings": {
|
||||
@@ -181,7 +365,7 @@
|
||||
},
|
||||
{
|
||||
"protocol": "http",
|
||||
"listen": "127.0.0.1",
|
||||
"listen": "0.0.0.0",
|
||||
"port": 2080,
|
||||
"tag": "Http-In",
|
||||
"sniffing": {
|
||||
@@ -192,10 +376,10 @@
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
//下面这行,协议名称为socks、shadowsocks或vmess等(记得删除这行文字说明)
|
||||
"protocol": "协议名称",
|
||||
//下面这行,协议类别要改为socks、shadowsocks、vmess或vless等(记得删除本行文字说明)
|
||||
"protocol": "协议类别",
|
||||
"settings": {},
|
||||
//下面这行,必须为Proxy,对应Routing里的outboundTag(记得删除这行文字说明)
|
||||
//下面这行,tag的值对应Routing里的outboundTag,这里为Proxy(记得删除本行文字说明)
|
||||
"tag": "Proxy",
|
||||
"streamSettings": {},
|
||||
"mux": {}
|
||||
@@ -223,6 +407,7 @@
|
||||
],
|
||||
"routing": {
|
||||
"domainStrategy": "IPIfNonMatch",
|
||||
"domainMatcher": "mph",
|
||||
"rules": [
|
||||
{
|
||||
"type": "field",
|
||||
@@ -232,61 +417,47 @@
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Dns-Out",
|
||||
"inboundTag": [
|
||||
"Socks-In",
|
||||
"Http-In"
|
||||
],
|
||||
"inboundTag": ["Socks-In", "Http-In"],
|
||||
"network": "udp",
|
||||
"port": 53
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Reject",
|
||||
"domain": [
|
||||
"geosite:category-ads-all"
|
||||
]
|
||||
"domain": ["geosite:category-ads-all"]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Proxy",
|
||||
"domain": [
|
||||
"geosite:geolocation-!cn"
|
||||
"full:www.icloud.com",
|
||||
"domain:icloud-content.com",
|
||||
"geosite:google"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Direct",
|
||||
"domain": [
|
||||
"geosite:cn"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Direct",
|
||||
"ip": [
|
||||
"223.5.5.5/32",
|
||||
"119.29.29.29/32",
|
||||
"180.76.76.76/32",
|
||||
"114.114.114.114/32"
|
||||
"geosite:tld-cn",
|
||||
"geosite:icloud",
|
||||
"geosite:category-games@cn"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Proxy",
|
||||
"ip": [
|
||||
"1.1.1.1/32",
|
||||
"1.0.0.1/32",
|
||||
"8.8.8.8/32",
|
||||
"8.8.4.4/32"
|
||||
]
|
||||
"domain": ["geosite:geolocation-!cn"]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Direct",
|
||||
"ip": [
|
||||
"geoip:cn",
|
||||
"geoip:private"
|
||||
]
|
||||
"domain": ["geosite:cn", "geosite:private"]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Direct",
|
||||
"ip": ["geoip:cn", "geoip:private"]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
@@ -300,20 +471,17 @@
|
||||
|
||||
## 致谢
|
||||
|
||||
- [@v2ray/geoip](https://github.com/v2ray/geoip)
|
||||
- [@v2ray/domain-list-community](https://github.com/v2ray/domain-list-community)
|
||||
- [@Loyalsoldier/geoip](https://github.com/Loyalsoldier/geoip)
|
||||
- [@v2fly/domain-list-community](https://github.com/v2fly/domain-list-community)
|
||||
- [@Loyalsoldier/domain-list-custom](https://github.com/Loyalsoldier/domain-list-custom)
|
||||
- [@felixonmars/dnsmasq-china-list](https://github.com/felixonmars/dnsmasq-china-list)
|
||||
- [@gfwlist/gfwlist](https://github.com/gfwlist/gfwlist)
|
||||
- [@pexcn/gfwlist-extras](https://github.com/pexcn/gfwlist-extras)
|
||||
- [@cokebar/gfwlist2dnsmasq](https://github.com/cokebar/gfwlist2dnsmasq)
|
||||
- [@Loyalsoldier/cn-blocked-domain](https://github.com/Loyalsoldier/cn-blocked-domain)
|
||||
- [@wongsyrone/domain-block-list](https://github.com/wongsyrone/domain-block-list)
|
||||
- [@ConnersHua/Profiles](https://github.com/ConnersHua/Profiles/tree/master)
|
||||
- [@GeQ1an/Rules](https://github.com/GeQ1an/Rules/tree/master/QuantumultX)
|
||||
- [@lhie1/Rules](https://github.com/lhie1/Rules/tree/master)
|
||||
- [@pexcn/chnroute.txt](https://github.com/pexcn/daily/blob/gh-pages/chnroute/chnroute.txt)
|
||||
- [@AdAway/adaway.github.io/hosts.txt](https://github.com/AdAway/adaway.github.io/blob/master/hosts.txt)
|
||||
- [MaxMind GeoLite2 Free IP Database](https://dev.maxmind.com/geoip/geoip2/geolite2/)
|
||||
- [@AdblockPlus/EasylistChina+Easylist.txt](https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt)
|
||||
- [@AdGuard/DNS-filter](https://kb.adguard.com/en/general/adguard-ad-filters#dns-filter)
|
||||
- [@PeterLowe/adservers](https://pgl.yoyo.org/adservers)
|
||||
- [@DanPollock/hosts](https://someonewhocares.org/hosts)
|
||||
- [@crazy-max/WindowsSpyBlocker](https://github.com/crazy-max/WindowsSpyBlocker)
|
||||
|
||||
## 项目 Star 数增长趋势
|
||||
|
||||
|
||||
Reference in New Issue
Block a user