Merge pull request #302 from cpylua/master

feat: add clash rule provider format
This commit is contained in:
gentlyxu 2021-01-01 22:27:37 +08:00 committed by GitHub
commit 19de8b88a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 37856 additions and 0 deletions

View File

@ -9,6 +9,7 @@ on:
paths: paths:
- 'anti-ad-*.txt' - 'anti-ad-*.txt'
- 'anti-ad-*.conf' - 'anti-ad-*.conf'
- 'anti-ad-*.yaml'
- 'adblock-for-dnsmasq.conf' - 'adblock-for-dnsmasq.conf'
jobs: jobs:
@ -28,6 +29,7 @@ jobs:
cp ./anti-ad-smartdns.conf ~/website/docs/anti-ad-for-smartdns.conf cp ./anti-ad-smartdns.conf ~/website/docs/anti-ad-for-smartdns.conf
cp ./anti-ad-surge.txt ~/website/docs/surge.txt cp ./anti-ad-surge.txt ~/website/docs/surge.txt
cp ./anti-ad-surge2.txt ~/website/docs/surge2.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 cp ./anti-ad-domains.txt ~/website/docs/domains.txt
- name: Commit files - name: Commit files
run: | run: |

View File

@ -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-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-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-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 | | `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

File diff suppressed because it is too large Load Diff

View File

@ -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...*/ /*and etc...*/
} }