Compare commits

...

29 Commits

Author SHA1 Message Date
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
2 changed files with 271 additions and 85 deletions

View File

@@ -1,32 +1,30 @@
name: Build v2ray rules dat files
name: Build V2Ray rules dat files
on:
schedule:
- cron: "0 22 * * *"
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Setup Go 1.13
- name: Setup Go 1.14
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go
go-version: 1.14
- name: Set $GOPATH and more variables
run: |
echo "::set-env name=NAME::Released on $(date +%Y%m%d%H%M)"
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/v2ray/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=CDN_DOMAINS_URL::https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/removed-cdn.txt"
echo "::set-env name=GFWLIST_DOMAINS_URL::https://cokebar.github.io/gfwlist2dnsmasq/gfwlist_domain.txt"
echo "::set-env name=GREATFIRE_DOMAINS_URL::https://raw.githubusercontent.com/wongsyrone/domain-block-list/master/domains.txt"
echo "::set-env name=PROFILES_URL::https://raw.githubusercontent.com/ConnersHua/Profiles/master/Shadow/Pro.conf"
@@ -35,17 +33,19 @@ jobs:
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_REJECT_URL::https://raw.githubusercontent.com/lhie1/Rules/master/Auto/REJECT.conf"
echo "::set-env name=LHIE1_RULES_GLOBALTV_URL::https://raw.githubusercontent.com/lhie1/Rules/master/Surge/Surge%203/Provider/GlobalTV.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=GOPATH::$(dirname $GITHUB_WORKSPACE)"
echo "::add-path::$(dirname $GITHUB_WORKSPACE)/bin"
shell: bash
- name: Checkout branch named hidden of this repo
- name: Checkout the "hidden" branch
uses: actions/checkout@v2
with:
ref: hidden
- name: Get GeoLite2 file
- 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
@@ -65,62 +65,71 @@ jobs:
- name: Get and add direct domains into temp-direct.txt file
run: |
curl -sSL $CHINA_DOMAINS_URL | awk -F '/' '{print $2}' > temp-direct.txt
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 > temp-proxy.txt
curl -sSL $GREATFIRE_DOMAINS_URL >> temp-proxy.txt
curl -sSL $GOOGLE_DOMAINS_URL | awk -F '/' '{print $2}' >> temp-proxy.txt
curl -sSL $APPLE_DOMAINS_URL | awk -F '/' '{print $2}' >> 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 $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 $CDN_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 $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_GLOBALTV_URL | awk -F ',' '/^(HOST|DOMAIN)(,|\-SUFFIX,).+/ {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,).+REJECT/ {print $2}' >> temp-reject.txt
curl -sSL $LHIE1_RULES_REJECT_URL | awk -F ',' '/^DOMAIN(,|\-SUFFIX,).+/ {print $2}' >> temp-reject.txt
- name: Add proxy and direct domains from "hidden" branch to appropriate temp files
run: |
cat proxy.txt >> temp-proxy.txt
cat direct.txt >> temp-direct.txt
- name: Remove repeated domains, sort domains and write domains to appropriate list
- name: Sort and generate lists
run: |
cat temp-proxy.txt | sort --ignore-case -u > proxy-sort.txt
cat temp-direct.txt | sort --ignore-case -u > direct-sort.txt
cat temp-reject.txt | sort --ignore-case -u > reject-sort.txt
- name: Filter valid domains
run: |
cat proxy-sort.txt | awk '/^([a-zA-Z0-9[.-.][._.]]+\.)+[a-zA-Z0-9[.-.]]+$/{print $0}' > $GOPATH/src/$GEOSITE_REPO/data/proxylist
cat proxy-sort.txt | awk '!/^([a-zA-Z0-9[.-.][._.]]+\.)+[a-zA-Z0-9[.-.]]+$/{print $0}' > proxy-filter.txt
cat direct-sort.txt | awk '/^([a-zA-Z0-9[.-.][._.]]+\.)+[a-zA-Z0-9[.-.]]+$/{print $0}' > $GOPATH/src/$GEOSITE_REPO/data/directlist
cat direct-sort.txt | awk '!/^([a-zA-Z0-9[.-.][._.]]+\.)+[a-zA-Z0-9[.-.]]+$/{print $0}' > direct-filter.txt
cat reject-sort.txt | awk '/^([a-zA-Z0-9[.-.][._.]]+\.)+[a-zA-Z0-9[.-.]]+$/{print $0}' > $GOPATH/src/$GEOSITE_REPO/data/rejectlist
cat reject-sort.txt | awk '!/^([a-zA-Z0-9[.-.][._.]]+\.)+[a-zA-Z0-9[.-.]]+$/{print $0}' > reject-filter.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"' > $GOPATH/src/$GEOSITE_REPO/data/proxy-list
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"' > $GOPATH/src/$GEOSITE_REPO/data/direct-list
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"' > $GOPATH/src/$GEOSITE_REPO/data/reject-list
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: Add list into appropriate category file
run: |
cd $GOPATH/src/$GEOSITE_REPO/data
echo "include:proxylist" >> geolocation-\!cn
echo "include:directlist" >> cn
echo "include:rejectlist" >> category-ads-all
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
mv ./dlc.dat ./publish/geosite.dat
mv ./*-filter.txt ./publish/
cp -f $GOPATH/src/$GEOSITE_REPO/data/{proxy,direct,reject}list ./publish/
mv ./*-excluse-list ./publish/
cp -f $GOPATH/src/$GEOSITE_REPO/data/{proxy,direct,reject}-list ./publish/
- name: Release dat files
uses: Ricky-Hao/action-release@master
- name: Generate dat files sha256 hash
run: |
cd ./publish
sha256sum geoip.dat > geoip.dat.sha256sum
sha256sum geosite.dat > geosite.dat.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 }}
ASSET_PATH: publish

271
README.md
View File

@@ -1,6 +1,10 @@
# 简介
**v2ray** 加强版规则文件,可代替 v2ray 官方 `geoip.dat``geosite.dat` 规则文件。利用 GitHub Actions 北京时间每天早上 6 点自动构建,保证规则最新。
**V2Ray** 规则文件加强版,可代替 V2Ray 官方 `geoip.dat``geosite.dat` 规则文件。利用 GitHub Actions 北京时间每天早上 6 点自动构建,保证规则最新。
## 说明
本项目支持命令行版本 V2Ray 客户端。第三方桌面图形界面版GUIV2Ray 客户端一般有自身图形化配置界面,但一般也都支持使用 V2Ray 自定义 JSON 配置和 dat 规则文件,请自行研究并修改配置。第三方移动端 V2Ray 客户端情况比较复杂,大概率不支持自定义 V2Ray JSON 配置和使用 dat 规则文件,请知悉。
## 规则文件生成方式
@@ -12,7 +16,11 @@
### geosite.dat
- 通过仓库 [@v2ray/domain-list-community](https://github.com/v2ray/domain-list-community) 生成
- **加入大量中国大陆域名**:通过仓库 [@felixonmars/dnsmasq-china-list](https://github.com/felixonmars/dnsmasq-china-list) 生成并加入到 `geosite:cn` 类别中
- **加入大量中国大陆域名、Apple 域名、Google 域名和部分海外 CDN 域名**
- [@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` 类别中
- [@felixonmars/dnsmasq-china-list/removed-cdn.txt](https://github.com/felixonmars/dnsmasq-china-list/blob/master/removed-cdn.txt) 加入到 `geosite:geolocation-!cn` 类别中
- **加入最新 GFWList 域名**:通过仓库 [@cokebar/gfwlist2dnsmasq](https://github.com/cokebar/gfwlist2dnsmasq) 生成并加入到 `geosite:geolocation-!cn` 类别中
- **加入 Greatfire Analyzer 检测到的屏蔽域名**:通过仓库 [@wongsyrone/domain-block-list](https://github.com/wongsyrone/domain-block-list) 获取 [Greatfire Analyzer](https://zh.greatfire.org/analyzer) 检测到的屏蔽域名,并加入到 `geosite:geolocation-!cn` 类别中
- **加入更多代理域名和广告域名**:通过仓库 [@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` 类别中
@@ -28,44 +36,202 @@
**使用方式**
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 配置文件,配置参考下面 👇👇👇
2. 把下载下来的 `geoip.dat``geosite.dat` 文件放入到 V2Ray 软件的规则文件目录,替换掉原来的 `geoip.dat``geosite.dat`
3. 修改 V2Ray 配置文件,配置参考下面 👇👇👇
## 参考配置
### geoip.dat
v2ray 官方 `geoip.dat` 配置方式相同。
V2Ray 官方 `geoip.dat` 配置方式相同。
**Routing 配置方式**
```json
{
"routing": {
"rules": [
{
"type": "field",
"outboundTag": "Direct",
"ip": [
"geoip:cn",
"geoip:private"
]
}
]
}
"routing": {
"rules": [
{
"type": "field",
"outboundTag": "Direct",
"ip": [
"geoip:cn",
"geoip:private"
]
}
]
}
```
### geosite.dat
v2ray 官方 `geosite.dat` 配置方式相同。
V2Ray 官方 `geosite.dat` 配置方式相同。
**Routing 配置方式**
```json
"routing": {
"rules": [
{
"type": "field",
"outboundTag": "Reject",
"domain": [
"geosite:category-ads-all"
]
},
{
"type": "field",
"outboundTag": "Proxy",
"domain": [
"geosite:geolocation-!cn"
]
},
{
"type": "field",
"outboundTag": "Direct",
"domain": [
"geosite:cn"
]
}
]
}
```
**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"
]
}
```
### 自用 V2Ray 客户端完整配置(仅供参考,根据自身需求酌情修改)
下面为自用 V2Ray 客户端完整配置,注意事项:
- 由于下面客户端配置使用了 DoH DNS 功能,所以必须使用 v4.22.0 或更新版本的 [V2Ray](https://github.com/v2ray/v2ray-core/releases)
- 下面客户端配置使 V2Ray 在本机开启 SOCKS 代理(监听 1080 端口)和 HTTP 代理(监听 2080 端口)
- BT 流量统统直连(实测依然会有部分 BT 流量走代理,尚不清楚是不是 V2Ray 的 bug。如果服务商禁止 BT 下载的话,请不要为下载软件设置代理)
- 最后,不命中任何路由规则的请求和流量,统统走代理
- `outbounds` 里的第一个大括号内的配置,即为 V2Ray 代理服务的配置。请根据自身需求进行修改,并参照 V2Ray 官网配置说明中的 [配置文件 > 文件格式 > OutboundObject](https://v2ray.com/chapter_02/01_overview.html#outboundobject) 部分进行补全
```json
{
"log": {
"loglevel": "warning"
},
"dns": {
"servers": [
{
"address": "https://1.1.1.1/dns-query",
"domains": [
"geosite:geolocation-!cn",
"geosite:speedtest"
]
},
"https://1.1.1.1/dns-query",
"https://dns.google/dns-query",
{
"address": "114.114.114.114",
"port": 53,
"domains": [
"geosite: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": {},
//下面这行必须为Proxy对应Routing里的outboundTag记得删除这行文字说明
"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": "IPIfNonMatch",
"rules": [
{
"type": "field",
"outboundTag": "Dns-Out",
"inboundTag": [
"Socks-In",
"Http-In"
],
"network": "udp",
"port": 53
},
{
"type": "field",
"outboundTag": "Direct",
"protocol": ["bittorrent"]
},
{
"type": "field",
"outboundTag": "Reject",
@@ -77,7 +243,8 @@
"type": "field",
"outboundTag": "Proxy",
"domain": [
"geosite:geolocation-!cn"
"geosite:geolocation-!cn",
"geosite:speedtest"
]
},
{
@@ -86,44 +253,54 @@
"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",
"ip": [
"0.0.0.0/0",
"::/0"
]
}
]
}
}
```
**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"
]
}
}
```
## 致谢
- [@v2ray/geoip](https://github.com/v2ray/geoip)
- [@v2ray/domain-list-community](https://github.com/v2ray/domain-list-community)
- [@felixonmars/dnsmasq-china-list](https://github.com/felixonmars/dnsmasq-china-list)
- [@gfwlist/gfwlist](https://github.com/gfwlist/gfwlist)
- [@cokebar/gfwlist2dnsmasq](https://github.com/cokebar/gfwlist2dnsmasq)
- [@wongsyrone/domain-block-list](https://github.com/wongsyrone/domain-block-list)
- [@ConnersHua/Profiles](https://github.com/ConnersHua/Profiles/tree/master)