Compare commits

...

133 Commits

Author SHA1 Message Date
loyalsoldier
dc95dd0f1f Change source from v2ray/domain-list-community to v2fly/domain-list-community
due to https://github.com/v2ray/domain-list-community#announcement
2020-07-19 12:27:35 +08:00
Loyalsoldier
7f98db18f7 Update V2Ray config
due to https://github.com/v2ray/domain-list-community/pull/640
2020-07-17 22:52:47 +08:00
loyalsoldier
1e4898fd50 Add more details and refine comments 2020-07-16 13:12:16 +08:00
loyalsoldier
501e8d121e Add generated list to README 2020-07-16 13:12:15 +08:00
loyalsoldier
842c180663 Rename GREATFIRE_DOMAINS_MINE_URL to GREATFIRE_DOMAINS_URL 2020-07-16 13:12:15 +08:00
loyalsoldier
0463521801 Remove outdated @wongsyrone/domain-block-list 2020-07-16 13:12:14 +08:00
Loyalsoldier
6308edf8f2 Add build ignore paths 2020-07-07 10:38:09 +08:00
loyalsoldier
1e0bafc21f Change git commit user to @actions-user 2020-07-03 15:06:50 +08:00
loyalsoldier
992b02fa83 Remove download count 2020-07-03 15:06:26 +08:00
loyalsoldier
fc4062c3e7 Remove @ConnersHua/Profiles project 2020-07-03 15:06:26 +08:00
Loyalsoldier
9bdbf8e49a Update go version to match semver 2020-07-03 15:06:26 +08:00
dependabot[bot]
320f8849ff Bump actions/checkout from v2.3.0 to v2.3.1 (#33)
Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-03 15:06:26 +08:00
dependabot[bot]
368a00b913 Bump actions/checkout from v2 to v2.3.0 (#32)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-03 15:06:26 +08:00
Loyalsoldier
bcefb05796 Update README.md
To meet attribution requirement of MaxMind GeoLite2
2020-07-03 15:06:26 +08:00
Loyalsoldier
45ade5b9ff Change geoip parameter
due to e642fa60e4
2020-07-03 15:06:26 +08:00
loyalsoldier
05b4021505 Add more specific geoip routing configuration 2020-07-03 15:06:25 +08:00
loyalsoldier
896b809632 Add apple-cn & google-cn sub-lists for custom routing config
due to accessibility in China mainland and https://github.com/Loyalsoldier/v2ray-rules-dat/issues/29 and https://github.com/Loyalsoldier/v2ray-rules-dat/issues/24 and https://github.com/Loyalsoldier/v2ray-rules-dat/issues/13
2020-07-03 15:06:25 +08:00
Loyalsoldier
8148a3bac2 Create dependabot.yml 2020-07-03 15:06:25 +08:00
loyalsoldier
54b01cd838 Revert the way of generating hashsum files(#28) 2020-07-03 15:06:25 +08:00
Kid
d9ffcd313b Add scoop support (#27) 2020-06-06 14:10:27 +08:00
Loyalsoldier
14f9756d78 Update workflow 2020-06-06 11:36:32 +08:00
Loyalsoldier
f3acc73a29 Change V2Ray repo link to V2fly 2020-06-05 23:38:09 +08:00
Loyalsoldier
4d73ef6f3d Update build.yml 2020-06-05 20:30:06 +08:00
Loyalsoldier
013c6ef33a Use $GEOSITE_REPO as data folder source by default
Can change $GEOSITE_REPO environment variable to use your own forked `domain-list-community` repo
2020-06-03 18:37:56 +08:00
Loyalsoldier
91f21e9dd0 Update README.md 2020-05-30 23:49:21 +08:00
Loyalsoldier
d5bf41ce00 Update README.md 2020-05-30 21:44:05 +08:00
Loyalsoldier
3245b960bb Do not build after README.md update 2020-05-30 21:30:58 +08:00
Loyalsoldier
2bfb1aa228 Replace @17mon/china_ip_list with @pexcn/daily/chnroute.txt 2020-05-30 21:18:05 +08:00
loyalsoldier
765182332a Include @AdAway/adaway.github.io/hosts.txt into reject-list 2020-05-30 20:01:37 +08:00
loyalsoldier
6725586512 Include @pexcn/gfwlist-extras domains into proxy-list 2020-05-30 17:28:53 +08:00
loyalsoldier
838b85e50a Zip rule files into one
Closes #25
2020-05-27 14:20:47 +08:00
Loyalsoldier
10961eff9c Add project stats 2020-05-22 15:16:18 +08:00
loyalsoldier
acc65b49e9 Add @Loyalsoldier/cn-blocked-domain description 2020-05-09 21:56:24 +08:00
loyalsoldier
12a9a0d8c6 Add @Loyalsoldier/cn-blocked-domains into proxy routing 2020-05-09 21:51:58 +08:00
Loyalsoldier
a0ff18c5c8 Start a build also by updating hidden branch 2020-04-21 13:56:25 +08:00
Loyalsoldier
12e5b7a6fd Update README.md 2020-04-09 08:57:37 +08:00
loyalsoldier
ac4af75c51 Remove easylist from README 2020-04-07 22:09:10 +08:00
loyalsoldier
cdf564fdfa Remove easylists' Ad hosts from reject-list 2020-04-07 22:06:15 +08:00
loyalsoldier
c4dd3bd164 Update README description & V2Ray config 2020-04-07 15:15:20 +08:00
Loyalsoldier
900d0e1c06 Fix easylist regexp error 2020-04-07 14:57:17 +08:00
loyalsoldier
e5831eec05 Add EasyList & EasyListChina & EasyListPrivacy into rejectlist 2020-04-06 22:38:00 +08:00
Loyalsoldier
8352df9737 Update README.md 2020-04-02 23:35:50 +08:00
Loyalsoldier
0dbf14c984 Use IPIP.net CN IPv4 CIDR 2020-04-02 23:24:23 +08:00
Loyalsoldier
52fb8fa3e8 Use geoip project that replaced CN IPv4 CIDR 2020-04-02 23:22:17 +08:00
loyalsoldier
bac92afea8 Remove CDN list description due to workflow updates 2020-03-31 17:04:22 +08:00
loyalsoldier
d4b34df296 Remove some lists 2020-03-31 16:56:04 +08:00
Loyalsoldier
6b8f90b269 Update README.md
Change routing rules order
2020-03-25 15:19:39 +08:00
Loyalsoldier
acef248760 Update README.md
Change v2ray.com to v2fly.org
2020-03-25 12:54:20 +08:00
Loyalsoldier
d33d3d7a5d Update README.md 2020-03-24 19:50:31 +08:00
Loyalsoldier
df6143f52b Update README.md 2020-03-24 19:42:02 +08:00
Loyalsoldier
5fc52f5c4e Update final strategy 2020-03-15 12:49:39 +08:00
loyalsoldier
8c6c4816c5 Remove all domains end with .cn TLD from proxy-list 2020-03-14 12:12:07 +08:00
loyalsoldier
6f78b8d9ab Remove domains from "need-to-remove" lists in hidden branch 2020-03-10 10:57:50 +08:00
loyalsoldier
067df98946 Add domains in reject.txt to temp-reject.txt file 2020-03-10 10:47:42 +08:00
loyalsoldier
b7d7ae8377 Fix Microsoft URL 404 issue 2020-03-08 11:37:10 +08:00
Loyalsoldier
00d8b29f72 Update download description 2020-03-06 06:28:33 +08:00
Loyalsoldier
941611bcbe Fix file not exists issue 2020-03-05 13:26:45 +08:00
loyalsoldier
bd0e1a3d7b Remove redundant domains 2020-03-02 01:34:39 +08:00
loyalsoldier
1e4c41d5ae Use release branch download link 2020-03-01 17:02:10 +08:00
loyalsoldier
df177c659d Git force push 2020-03-01 16:49:00 +08:00
loyalsoldier
6fbef4bb56 Change download links to jsdelivr CDN 2020-03-01 16:30:41 +08:00
loyalsoldier
c655693b73 Git push assets to release branch 2020-03-01 16:15:45 +08:00
loyalsoldier
bce5ab64eb Test with another release action 2020-03-01 13:04:29 +08:00
loyalsoldier
532962de2b Add new sources into proxy & reject list 2020-03-01 01:30:33 +08:00
Loyalsoldier
06923a0ce0 Add description 2020-02-29 16:57:57 +08:00
Loyalsoldier
ad79c640ee Change shasum files name 2020-02-29 04:02:10 +08:00
loyalsoldier
eb2b40341f Rename lists names & upload release assets manually 2020-02-28 02:45:23 +08:00
Loyalsoldier
7d958f8de9 Upgrade to go v1.14 2020-02-26 22:02:08 +08:00
Loyalsoldier
f274e3c512 Update README.md 2020-02-25 20:26:32 +08:00
Loyalsoldier
6ea061c134 Add dat files sha256 hash 2020-02-24 15:54:01 +08:00
Loyalsoldier
b7682d5846 Add sha256 hash 2020-02-24 15:49:06 +08:00
Loyalsoldier
4ab899863e Update README.md
Remove spaces
2020-02-20 12:52:46 +08:00
Loyalsoldier
c1c4eaeefb Remove ookla-speedtest generation script due to upstream update 2020-02-09 22:13:16 +08:00
Loyalsoldier
bb36e65e02 Add configuration code type & explanation 2020-02-03 02:07:23 +08:00
Loyalsoldier
546547e7ae Add my own v2ray client-side example configuration 2020-02-03 02:00:07 +08:00
Loyalsoldier
1953b6a1bb Refine config example 2020-02-03 00:59:29 +08:00
Loyalsoldier
b3b6304a12 Fix with accept-encoding header & compressed option 2020-02-01 18:31:27 +08:00
loyalsoldier
ce4c3ee3d7 Revert "Change IP regex to domain regex" 2020-01-27 23:08:45 +08:00
loyalsoldier
77698a15f7 Change IP regex to domain regex 2020-01-27 22:51:10 +08:00
loyalsoldier
e4c729bf44 Fix _ character in regex 2020-01-27 22:47:32 +08:00
loyalsoldier
686c2d3c29 Fix typos 2020-01-27 22:36:52 +08:00
loyalsoldier
f8094e3e00 Refine regex scripts using Perl 2020-01-27 22:29:56 +08:00
loyalsoldier
bc7c8f7a4c Refine ookla-speedtest generation script using Perl 2020-01-27 21:16:23 +08:00
loyalsoldier
82a87b23e6 Fix typos & indent 2020-01-27 20:45:39 +08:00
Loyalsoldier
b1148f1bb7 Delete test.yml 2020-01-27 20:40:50 +08:00
Loyalsoldier
3a83e3911d Test 2020-01-27 20:37:44 +08:00
Loyalsoldier
ffc54de20e Update project description 2020-01-27 19:11:41 +08:00
Loyalsoldier
ec270174fb Fix typos 2020-01-27 19:10:22 +08:00
Loyalsoldier
9eb1fd129d Add more details
Add more details about the use of @felixonmars dnsmasq-china-list project
2020-01-27 14:33:05 +08:00
Loyalsoldier
1a03c37bae Add some CDN domains 2020-01-27 14:14:27 +08:00
Loyalsoldier
f8bb1017c6 Automatically generate ookla-speedtest sub-list from source 2020-01-26 22:16:41 +08:00
Loyalsoldier
749e420c3f Release all domain lists 2020-01-12 02:11:39 +08:00
Loyalsoldier
6fb2569a68 Update description 2020-01-10 17:05:54 +08:00
loyalsoldier
7230e8cffc Try to fix regex rules 2020-01-10 16:34:59 +08:00
loyalsoldier
a9b458de22 Fix regexp validating domains rules 2020-01-10 16:23:09 +08:00
loyalsoldier
b080e37d6e Fix regexp validating rules 2020-01-10 16:16:17 +08:00
loyalsoldier
ee6546bc2a Validate domains 2020-01-10 16:10:06 +08:00
loyalsoldier
588b482047 Include GeQ1an/Rules domain rules 2020-01-10 14:15:44 +08:00
loyalsoldier
306fc08df1 Refine workflow 2020-01-10 13:22:40 +08:00
loyalsoldier
c65313fd83 Include @lhie1/Rules proxied and rejected domains 2020-01-10 11:52:39 +08:00
loyalsoldier
4ef01bc102 Revert "Add rejected domains from @StevenBlack/hosts" 2020-01-09 23:24:52 +08:00
loyalsoldier
b7eb8202da Revert "Add description"
This reverts commit b735c06461.
2020-01-09 23:23:52 +08:00
Loyalsoldier
b735c06461 Add description 2020-01-09 20:46:07 +08:00
loyalsoldier
5124b0d821 Add rejected domains from @StevenBlack/hosts 2020-01-09 19:17:06 +08:00
loyalsoldier
72906569ad Change variables names 2020-01-09 19:00:24 +08:00
Loyalsoldier
7156a11754 Remove advantages from README.md 2020-01-02 06:26:11 +08:00
Loyalsoldier
f5451027e9 Delete geoip.dat 2019-12-31 23:42:50 +08:00
Loyalsoldier
5af129797e Fix curl URL path 2019-12-31 23:40:04 +08:00
Loyalsoldier
5958c2493c Delete test.yml 2019-12-31 23:38:39 +08:00
Loyalsoldier
eb61e68d38 Test 2019-12-31 23:36:46 +08:00
Loyalsoldier
cadd037384 Test 2019-12-31 23:28:12 +08:00
Loyalsoldier
e2ae2400b4 Create test.yml 2019-12-31 23:18:51 +08:00
Loyalsoldier
2168f18cac Test 2019-12-31 22:43:56 +08:00
Loyalsoldier
21f766dc39 Update for new GeoLite2 policy 2019-12-31 22:39:50 +08:00
Loyalsoldier
4e4ef7bd85 Just copy geoip.dat from repo temporarily 2019-12-31 03:28:59 +08:00
Loyalsoldier
d9620ae732 Add geoip.dat for temporarily usage
Add geoip.dat due to GeoLite2 restriction
2019-12-31 03:24:13 +08:00
Loyalsoldier
d07c21c7eb Add Thanks section 2019-12-31 02:33:59 +08:00
Loyalsoldier
db68429e18 Update build.yml
Refine
2019-12-31 02:27:18 +08:00
Loyalsoldier
4923596b20 Fix typo 2019-12-28 23:04:21 +08:00
Loyalsoldier
bd7139d162 Update README.md 2019-12-28 22:57:44 +08:00
Loyalsoldier
61a8ee2ffb Update build.yml 2019-12-24 01:25:05 +08:00
Loyalsoldier
64a26fcddc Fixed regex to remove DOMAIN-KEYWORD rules 2019-12-24 01:15:56 +08:00
Loyalsoldier
fc3bebe736 Update build.yml 2019-12-23 21:39:20 +08:00
Loyalsoldier
1c6f0fa3a9 Update README.md 2019-12-23 21:33:58 +08:00
Loyalsoldier
e2b975cda1 Update README.md 2019-12-23 21:21:52 +08:00
loyalsoldier
b2793662b8 Add support for custom domains 2019-12-23 20:42:11 +08:00
loyalsoldier
dfd0c980ef Delete test.yml 2019-12-23 19:28:24 +08:00
loyalsoldier
c13336200f Test 2019-12-23 19:24:25 +08:00
loyalsoldier
10fd8faee8 Test 2019-12-23 19:20:48 +08:00
loyalsoldier
080d51e91c Test 2019-12-23 19:16:40 +08:00
loyalsoldier
c314c2dd1d test the default directory 2019-12-23 18:36:07 +08:00
Loyalsoldier
8291a04cdc Update build.yml
change the time of auto-run build
2019-12-22 22:09:23 +08:00
Loyalsoldier
64dbf736cb fixed google and apple rules 2019-12-15 19:13:40 +08:00
3 changed files with 451 additions and 168 deletions

15
.github/dependabot.yml vendored Normal file
View 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: "-"

View File

@@ -1,42 +1,56 @@
name: Build v2ray rules dat files
name: Build V2Ray rules dat files
on:
schedule:
- cron: "0 19 * * *"
- cron: "0 22 * * *"
push:
branches:
- master
- hidden
paths-ignore:
- ".github/**"
- "**/README.md"
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
- name: Setup Go 1.x
uses: actions/setup-go@v2
with:
go-version: 1.13
id: go
go-version: "^1.14"
- name: Set GOPATH
- name: Set $GOPATH and more variables
run: |
echo "::set-env name=GOPATH::$(dirname $GITHUB_WORKSPACE)"
echo "::set-env name=GREEN::\033[0;32m"
echo "::set-env name=NC::\033[0m"
echo "::set-env name=GEOIP_REPO::github.com/v2ray/geoip"
echo "::set-env name=GEOSITE_REPO::github.com/v2ray/domain-list-community"
echo "::set-env name=GOOGLE_URL::https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/google.china.conf"
echo "::set-env name=APPLE_URL::https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/apple.china.conf"
echo "::set-env name=GFWLIST_URL::https://cokebar.github.io/gfwlist2dnsmasq/gfwlist_domain.txt"
echo "::set-env name=Profiles_URL::https://raw.githubusercontent.com/ConnersHua/Profiles/master/Shadow/Pro.conf"
echo "::set-env name=Blocked_DOMAINS_URL::https://raw.githubusercontent.com/wongsyrone/domain-block-list/master/domains.txt"
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/v2fly/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/Loyalsoldier/cn-blocked-domain/release/domains.txt"
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: Get GeoLite2
- name: Checkout the "hidden" branch
uses: actions/checkout@v2.3.1
with:
ref: hidden
- name: Get GeoLite2 zip file
run: |
curl -sSL -O https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip
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
@@ -44,122 +58,120 @@ jobs:
- 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
mkdir -p ./publish
mv ./geoip.dat ./publish/
geoip --country=./geoip/GeoLite2-Country-Locations-en.csv --ipv4=./geoip/GeoLite2-Country-Blocks-IPv4.csv --ipv6=./geoip/GeoLite2-Country-Blocks-IPv6.csv --ipv4CN=https://raw.githubusercontent.com/pexcn/daily/gh-pages/chnroute/chnroute.txt
- name: Download geosite project
run: |
go get -u -v -insecure $GEOSITE_REPO
- name: Get and add gfwlist into temp-proxy.txt file
- name: Get and add direct domains into temp-direct.txt file
run: |
cd $GOPATH/src/$GEOSITE_REPO
curl -sSL $GFWLIST_URL > temp-proxy.txt
- name: Get and add google domains into temp-proxy.txt file
run: |
cd $GOPATH/src/$GEOSITE_REPO
curl -sSL $GOOGLE_URL >> temp-proxy.txt
curl -sSL $CHINA_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "$1\n"' > temp-direct.txt
- name: Get and add apple domains into temp-proxy.txt file
- name: Get and add proxy domains into temp-proxy.txt file
run: |
cd $GOPATH/src/$GEOSITE_REPO
curl -sSL $APPLE_URL >> temp-proxy.txt
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 $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 $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 proxy domains from @ConnersHua/Profiles into temp-proxy.txt file
- name: Get and add reject domains into temp-reject.txt file
run: |
cd $GOPATH/src/$GEOSITE_REPO
curl -sSL $Profiles_URL | awk '/^DOMAIN.+PROXY/' | cut -d ',' -f 2 >> temp-proxy.txt
- name: Get and add blocked domains from @wongsyrone/domain-block-list into temp-proxy.txt file
run: |
cd $GOPATH/src/$GEOSITE_REPO
curl -sSL $Blocked_DOMAINS_URL >> temp-proxy.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: Get and add direct domains from @ConnersHua/Profiles into temp-direct.txt file
- name: Add proxy, direct and reject domains from "hidden" branch to appropriate temp files
run: |
cd $GOPATH/src/$GEOSITE_REPO
curl -sSL $Profiles_URL | awk '/^DOMAIN.+DIRECT/' | cut -d ',' -f 2 > temp-direct.txt
cat proxy.txt >> temp-proxy.txt
cat direct.txt >> temp-direct.txt
cat reject.txt >> temp-reject.txt
- name: Get and add chinalist into temp-direct.txt file
- name: Sort and generate redundant lists
run: |
cd $GOPATH/src/$GEOSITE_REPO
curl -sSL $CHINA_DOMAINS_URL | awk -F '/' '{print $2}' >> temp-direct.txt
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.txt
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.txt
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.txt
- name: Get and add reject domains from @ConnersHua/Profiles into category-ads-all
- 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.txt
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.txt
diff ./reject-need-to-remove.txt ./reject-list-without-redundant | awk '/^>/{print $2}' > $GOPATH/src/$GEOSITE_REPO/data/reject-list.txt
- name: Add list into appropriate category file
run: |
cd $GOPATH/src/$GEOSITE_REPO/data
curl -sSL $Profiles_URL | awk '/^DOMAIN.+REJECT/' | cut -d ',' -f 2 > profilereject
echo "include:profilereject" >> category-ads-all
echo "include:proxy-list.txt" >> geolocation-\!cn
echo "include:direct-list.txt" >> cn
echo "include:reject-list.txt" >> category-ads-all
- name: Remove repeated domains and write domains to new lists
- name: Add `google-cn` and `apple-cn` sub-lists for custom routing settings for third-party users due to accessibility in China mainland
run: |
cd $GOPATH/src/$GEOSITE_REPO
cat temp-proxy.txt | sort --ignore-case -u > ./data/proxylist
cat temp-direct.txt | sort --ignore-case -u > ./data/directlist
- name: Add lists into appropriate category
run: |
cd $GOPATH/src/$GEOSITE_REPO/data
echo "include:proxylist" >> geolocation-\!cn
echo "include:directlist" >> cn
curl -sSL $GOOGLE_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "$1\n"' > $GOPATH/src/$GEOSITE_REPO/data/google-cn
curl -sSL $APPLE_DOMAINS_URL | perl -ne '/^server=\/([^\/]+)\// && print "$1\n"' > $GOPATH/src/$GEOSITE_REPO/data/apple-cn
- name: Build geosite.dat file
run: |
domain-list-community
mv ./dlc.dat ./publish/geosite.dat
domain-list-community --datapath=${{ env.GOPATH }}/src/${{ env.GEOSITE_REPO }}/data
- name: List above process results
- name: Move and zip files and generate sha256 hash
run: |
echo -e "${GREEN}>>>>>>>>>>>>>>>>>>>>>>>>${NC}"
install -Dp geoip.dat ./publish/geoip.dat
install -Dp dlc.dat ./publish/geosite.dat
install -p {proxy,direct,reject}-excluse-list.txt ./publish/
install -p $GOPATH/src/$GEOSITE_REPO/data/{proxy,direct,reject}-list.txt ./publish/
cd ./publish
zip rules.zip {proxy,direct,reject}-list.txt geoip.dat geosite.dat
sha256sum geoip.dat > geoip.dat.sha256sum
sha256sum geosite.dat > geosite.dat.sha256sum
sha256sum rules.zip > rules.zip.sha256sum
echo "list files in geosite folder"
ls -lah $GOPATH/src/$GEOSITE_REPO
echo -e "${GREEN}>>>>>>>>>>>>>>>>>>>>>>>>${NC}"
echo "list files in data folder"
ls -lah $GOPATH/src/$GEOSITE_REPO/data
echo -e "${GREEN}>>>>>>>>>>>>>>>>>>>>>>>>${NC}"
echo "list last 10 lines of cn file"
tail -n 10 $GOPATH/src/$GEOSITE_REPO/data/cn
echo -e "${GREEN}>>>>>>>>>>>>>>>>>>>>>>>>${NC}"
echo "list last 10 lines of geolocation-!cn file"
tail -n 10 $GOPATH/src/$GEOSITE_REPO/data/geolocation-\!cn
echo -e "${GREEN}>>>>>>>>>>>>>>>>>>>>>>>>${NC}"
echo "list last 10 lines of category-ads-all file"
tail -n 10 $GOPATH/src/$GEOSITE_REPO/data/category-ads-all
echo -e "${GREEN}>>>>>>>>>>>>>>>>>>>>>>>>${NC}"
echo "list files in publish folder"
ls -lah ./publish
echo -e "${GREEN}>>>>>>>>>>>>>>>>>>>>>>>>${NC}"
echo -e "${GREEN}完成啦!🌈${NC}"
- name: Set release variables
run: |
echo "::set-env name=NAME::Released on $(date +%Y%m%d%H%M)"
echo "::set-env name=TAG_NAME::$(date +%Y%m%d%H%M)"
- name: Release dat files
uses: Ricky-Hao/action-release@master
- 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 }}
ASSET_PATH: publish
- name: Upload dat files
uses: actions/upload-artifact@master
if: success()
with:
name: dat_files
path: publish
- name: Git push assets to "release" branch
run: |
cd publish
git init
git config --local user.name "actions"
git config --local user.email "action@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

368
README.md
View File

@@ -1,63 +1,283 @@
# 简介
**v2ray** 加强版规则文件,可代替 v2ray 官方 `geoip.dat``geosite.dat` 文件。利用 GitHub Actions 每天自动构建,保证最新。
**V2Ray** 路由规则文件加强版,可代替 V2Ray 官方 `geoip.dat``geosite.dat` 规则文件。利用 GitHub Actions 北京时间每天早上 6 点自动构建,保证规则最新。
## 说明
本项目适用于命令行版本 V2Ray 客户端。第三方桌面图形界面版GUIV2Ray 客户端一般都有路由规则图形化配置界面,但一般也都支持使用自定义 V2Ray JSON 配置和 dat 规则文件,请自行研究并修改配置。第三方移动设备版 V2Ray 客户端情况比较复杂,大概率不支持使用自定义 V2Ray JSON 配置和 dat 规则文件,请知悉。
## 规则文件生成方式
### geoip.dat
- 通过仓库 [@v2ray/geoip](https://github.com/v2ray/geoip) 生成
- 其中 IP 地址来源于 [MaxMind 免费 IP](https://dev.maxmind.com/geoip/geoip2/geolite2/)
- **优点**:由于项目每天自动构建,所以更新速度比官方 `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)
### geosite.dat
- 通过仓库 [@v2ray/domain-list-community](https://github.com/v2ray/domain-list-community) 生成
- **优点**:由于项目每天自动构建,所以更新速度比官方 `geosite.dat` 要快得多
- **加入大量中国大陆域名**:通过仓库 [@felixonmars/dnsmasq-china-list](https://github.com/felixonmars/dnsmasq-china-list) 生成并加入到 `geosite:cn` 类别中
- **加入最新 GFWList**:通过仓库 [@cokebar/gfwlist2dnsmasq](https://github.com/cokebar/gfwlist2dnsmasq) 生成并加入到 `geosite:geolocation-!cn` 类别中
- **加入 Greatfire.org 检测到的屏蔽域名**:通过仓库 [@wongsyrone/domain-block-list](https://github.com/wongsyrone/domain-block-list) 获取 greatfire.org 检测到的屏蔽域名,并加入到 `geosite:geolocation-!cn` 类别中
- **加入更多直连、代理、广告域名**:通过仓库 [@ConnersHua/Profiles](https://github.com/ConnersHua/Profiles/tree/master) 获取更多直连、代理、广告域名,并分别加入到 `geosite:cn``geosite:geolocation-!cn``geosite:category-ads-all` 类别中
- 通过仓库 [@v2fly/domain-list-community](https://github.com/v2fly/domain-list-community) 生成
- **加入大量中国大陆域名、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` 类别中(如希望本文件中的 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 域名**:通过仓库 [@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 检测到的屏蔽域名**:通过仓库 [@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` 类别中
- **加入更多代理域名和广告域名**:通过仓库 [@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` 类别中
- **可添加自定义直连、代理和广告域名**:由于上游域名列表更新缓慢或缺失某些域名,所以引入**需要添加的域名**列表。[`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`(广告域名列表) 移除的域名
## 使用方式
## 规则文件下载及使用方式
1. [点击进入规则文件发布页面](https://github.com/Loyalsoldier/v2ray-rules-dat/releases),点击下载位于最上方的 `geoip.dat``geosite.dat`
2. 把下载下来的 `geoip.dat``geosite.dat` 文件放入到 v2ray 软件的规则文件目录,替换掉原来的 `geoip.dat``geosite.dat`
3. 修改 v2ray 配置文件。配置参考下面👇
**下载地址**
- **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)
- **直连域名列表 direct-list.txt**[https://github.com/Loyalsoldier/v2ray-rules-dat/raw/release/direct-list.txt](https://github.com/Loyalsoldier/v2ray-rules-dat/raw/release/direct-list.txt)
- **代理域名列表 proxy-list.txt**[https://github.com/Loyalsoldier/v2ray-rules-dat/raw/release/proxy-list.txt](https://github.com/Loyalsoldier/v2ray-rules-dat/raw/release/proxy-list.txt)
- **广告域名列表 reject-list.txt**[https://github.com/Loyalsoldier/v2ray-rules-dat/raw/release/reject-list.txt](https://github.com/Loyalsoldier/v2ray-rules-dat/raw/release/reject-list.txt)
**使用方式**
Windows 用户可通过 [Scoop](https://scoop.sh) 来安装:
```shell
scoop bucket add v2ray https://github.com/kidonng/scoop-v2ray
scoop install v2ray-rules-dat
```
非 Windows 用户:
1. 点击上面下载地址,下载 `geoip.dat``geosite.dat`
2. 把下载下来的 `geoip.dat``geosite.dat` 文件放入到 V2Ray 的规则文件目录,替换掉原来的 `geoip.dat``geosite.dat`
3. 修改 V2Ray 配置文件,配置参考下面 👇👇👇
## 参考配置
### geoip.dat
v2ray 官方 `geoip.dat` 配置方式相同。
V2Ray 官方 `geoip.dat` 配置方式相同。
Routing 配置方式:
**Routing 配置方式**
```json
{
"routing": {
"rules": [
{
"type": "field",
"outboundTag": "Direct",
"ip": [
"geoip:cn",
"geoip:private"
]
}
]
}
"routing": {
"rules": [
{
"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",
"geoip:cn",
"geoip:private"
]
},
{
"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",
"geoip:us",
"geoip:ca"
]
}
]
}
```
### geosite.dat
v2ray 官方 `geosite.dat` 配置方式相同。
V2Ray 官方 `geosite.dat` 配置方式相同。`geosite:apple-cn``geosite:google-cn` 为本项目特有的两个类别,分别包含 [@felixonmars/dnsmasq-china-list/apple.china.conf](https://github.com/felixonmars/dnsmasq-china-list/blob/master/apple.china.conf) 和 [@felixonmars/dnsmasq-china-list/google.china.conf](https://github.com/felixonmars/dnsmasq-china-list/blob/master/google.china.conf) 文件里的域名,供希望 Apple 和 Google 域名直连(不走代理)的用户使用。在 Routing 配置中,类别越靠前(上),优先级越高,所以 `geosite:apple-cn``geosite:google-cn` 要放置在 `geosite:geolocation-!cn` 前(上)面。配置参考下面 👇👇👇
Routing 配置方式:
**Routing 配置方式**
```json
"routing": {
"rules": [
{
"type": "field",
"outboundTag": "Reject",
"domain": [
"geosite:category-ads-all"
]
},
{
"type": "field",
"outboundTag": "Direct",
"domain": [
"geosite:apple-cn",
"geosite:google-cn",
"geosite:tld-cn",
"domain:icloud.com",
"domain:icloud-content.com"
]
},
{
"type": "field",
"outboundTag": "Proxy",
"domain": [
"geosite:geolocation-!cn"
]
},
{
"type": "field",
"outboundTag": "Direct",
"domain": [
"geosite:cn"
]
}
]
}
```
**DNS 配置方式**
```json
"dns": {
"servers": [
{
"address": "114.114.114.114",
"port": 53,
"domains": [
"geosite:cn"
]
},
{
"address": "1.1.1.1",
"port": 53,
"domains": [
"geosite:geolocation-!cn"
]
},
"223.5.5.5",
"8.8.8.8"
]
}
```
### 自用 V2Ray 客户端完整配置(仅供参考,根据自身需求酌情修改)
下面为自用 V2Ray 客户端完整配置,注意事项:
- 由于下面客户端配置使用了 DoH DNS 功能,所以必须使用 v4.22.0 或更新版本的 [V2Ray](https://github.com/v2fly/v2ray-core/releases)
- 下面客户端配置使 V2Ray 在本机开启 SOCKS 代理(监听 1080 端口)和 HTTP 代理(监听 2080 端口)
- BT 流量统统直连(实测依然会有部分 BT 流量走代理,尚不清楚是不是 V2Ray 的 bug。如果服务商禁止 BT 下载的话,请不要为下载软件设置代理)
- 最后,不命中任何路由规则的请求和流量,统统走代理
- `outbounds` 里的第一个大括号内的配置,即为 V2Ray 代理服务的配置。请根据自身需求进行修改,并参照 V2Ray 官网配置说明中的 [配置文件 > 文件格式 > OutboundObject](https://www.v2fly.org/chapter_02/01_overview.html#outboundobject) 部分进行补全
```json
{
"log": {
"loglevel": "warning"
},
"dns": {
"hosts": {
"dns.google": "8.8.8.8"
},
"servers": [
{
"address": "https://1.1.1.1/dns-query",
"domains": [
"geosite:geolocation-!cn"
]
},
"https://1.1.1.1/dns-query",
"https://dns.google/dns-query",
{
"address": "114.114.114.114",
"port": 53,
"domains": [
"geosite:cn"
],
"expectIPs": [
"geoip:cn"
]
}
]
},
"inbounds": [
{
"protocol": "socks",
"listen": "127.0.0.1",
"port": 1080,
"tag": "Socks-In",
"settings": {
"ip": "127.0.0.1",
"udp": true,
"auth": "noauth"
},
"sniffing": {
"enabled": true,
"destOverride": ["http", "tls"]
}
},
{
"protocol": "http",
"listen": "127.0.0.1",
"port": 2080,
"tag": "Http-In",
"sniffing": {
"enabled": true,
"destOverride": ["http", "tls"]
}
}
],
"outbounds": [
{
//下面这行协议类别要改为socks、shadowsocks或vmess等记得删除本行文字说明
"protocol": "协议类别",
"settings": {},
//下面这行tag的值对应Routing里的outboundTag这里为Proxy记得删除本行文字说明
"tag": "Proxy",
"streamSettings": {},
"mux": {}
},
{
"protocol": "dns",
"tag": "Dns-Out"
},
{
"protocol": "freedom",
"tag": "Direct",
"settings": {
"domainStrategy": "UseIPv4"
}
},
{
"protocol": "blackhole",
"tag": "Reject",
"settings": {
"response": {
"type": "http"
}
}
}
],
"routing": {
"domainStrategy": "AsIs",
"rules": [
{
"type": "field",
"outboundTag": "Direct",
"protocol": ["bittorrent"]
},
{
"type": "field",
"outboundTag": "Dns-Out",
"inboundTag": [
"Socks-In",
"Http-In"
],
"network": "udp",
"port": 53
},
{
"type": "field",
"outboundTag": "Reject",
@@ -65,6 +285,13 @@ Routing 配置方式:
"geosite:category-ads-all"
]
},
{
"type": "field",
"outboundTag": "Direct",
"domain": [
"geosite:tld-cn"
]
},
{
"type": "field",
"outboundTag": "Proxy",
@@ -78,35 +305,64 @@ Routing 配置方式:
"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"
]
},
{
"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"
]
},
{
"type": "field",
"outboundTag": "Direct",
"ip": [
"geoip:cn",
"geoip:private"
]
},
{
"type": "field",
"outboundTag": "Proxy",
"network": "tcp,udp"
}
]
}
}
```
DNS 配置方式:
## 致谢
```json
{
"dns": {
"servers": [
{
"address": "1.1.1.1",
"port": 53,
"domains": [
"geosite:geolocation-!cn"
]
},
{
"address": "114.114.114.114",
"port": 53,
"domains": [
"geosite:cn"
]
},
"8.8.8.8",
"223.5.5.5"
]
}
}
```
> This product includes GeoLite2 data created by MaxMind, available from [https://www.maxmind.com](https://www.maxmind.com).
- [MaxMind GeoLite2 Free IP Database](https://dev.maxmind.com/geoip/geoip2/geolite2/)
- [@v2ray/geoip](https://github.com/v2ray/geoip)
- [@Loyalsoldier/geoip](https://github.com/Loyalsoldier/geoip)
- [@v2fly/domain-list-community](https://github.com/v2fly/domain-list-community)
- [@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)
- [@GeQ1an/Rules](https://github.com/GeQ1an/Rules/tree/master/QuantumultX)
- [@lhie1/Rules](https://github.com/lhie1/Rules/tree/master)
- [@pexcn/daily/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)
- [@kidonng/scoop-v2ray](https://github.com/kidonng/scoop-v2ray)
## 项目 Star 数增长趋势
[![Stargazers over time](https://starchart.cc/Loyalsoldier/v2ray-rules-dat.svg)](https://starchart.cc/Loyalsoldier/v2ray-rules-dat)