Compare commits
6 Commits
2020103000
...
2020112322
Author | SHA1 | Date | |
---|---|---|---|
79f97847f4 | |||
28f62a90c5 | |||
594f81515e | |||
d2b891b3e5 | |||
43422a58a8 | |||
048ee41552 |
22
.github/workflows/run.yml
vendored
22
.github/workflows/run.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
|||||||
echo "RELEASE_NAME=Released on $(date +%Y%m%d%H%M)" >> $GITHUB_ENV
|
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 "TAG_NAME=$(date +%Y%m%d%H%M)" >> $GITHUB_ENV
|
||||||
echo "custom_icloud=https://raw.githubusercontent.com/Loyalsoldier/domain-list-custom/release/icloud.txt" >> $GITHUB_ENV
|
echo "custom_icloud=https://raw.githubusercontent.com/Loyalsoldier/domain-list-custom/release/icloud.txt" >> $GITHUB_ENV
|
||||||
echo "custom_tld-not-cn=https://raw.githubusercontent.com/Loyalsoldier/domain-list-custom/release/tld-!cn.txt" >> $GITHUB_ENV
|
echo "custom_tld_not_cn=https://raw.githubusercontent.com/Loyalsoldier/domain-list-custom/release/tld-!cn.txt" >> $GITHUB_ENV
|
||||||
echo "Loyalsoldier_reject=https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/reject-list.txt" >> $GITHUB_ENV
|
echo "Loyalsoldier_reject=https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/reject-list.txt" >> $GITHUB_ENV
|
||||||
echo "Loyalsoldier_proxy=https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/proxy-list.txt" >> $GITHUB_ENV
|
echo "Loyalsoldier_proxy=https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/proxy-list.txt" >> $GITHUB_ENV
|
||||||
echo "Loyalsoldier_direct=https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/direct-list.txt" >> $GITHUB_ENV
|
echo "Loyalsoldier_direct=https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/direct-list.txt" >> $GITHUB_ENV
|
||||||
@ -29,7 +29,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Checkout the "hidden" branch
|
- name: Checkout the "hidden" branch
|
||||||
uses: actions/checkout@v2.3.3
|
uses: actions/checkout@v2.3.4
|
||||||
with:
|
with:
|
||||||
ref: hidden
|
ref: hidden
|
||||||
|
|
||||||
@ -51,32 +51,32 @@ jobs:
|
|||||||
- name: Generate direct.txt file
|
- name: Generate direct.txt file
|
||||||
run: |
|
run: |
|
||||||
echo "payload:" > direct.txt
|
echo "payload:" > direct.txt
|
||||||
curl -sSL ${Loyalsoldier_direct} | perl -ne '/^([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print " - |+.$1|\n"' | sed "s/|/'/g" >> direct.txt
|
curl -sSL ${Loyalsoldier_direct} | grep -Ev "^(regexp|keyword):" | perl -ne '/^(domain:|full:)?([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print " - |+.$2|\n"' | sed "s/|/'/g" >> direct.txt
|
||||||
|
|
||||||
- name: Generate proxy.txt file
|
- name: Generate proxy.txt file
|
||||||
run: |
|
run: |
|
||||||
echo "payload:" > proxy.txt
|
echo "payload:" > proxy.txt
|
||||||
curl -sSL ${Loyalsoldier_proxy} | perl -ne '/^([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print " - |+.$1|\n"' | sed "s/|/'/g" >> proxy.txt
|
curl -sSL ${Loyalsoldier_proxy} | grep -Ev "^(regexp|keyword):" | perl -ne '/^(domain:|full:)?([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print " - |+.$2|\n"' | sed "s/|/'/g" >> proxy.txt
|
||||||
|
|
||||||
- name: Generate reject.txt file
|
- name: Generate reject.txt file
|
||||||
run: |
|
run: |
|
||||||
echo "payload:" > reject.txt
|
echo "payload:" > reject.txt
|
||||||
curl -sSL ${Loyalsoldier_reject} | perl -ne '/^([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print " - |+.$1|\n"' | sed "s/|/'/g" >> reject.txt
|
curl -sSL ${Loyalsoldier_reject} | grep -Ev "^(regexp|keyword):" | perl -ne '/^(domain:|full:)?([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print " - |+.$2|\n"' | sed "s/|/'/g" >> reject.txt
|
||||||
|
|
||||||
- name: Generate gfw.txt file
|
- name: Generate gfw.txt file
|
||||||
run: |
|
run: |
|
||||||
echo "payload:" > gfw.txt
|
echo "payload:" > gfw.txt
|
||||||
curl -sSL ${Loyalsoldier_gfw} | perl -ne '/^([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print " - |+.$1|\n"' | sed "s/|/'/g" >> gfw.txt
|
curl -sSL ${Loyalsoldier_gfw} | grep -Ev "^(regexp|keyword):" | perl -ne '/^(domain:|full:)?([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print " - |+.$2|\n"' | sed "s/|/'/g" >> gfw.txt
|
||||||
|
|
||||||
- name: Generate greatfire.txt file
|
- name: Generate greatfire.txt file
|
||||||
run: |
|
run: |
|
||||||
echo "payload:" > greatfire.txt
|
echo "payload:" > greatfire.txt
|
||||||
curl -sSL ${Loyalsoldier_greatfire} | perl -ne '/^([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print " - |+.$1|\n"' | sed "s/|/'/g" >> greatfire.txt
|
curl -sSL ${Loyalsoldier_greatfire} | grep -Ev "^(regexp|keyword):" | perl -ne '/^(domain:|full:)?([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print " - |+.$2|\n"' | sed "s/|/'/g" >> greatfire.txt
|
||||||
|
|
||||||
- name: Generate tld-!cn.txt file
|
- name: Generate tld-not-cn.txt file
|
||||||
run: |
|
run: |
|
||||||
echo "payload:" > tld-!cn.txt
|
echo "payload:" > tld-not-cn.txt
|
||||||
curl -sSL ${custom_tld-not-cn} | perl -ne '/^domain:([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print " - |+.$1|\n"' | sed "s/|/'/g" >> tld-!cn.txt
|
curl -sSL "${custom_tld_not_cn}" | perl -ne '/^domain:([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print " - |+.$1|\n"' | sed "s/|/'/g" >> tld-not-cn.txt
|
||||||
|
|
||||||
- name: Generate cncidr.txt file
|
- name: Generate cncidr.txt file
|
||||||
run: |
|
run: |
|
||||||
@ -86,7 +86,7 @@ jobs:
|
|||||||
- name: Move files to publish directory
|
- name: Move files to publish directory
|
||||||
run: |
|
run: |
|
||||||
mkdir -p publish
|
mkdir -p publish
|
||||||
install -p {apple,icloud,google,proxy,direct,reject,gfw,greatfire,cncidr,lancidr}.txt ./publish/
|
install -p {apple,icloud,google,proxy,direct,reject,gfw,greatfire,tld-not-cn,cncidr,lancidr}.txt ./publish/
|
||||||
|
|
||||||
- name: Release and upload assets
|
- name: Release and upload assets
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
|
20
README.md
20
README.md
@ -44,9 +44,9 @@
|
|||||||
- **GreatFire 域名列表 greatfire.txt**:
|
- **GreatFire 域名列表 greatfire.txt**:
|
||||||
- [https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/greatfire.txt](https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/greatfire.txt)
|
- [https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/greatfire.txt](https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/greatfire.txt)
|
||||||
- [https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/greatfire.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/greatfire.txt)
|
- [https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/greatfire.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/greatfire.txt)
|
||||||
- **非中国大陆使用的顶级域名列表 tld-!cn.txt**:
|
- **非中国大陆使用的顶级域名列表 tld-not-cn.txt**:
|
||||||
- [https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/tld-!cn.txt](https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/tld-!cn.txt)
|
- [https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/tld-not-cn.txt](https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/tld-not-cn.txt)
|
||||||
- [https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/tld-!cn.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/tld-!cn.txt)
|
- [https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/tld-not-cn.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/tld-not-cn.txt)
|
||||||
- **局域网 IP 及保留 IP 地址列表 lancidr.txt**:
|
- **局域网 IP 及保留 IP 地址列表 lancidr.txt**:
|
||||||
- [https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/lancidr.txt](https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/lancidr.txt)
|
- [https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/lancidr.txt](https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/lancidr.txt)
|
||||||
- [https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/lancidr.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/lancidr.txt)
|
- [https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/lancidr.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/lancidr.txt)
|
||||||
@ -120,11 +120,11 @@ rule-providers:
|
|||||||
path: ./ruleset/greatfire.yaml
|
path: ./ruleset/greatfire.yaml
|
||||||
interval: 86400
|
interval: 86400
|
||||||
|
|
||||||
tld-!cn:
|
tld-not-cn:
|
||||||
type: http
|
type: http
|
||||||
behavior: domain
|
behavior: domain
|
||||||
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/tld-!cn.txt"
|
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/tld-not-cn.txt"
|
||||||
path: ./ruleset/tld-!cn.yaml
|
path: ./ruleset/tld-not-cn.yaml
|
||||||
interval: 86400
|
interval: 86400
|
||||||
|
|
||||||
cncidr:
|
cncidr:
|
||||||
@ -145,7 +145,6 @@ rule-providers:
|
|||||||
#### 白名单模式 Rules 配置方式(推荐)
|
#### 白名单模式 Rules 配置方式(推荐)
|
||||||
|
|
||||||
- 白名单模式,意为「**没有命中规则的网络流量,统统使用代理**」,适用于服务器线路网络质量稳定、快速,不缺服务器流量的用户。
|
- 白名单模式,意为「**没有命中规则的网络流量,统统使用代理**」,适用于服务器线路网络质量稳定、快速,不缺服务器流量的用户。
|
||||||
- 以下配置中的 `PROCESS-NAME` 规则类型**只能**在 **ClashX Pro** 中使用,其余版本均不能使用,需要手动删除。
|
|
||||||
- 以下配置中,除了 `DIRECT` 和 `REJECT` 是默认存在于 Clash 中的 policy(路由策略/流量处理策略),其余均为自定义 policy,对应配置文件中 `proxies` 或 `proxy-groups` 中的 `name`。如你直接使用下面的 `rules` 规则,则需要在 `proxies` 或 `proxy-groups` 中手动配置一个 `name` 为 `PROXY` 的 policy。
|
- 以下配置中,除了 `DIRECT` 和 `REJECT` 是默认存在于 Clash 中的 policy(路由策略/流量处理策略),其余均为自定义 policy,对应配置文件中 `proxies` 或 `proxy-groups` 中的 `name`。如你直接使用下面的 `rules` 规则,则需要在 `proxies` 或 `proxy-groups` 中手动配置一个 `name` 为 `PROXY` 的 policy。
|
||||||
- 如你希望 Apple、iCloud 和 Google 列表中的域名使用代理,则把 policy 由 `DIRECT` 改为 `PROXY`,以此类推,举一反三。
|
- 如你希望 Apple、iCloud 和 Google 列表中的域名使用代理,则把 policy 由 `DIRECT` 改为 `PROXY`,以此类推,举一反三。
|
||||||
- 如你不希望进行 DNS 解析,可在 `GEOIP` 规则的最后加上 `,no-resolve`,如 `GEOIP,CN,DIRECT,no-resolve`。
|
- 如你不希望进行 DNS 解析,可在 `GEOIP` 规则的最后加上 `,no-resolve`,如 `GEOIP,CN,DIRECT,no-resolve`。
|
||||||
@ -169,6 +168,8 @@ rules:
|
|||||||
- PROCESS-NAME,NetTransport,DIRECT
|
- PROCESS-NAME,NetTransport,DIRECT
|
||||||
- PROCESS-NAME,uTorrent,DIRECT
|
- PROCESS-NAME,uTorrent,DIRECT
|
||||||
- PROCESS-NAME,WebTorrent,DIRECT
|
- PROCESS-NAME,WebTorrent,DIRECT
|
||||||
|
- DOMAIN,clash.razord.top,DIRECT
|
||||||
|
- DOMAIN,yacd.haishan.me,DIRECT
|
||||||
- RULE-SET,reject,REJECT
|
- RULE-SET,reject,REJECT
|
||||||
- RULE-SET,icloud,DIRECT
|
- RULE-SET,icloud,DIRECT
|
||||||
- RULE-SET,apple,DIRECT
|
- RULE-SET,apple,DIRECT
|
||||||
@ -183,7 +184,6 @@ rules:
|
|||||||
#### 黑名单模式 Rules 配置方式
|
#### 黑名单模式 Rules 配置方式
|
||||||
|
|
||||||
- 黑名单模式,意为「**只有命中规则的网络流量,才使用代理**」,适用于服务器线路网络质量不稳定或不够快,或服务器流量紧缺的用户。通常也是软路由用户、家庭网关用户的常用模式。
|
- 黑名单模式,意为「**只有命中规则的网络流量,才使用代理**」,适用于服务器线路网络质量不稳定或不够快,或服务器流量紧缺的用户。通常也是软路由用户、家庭网关用户的常用模式。
|
||||||
- 以下配置中的 `PROCESS-NAME` 规则类型**只能**在 **ClashX Pro** 中使用,其余版本均不能使用,需要手动删除。
|
|
||||||
- 以下配置中,除了 `DIRECT` 和 `REJECT` 是默认存在于 Clash 中的 policy(路由策略/流量处理策略),其余均为自定义 policy,对应配置文件中 `proxies` 或 `proxy-groups` 中的 `name`。如你直接使用下面的 `rules` 规则,则需要在 `proxies` 或 `proxy-groups` 中手动配置一个 `name` 为 `PROXY` 的 policy。
|
- 以下配置中,除了 `DIRECT` 和 `REJECT` 是默认存在于 Clash 中的 policy(路由策略/流量处理策略),其余均为自定义 policy,对应配置文件中 `proxies` 或 `proxy-groups` 中的 `name`。如你直接使用下面的 `rules` 规则,则需要在 `proxies` 或 `proxy-groups` 中手动配置一个 `name` 为 `PROXY` 的 policy。
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@ -205,8 +205,10 @@ rules:
|
|||||||
- PROCESS-NAME,NetTransport,DIRECT
|
- PROCESS-NAME,NetTransport,DIRECT
|
||||||
- PROCESS-NAME,uTorrent,DIRECT
|
- PROCESS-NAME,uTorrent,DIRECT
|
||||||
- PROCESS-NAME,WebTorrent,DIRECT
|
- PROCESS-NAME,WebTorrent,DIRECT
|
||||||
|
- DOMAIN,clash.razord.top,DIRECT
|
||||||
|
- DOMAIN,yacd.haishan.me,DIRECT
|
||||||
- RULE-SET,reject,REJECT
|
- RULE-SET,reject,REJECT
|
||||||
- RULE-SET,tld-!cn,PROXY
|
- RULE-SET,tld-not-cn,PROXY
|
||||||
- RULE-SET,gfw,PROXY
|
- RULE-SET,gfw,PROXY
|
||||||
- RULE-SET,greatfire,PROXY
|
- RULE-SET,greatfire,PROXY
|
||||||
- GEOIP,AE,PROXY
|
- GEOIP,AE,PROXY
|
||||||
|
Reference in New Issue
Block a user