mirror of
https://github.com/privacy-protection-tools/anti-AD.git
synced 2025-01-22 22:39:16 +08:00
Merge pull request #302 from cpylua/master
feat: add clash rule provider format
This commit is contained in:
commit
19de8b88a3
2
.github/workflows/sync-to-dist.yml
vendored
2
.github/workflows/sync-to-dist.yml
vendored
@ -9,6 +9,7 @@ on:
|
||||
paths:
|
||||
- 'anti-ad-*.txt'
|
||||
- 'anti-ad-*.conf'
|
||||
- 'anti-ad-*.yaml'
|
||||
- 'adblock-for-dnsmasq.conf'
|
||||
|
||||
jobs:
|
||||
@ -28,6 +29,7 @@ jobs:
|
||||
cp ./anti-ad-smartdns.conf ~/website/docs/anti-ad-for-smartdns.conf
|
||||
cp ./anti-ad-surge.txt ~/website/docs/surge.txt
|
||||
cp ./anti-ad-surge2.txt ~/website/docs/surge2.txt
|
||||
cp ./anti-ad-clash.yaml ~/website/docs/clash.yaml
|
||||
cp ./anti-ad-domains.txt ~/website/docs/domains.txt
|
||||
- name: Commit files
|
||||
run: |
|
||||
|
@ -14,6 +14,8 @@
|
||||
| `anti-ad-easylist.txt` | [link](https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-easylist.txt) | [官网地址,更稳定](https://anti-ad.net/easylist.txt) | AdGuardHome |
|
||||
| `anti-ad-domains.txt` | [link](https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-domains.txt) | [官网地址,更稳定](https://anti-ad.net/domains.txt) | Pi-Hole或其他。 |
|
||||
| `anti-ad-surge.txt` | [link](https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-surge.txt) | [官网地址,更稳定](https://anti-ad.net/surge.txt) | Surge或其他工具。 |
|
||||
| `anti-ad-surge2.txt` | [link](https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-surge2.txt) | [官网地址,更稳定](https://anti-ad.net/surge2.txt) | Surge或其他工具,DOMAIN-SET 格式性能更好。 |
|
||||
| `anti-ad-clash.yaml` | [link](https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-clash.yaml) | [官网地址,更稳定](https://anti-ad.net/clash.yaml) | Clash Premium。 |
|
||||
| `anti-ad-smartdns.conf` | [link](https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-smartdns.conf) | [官网地址,更稳定](https://anti-ad.net/anti-ad-for-smartdns.conf) | SmartDNS |
|
||||
|
||||
## 版本历史
|
||||
|
37824
anti-ad-clash.yaml
Normal file
37824
anti-ad-clash.yaml
Normal file
File diff suppressed because it is too large
Load Diff
@ -176,6 +176,34 @@ class writerFormat{
|
||||
),
|
||||
);
|
||||
|
||||
/*Clash RULE-SET 格式的屏蔽广告列表*/
|
||||
const CLASH = array(
|
||||
'format' => ' - \'+.{DOMAIN}\'',
|
||||
'header' => "#TITLE=anti-AD\n#VER={DATE}\n#URL={URL}\n#TOTAL_LINES={COUNT}\n\n#RULE-SET,AntiAd,REJECT\npayload:\n",
|
||||
'full_domain' => 0,
|
||||
'name' => 'clash',
|
||||
'filename' => '../anti-ad-clash.yaml',
|
||||
'whitelist_attached' => array(
|
||||
'base-dead-hosts.txt' =>array(
|
||||
'merge_mode' => 2, //0=单条,1=单条+子域名,2=根域名相当于1,非根域名相当于0
|
||||
),
|
||||
),
|
||||
'src' => array(
|
||||
'base-src-easylist.txt' => array(
|
||||
'type' => 'easylist',
|
||||
'strict_mode' => false,
|
||||
),
|
||||
'base-src-hosts.txt' => array(
|
||||
'type' => 'hosts',
|
||||
'strict_mode' => false,
|
||||
),
|
||||
'base-src-strict-hosts.txt' => array(
|
||||
'type' => 'hosts',
|
||||
'strict_mode' => true,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
/*and etc...*/
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user