Compare commits

...

4 Commits

Author SHA1 Message Date
loyalsoldier
37a0052814 README: more specific on no-resolve 2020-10-13 20:41:54 +08:00
loyalsoldier
536ff2d6b2 Fix Surge for iOS not support DOMAIN-SET 2020-10-13 20:32:36 +08:00
loyalsoldier
8f4dea269e Update set-env & add-path commands
due to https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
2020-10-06 15:09:58 +08:00
Loyalsoldier
61c6b9ed77 README: specify DOMAIN-SET compatible version of Surge for iOS
and minor changes
2020-09-09 17:46:56 +08:00
2 changed files with 20 additions and 19 deletions

View File

@@ -1,4 +1,4 @@
name: Generate DOMAIN-SET for Surge Mac 3
name: Generate routing rules for Surge
on:
schedule:
- cron: "30 22 * * *"
@@ -14,16 +14,16 @@ jobs:
steps:
- name: Set 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=v2fly_icloud::https://raw.githubusercontent.com/v2fly/domain-list-community/release/icloud.txt"
echo "::set-env name=v2fly_apple::https://raw.githubusercontent.com/v2fly/domain-list-community/release/apple.txt"
echo "::set-env name=Loyalsoldier_reject::https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/reject-list.txt"
echo "::set-env name=Loyalsoldier_proxy::https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/proxy-list.txt"
echo "::set-env name=Loyalsoldier_direct::https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/direct-list.txt"
echo "::set-env name=felixonmars_apple::https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/apple.china.conf"
echo "::set-env name=felixonmars_google::https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/google.china.conf"
echo "::set-env name=ipipnet_chinaiplist::https://raw.githubusercontent.com/17mon/china_ip_list/master/china_ip_list.txt"
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 "v2fly_icloud=https://raw.githubusercontent.com/v2fly/domain-list-community/release/icloud.txt" >> $GITHUB_ENV
echo "v2fly_apple=https://raw.githubusercontent.com/v2fly/domain-list-community/release/apple.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_direct=https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/direct-list.txt" >> $GITHUB_ENV
echo "felixonmars_apple=https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/apple.china.conf" >> $GITHUB_ENV
echo "felixonmars_google=https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/google.china.conf" >> $GITHUB_ENV
echo "ipipnet_chinaiplist=https://raw.githubusercontent.com/17mon/china_ip_list/master/china_ip_list.txt" >> $GITHUB_ENV
shell: bash
- name: Generate icloud.txt file
@@ -65,7 +65,7 @@ jobs:
- name: Generate cncidr.txt file
run: |
curl -sSL ${ipipnet_chinaiplist} | perl -ne '/^(\d{1,3}(\.\d{1,3}){3}\/\d{1,2})/ && print "$1\n"' > cncidr.txt
curl -sSL ${ipipnet_chinaiplist} | perl -ne '/^(\d{1,3}(\.\d{1,3}){3}\/\d{1,2})/ && print "IP-CIDR,$1\n"' > cncidr.txt
curl -sSL ${ipipnet_chinaiplist} | perl -ne '/^(\d{1,3}(\.\d{1,3}){3}\/\d{1,2})/ && print "IP-CIDR,$1\n"' > ruleset/cncidr.txt
- name: Move files to publish directory

View File

@@ -8,9 +8,8 @@
### ⚠️ 注意:
- **DOMAIN-SET** 适用于 Surge for Mac **v3.5.1** 及更新的版本,拥有比 RULE-SET 更优秀的匹配效率,建议优先使用。
- **DOMAIN-SET** 同时适用于 Surge for Mac **v3.5.1** 及更新的版本、Surge for iOS **v4.2.2** 及更新的版本,拥有比 RULE-SET 更优秀的匹配效率,建议优先使用。
- **RULE-SET** 同时适用于 Surge for Mac **v3.0** 及更新的版本、Surge for iOS **v3.4** 及更新的版本。
- 由于本项目规则集很庞大,用于 Surge for iOS 可能会拖慢移动设备网速或性能(未测试),请酌情使用。
## 规则文件地址及使用方式
@@ -68,9 +67,11 @@
### 使用方式
关于 Surge 的详细使用方法,见[官方手册](https://manual.nssurge.com)。要想使用本项目的规则集,只需要在 Surge 配置文件中添加如下规则
关于 Surge 的详细使用方法,见[官方手册](https://manual.nssurge.com)。要想使用本项目的规则集,只需要在 Surge 配置文件中添加如下规则
- 如果希望使用 DNS 来解析未命中域名类型规则的域名,而不是直接走代理,请删除 `cncidr` 行尾的 `,no-resolve`
⚠️ 注意:
- 如果希望使用 DNS 来解析未命中域名类型规则的域名,而不是直接走代理,请删除规则行尾的 `,no-resolve`
- 以下配置中,除了 `DIRECT``REJECT` 是默认存在于 Surge 中的 policy路由策略/流量处理策略),其余均为自定义 policy对应配置文件中 `[Proxy]``[Proxy Group]` 中的代理名称。如你直接使用下面的 `[Rule]` 规则,则需要在 `[Proxy]``[Proxy Group]` 中手动配置一个名为 `PROXY` 的 policy。
- 如你希望 Apple、iCloud 和 Google 列表中的域名使用代理,则把 policy 由 `DIRECT` 改为 `PROXY`,以此类推,举一反三。
@@ -87,7 +88,7 @@ PROCESS-NAME,trojan-go,DIRECT
PROCESS-NAME,naive,DIRECT
PROCESS-NAME,Thunder,DIRECT
PROCESS-NAME,DownloadService,DIRECT
PROCESS-NAME,qbittorrent,DIRECT
PROCESS-NAME,qBittorrent,DIRECT
PROCESS-NAME,Transmission,DIRECT
PROCESS-NAME,fdm,DIRECT
PROCESS-NAME,aria2c,DIRECT
@@ -102,7 +103,7 @@ DOMAIN-SET,https://raw.githubusercontent.com/Loyalsoldier/surge-rules/release/ap
DOMAIN-SET,https://raw.githubusercontent.com/Loyalsoldier/surge-rules/release/google.txt,DIRECT
DOMAIN-SET,https://raw.githubusercontent.com/Loyalsoldier/surge-rules/release/proxy.txt,PROXY,force-remote-dns
DOMAIN-SET,https://raw.githubusercontent.com/Loyalsoldier/surge-rules/release/direct.txt,DIRECT
DOMAIN-SET,https://raw.githubusercontent.com/Loyalsoldier/surge-rules/release/cncidr.txt,DIRECT,no-resolve
RULE-SET,https://raw.githubusercontent.com/Loyalsoldier/surge-rules/release/cncidr.txt,DIRECT,no-resolve
RULE-SET,LAN,DIRECT,no-resolve
FINAL,PROXY,dns-failed
```
@@ -120,7 +121,7 @@ PROCESS-NAME,trojan-go,DIRECT
PROCESS-NAME,naive,DIRECT
PROCESS-NAME,Thunder,DIRECT
PROCESS-NAME,DownloadService,DIRECT
PROCESS-NAME,qbittorrent,DIRECT
PROCESS-NAME,qBittorrent,DIRECT
PROCESS-NAME,Transmission,DIRECT
PROCESS-NAME,fdm,DIRECT
PROCESS-NAME,aria2c,DIRECT