mirror of
https://github.com/privacy-protection-tools/anti-AD.git
synced 2025-01-22 22:39:16 +08:00
50 lines
1.3 KiB
PHP
50 lines
1.3 KiB
PHP
<?php
|
||
/**
|
||
* 定义输出格式
|
||
*
|
||
*
|
||
*/
|
||
|
||
!defined('ROOT_DIR') && die('Access Denied.');
|
||
|
||
class writerFormat{
|
||
/*dnsmasq支持格式的屏蔽广告列表*/
|
||
const DNSMASQ = array(
|
||
'format' => 'address=/{DOMAIN}/',
|
||
'header' => "#VER={DATE}\n#URL={URL}\n",
|
||
'full_domain' => 0,
|
||
'name' => 'dnsmasq',
|
||
'filename' => 'adblock-for-dnsmasq.conf'
|
||
);
|
||
|
||
/*easylist 兼容格式的屏蔽广告列表*/
|
||
const EASYLIST = array(
|
||
'format' => '||{DOMAIN}^',
|
||
'header' => "!AdBlock-style blocklists\n!VER={DATE}\n!URL={URL}\n",
|
||
'full_domain' => 0,
|
||
'name' => 'easylist',
|
||
'filename' => 'anti-ad-easylist.txt'
|
||
);
|
||
|
||
/*Surge 兼容格式的屏蔽广告列表*/
|
||
const SURGE = array(
|
||
'format' => 'DOMAIN-SUFFIX,{DOMAIN}',
|
||
'header' => "#VER={DATE}\n#URL={URL}\n",
|
||
'full_domain' => 0,
|
||
'name' => 'surge',
|
||
'filename' => 'anti-ad-surge.txt'
|
||
);
|
||
|
||
/*Domains 格式的屏蔽广告列表,用于支持pi-hole等*/
|
||
const DOMAINS = array(
|
||
'format' => '{DOMAIN}',
|
||
'header' => "#VER={DATE}\n#URL={URL}\n",
|
||
'full_domain' => 1, //保留子域名,即使其上级域名
|
||
'name' => 'domains',
|
||
'filename' => 'anti-ad-domains.txt'
|
||
);
|
||
|
||
/*and etc...*/
|
||
|
||
}
|