mirror of
https://github.com/Loyalsoldier/v2ray-rules-dat.git
synced 2026-01-13 04:57:12 +08:00
Compare commits
4 Commits
2021032922
...
2021062622
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1aaa2c3955 | ||
|
|
41248053f3 | ||
|
|
2ed2fba720 | ||
|
|
6961566065 |
23
.github/workflows/run.yml
vendored
23
.github/workflows/run.yml
vendored
@@ -24,7 +24,6 @@ jobs:
|
||||
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 "GFWLIST_DOMAINS_URL=https://cokebar.github.io/gfwlist2dnsmasq/gfwlist_domain.txt" >> $GITHUB_ENV
|
||||
echo "GFWLIST_EXTRAS_DOMAINS_URL=https://raw.githubusercontent.com/pexcn/gfwlist-extras/master/gfwlist-extras.txt" >> $GITHUB_ENV
|
||||
echo "GREATFIRE_DOMAINS_URL=https://raw.githubusercontent.com/Loyalsoldier/cn-blocked-domain/release/domains.txt" >> $GITHUB_ENV
|
||||
echo "LHIE1_RULES_PROXY_URL=https://raw.githubusercontent.com/lhie1/Rules/master/Surge/Surge%203/Provider/Proxy.list" >> $GITHUB_ENV
|
||||
@@ -40,27 +39,39 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
- name: Checkout the "hidden" branch of this repo
|
||||
uses: actions/checkout@v2.3.4
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: hidden
|
||||
|
||||
- name: Checkout Loyalsoldier/domain-list-custom
|
||||
uses: actions/checkout@v2.3.4
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: Loyalsoldier/domain-list-custom
|
||||
path: custom
|
||||
|
||||
- name: Checkout v2fly/domain-list-community
|
||||
uses: actions/checkout@v2.3.4
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: v2fly/domain-list-community
|
||||
path: community
|
||||
|
||||
- name: Checkout cokebar/gfwlist2dnsmasq
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: cokebar/gfwlist2dnsmasq
|
||||
path: gfwlist2dnsmasq
|
||||
|
||||
- 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
|
||||
@@ -68,7 +79,7 @@ jobs:
|
||||
|
||||
- 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
|
||||
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 $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
|
||||
@@ -146,7 +157,7 @@ jobs:
|
||||
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
|
||||
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"' >> ./community/data/gfw
|
||||
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
|
||||
curl -sSL $GFWLIST_EXTRAS_DOMAINS_URL | perl -ne 'print if not /^(#|\s)/' >> ./community/data/gfw
|
||||
cat ./community/data/gfw | sort --ignore-case -u > gfw.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"' >> ./community/data/greatfire
|
||||
|
||||
132
README.md
132
README.md
@@ -8,7 +8,11 @@
|
||||
|
||||
- 通过仓库 [@Loyalsoldier/geoip](https://github.com/Loyalsoldier/geoip) 生成
|
||||
- 其中全球 IP 地址(IPv4 和 IPv6)来源于 [MaxMind GeoLite2](https://dev.maxmind.com/geoip/geoip2/geolite2/),`CN`(中国大陆)类别下的 IPv4 地址来源于 [ipip.net](https://github.com/17mon/china_ip_list)
|
||||
- 新增 `geoip:telegram` 类别,方便黑名单模式用户使用
|
||||
- 新增类别(方便有特殊需求的用户使用):
|
||||
- `geoip:cloudflare`
|
||||
- `geoip:cloudfront`
|
||||
- `geoip:fastly`
|
||||
- `geoip:telegram`
|
||||
|
||||
> 希望定制 `geoip.dat` 文件?查看仓库 [@Loyalsoldier/geoip](https://github.com/Loyalsoldier/geoip)。
|
||||
|
||||
@@ -168,9 +172,7 @@ steamstatic.com.8686c.com @cn
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Reject",
|
||||
"domain": [
|
||||
"geosite:category-ads-all"
|
||||
]
|
||||
"domain": ["geosite:category-ads-all"]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
@@ -186,21 +188,17 @@ steamstatic.com.8686c.com @cn
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Proxy",
|
||||
"domain": [
|
||||
"geosite:geolocation-!cn"
|
||||
]
|
||||
"domain": ["geosite:geolocation-!cn"]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Direct",
|
||||
"domain": [
|
||||
"geosite:cn"
|
||||
]
|
||||
"domain": ["geosite:cn"]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Proxy",
|
||||
"network": "tcp,udp"
|
||||
"type": "field",
|
||||
"outboundTag": "Proxy",
|
||||
"network": "tcp,udp"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -214,30 +212,22 @@ steamstatic.com.8686c.com @cn
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Reject",
|
||||
"domain": [
|
||||
"geosite:category-ads-all"
|
||||
]
|
||||
"domain": ["geosite:category-ads-all"]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Proxy",
|
||||
"domain": [
|
||||
"geosite:tld-!cn",
|
||||
"geosite:gfw",
|
||||
"geosite:greatfire"
|
||||
]
|
||||
"domain": ["geosite:tld-!cn", "geosite:gfw", "geosite:greatfire"]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Proxy",
|
||||
"ip": [
|
||||
"geoip:telegram"
|
||||
]
|
||||
"ip": ["geoip:telegram"]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Direct",
|
||||
"network": "tcp,udp"
|
||||
"type": "field",
|
||||
"outboundTag": "Direct",
|
||||
"network": "tcp,udp"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -247,26 +237,30 @@ steamstatic.com.8686c.com @cn
|
||||
|
||||
```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": "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",
|
||||
"geosite:category-games@cn"
|
||||
],
|
||||
"expectIPs": [
|
||||
"geoip:cn"
|
||||
]
|
||||
"domains": ["geosite:cn", "geosite:category-games@cn"],
|
||||
"expectIPs": ["geoip:cn"],
|
||||
"skipFallback": true
|
||||
},
|
||||
{
|
||||
"address": "https://1.1.1.1/dns-query",
|
||||
"domains": [
|
||||
"geosite:geolocation-!cn"
|
||||
]
|
||||
},
|
||||
"https+local://223.5.5.5/dns-query",
|
||||
"119.29.29.29"
|
||||
"address": "localhost",
|
||||
"skipFallback": true
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
@@ -275,9 +269,9 @@ steamstatic.com.8686c.com @cn
|
||||
|
||||
注意事项:
|
||||
|
||||
- 由于下面客户端配置使用了 DoH (DNS over HTTPS) 功能,所以必须使用 v4.22.0 或更新版本的 [V2Ray](https://github.com/v2fly/v2ray-core/releases)
|
||||
- 由于下面客户端配置的 DNS 使用了 `skipFallback` 选项,所以必须使用 v4.37.2 或更新版本的 [V2Ray](https://github.com/v2fly/v2ray-core/releases)
|
||||
- 下面客户端配置使 V2Ray 在本机开启 SOCKS 代理(监听 1080 端口)和 HTTP 代理(监听 2080 端口),允许局域网内其他设备连接并使用代理
|
||||
- BT 流量统统直连(实测依然会有部分 BT 流量走代理,尚不清楚是不是 V2Ray 的 bug。如果服务商禁止 BT 下载的话,请不要为下载软件设置代理)
|
||||
- BT 流量统统直连(实测依然会有部分 BT 流量走代理,如果服务商禁止 BT 下载,请不要为下载软件设置代理)
|
||||
- 最后,不命中任何路由规则的请求和流量,统统走代理
|
||||
- `outbounds` 里的第一个大括号内的配置,即为 V2Ray 代理服务的配置。请根据自身需求进行修改,并参照 V2Ray 官网配置文档中的 [配置 > Outbounds > OutboundObject](https://www.v2fly.org/config/outbounds.html#outboundobject) 部分进行补全
|
||||
|
||||
@@ -289,26 +283,31 @@ steamstatic.com.8686c.com @cn
|
||||
"dns": {
|
||||
"hosts": {
|
||||
"dns.google": "8.8.8.8",
|
||||
"doh.pub": "119.29.29.29"
|
||||
"dns.pub": "119.29.29.29",
|
||||
"dns.alidns.com": "223.5.5.5",
|
||||
"geosite:category-ads-all": "127.0.0.1"
|
||||
},
|
||||
"servers": [
|
||||
"https://dns.google/dns-query",
|
||||
{
|
||||
"address": "https+local://223.5.5.5/dns-query",
|
||||
"address": "https://1.1.1.1/dns-query",
|
||||
"domains": ["geosite:geolocation-!cn", "geosite:google@cn"],
|
||||
"expectIPs": ["geoip:!cn"]
|
||||
},
|
||||
"8.8.8.8",
|
||||
{
|
||||
"address": "114.114.114.114",
|
||||
"port": 53,
|
||||
"domains": [
|
||||
"geosite:cn",
|
||||
"geosite:icloud",
|
||||
"geosite:category-games@cn"
|
||||
],
|
||||
"expectIPs": [
|
||||
"geoip:cn"
|
||||
]
|
||||
"expectIPs": ["geoip:cn"],
|
||||
"skipFallback": true
|
||||
},
|
||||
{
|
||||
"address": "https://1.1.1.1/dns-query",
|
||||
"domains": [
|
||||
"geosite:geolocation-!cn"
|
||||
]
|
||||
"address": "localhost",
|
||||
"skipFallback": true
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -372,6 +371,7 @@ steamstatic.com.8686c.com @cn
|
||||
],
|
||||
"routing": {
|
||||
"domainStrategy": "IPIfNonMatch",
|
||||
"domainMatcher": "mph",
|
||||
"rules": [
|
||||
{
|
||||
"type": "field",
|
||||
@@ -381,26 +381,22 @@ steamstatic.com.8686c.com @cn
|
||||
{
|
||||
"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": [
|
||||
"full:www.icloud.com",
|
||||
"domain:icloud-content.com"
|
||||
"domain:icloud-content.com",
|
||||
"geosite:google"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -415,25 +411,17 @@ steamstatic.com.8686c.com @cn
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Proxy",
|
||||
"domain": [
|
||||
"geosite:geolocation-!cn"
|
||||
]
|
||||
"domain": ["geosite:geolocation-!cn"]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Direct",
|
||||
"domain": [
|
||||
"geosite:cn",
|
||||
"geosite:private"
|
||||
]
|
||||
"domain": ["geosite:cn", "geosite:private"]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"outboundTag": "Direct",
|
||||
"ip": [
|
||||
"geoip:cn",
|
||||
"geoip:private"
|
||||
]
|
||||
"ip": ["geoip:cn", "geoip:private"]
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
|
||||
Reference in New Issue
Block a user