mirror of
https://github.com/privacy-protection-tools/anti-AD.git
synced 2025-02-13 17:12:41 +08:00
白名单机制增强,逻辑bug 修复
This commit is contained in:
parent
bf727b3929
commit
f1cc38a4fa
@ -179,7 +179,10 @@ class addressMaker{
|
|||||||
|
|
||||||
foreach($arr_result as $rk => $rv){
|
foreach($arr_result as $rk => $rv){
|
||||||
|
|
||||||
if(array_key_exists($rk, $GLOBALS['arr_whitelist'])){//主域名在白名单的,整个不写入屏蔽列表
|
if(
|
||||||
|
array_key_exists($rk, $GLOBALS['arr_whitelist'])
|
||||||
|
&& ($GLOBALS['arr_whitelist'][$rk] === 1)
|
||||||
|
){//主域名在白名单的,并且标识为1的,整个不写入屏蔽列表,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,7 +201,9 @@ class addressMaker{
|
|||||||
|
|
||||||
$rv = array_unique($rv);
|
$rv = array_unique($rv);
|
||||||
|
|
||||||
if(in_array('.' . $rk, $rv) || in_array('www.' . $rk, $rv) || in_array($rk, $rv)){
|
if((in_array('.' . $rk, $rv) || in_array('www.' . $rk, $rv) || in_array($rk, $rv))
|
||||||
|
&& !array_key_exists($rk, $GLOBALS['arr_whitelist'])
|
||||||
|
){
|
||||||
$write_len += fwrite($fp, str_replace('{DOMAIN}', $rk, $formatObj['format']) . "\n");
|
$write_len += fwrite($fp, str_replace('{DOMAIN}', $rk, $formatObj['format']) . "\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -218,11 +223,17 @@ class addressMaker{
|
|||||||
$tmp_arr2 = array_slice($tmp_arr1, -1 * $tmp_pos);
|
$tmp_arr2 = array_slice($tmp_arr1, -1 * $tmp_pos);
|
||||||
if(in_array(implode('.', $tmp_arr2), $rv)){
|
if(in_array(implode('.', $tmp_arr2), $rv)){
|
||||||
if(!in_array(implode('.', $tmp_arr2), $arr_written)){
|
if(!in_array(implode('.', $tmp_arr2), $arr_written)){
|
||||||
$arr_written[] = implode('.', $tmp_arr2);
|
|
||||||
if(array_key_exists(implode('.', $tmp_arr2), $GLOBALS['arr_whitelist'])){
|
if(array_key_exists(implode('.', $tmp_arr2), $GLOBALS['arr_whitelist'])){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$write_len += fwrite($fp, str_replace('{DOMAIN}', implode('.', $tmp_arr2), $formatObj['format']) . "\n");
|
$arr_written[] = implode('.', $tmp_arr2);
|
||||||
|
$write_len += fwrite(
|
||||||
|
$fp,
|
||||||
|
str_replace('{DOMAIN}',
|
||||||
|
implode('.', $tmp_arr2),
|
||||||
|
$formatObj['format']
|
||||||
|
) . "\n"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
$written_flag = true;
|
$written_flag = true;
|
||||||
break;
|
break;
|
||||||
|
@ -5,82 +5,80 @@
|
|||||||
|
|
||||||
return array(
|
return array(
|
||||||
|
|
||||||
'cdn-thumb.fds.api.xiaomi.com' => true,
|
'cdn-thumb.fds.api.xiaomi.com' => 0,
|
||||||
'bce.baidu.com' => true,
|
'bce.baidu.com' => 0,
|
||||||
'b.bdstatic.com' => true,
|
'b.bdstatic.com' => 0,
|
||||||
'gss0.bdstatic.com' => true, //百度贴吧头像
|
'gss0.bdstatic.com' => 0, //百度贴吧头像
|
||||||
'googleadapis.l.google.com' => true, //解决google字体下载异常
|
'googleadapis.l.google.com' => 0, //解决google字体下载异常
|
||||||
'gstaticadssl.l.google.com' => true, //解决google字体下载异常
|
'gstaticadssl.l.google.com' => 0, //解决google字体下载异常
|
||||||
'gvt10.com' => true,
|
'gvt2.com' => 1, //gvt2,安卓系统相关
|
||||||
'gvt1.com' => true,
|
'wangbase.com' => 1, //阮一峰同志的博客图片显示,如果value=1并且是根域名,则整条加白
|
||||||
'gvt2.com' => true,
|
'l.qq.com' => 0, //解决腾讯视频无法播放
|
||||||
'gvt3.com' => true,
|
'dldir1.qq.com' => 0, //qq下载安装包路径
|
||||||
'wangbase.com' => true, //阮一峰同志的博客图片显示
|
'cgi.connect.qq.com' => 0, //qq互联
|
||||||
'l.qq.com' => true, //解决腾讯视频无法播放
|
'stdl.qq.com' => 0, //qq浏览器
|
||||||
'dldir1.qq.com' => true, //qq下载安装包路径
|
'wup.imtt.qq.com' => 0, //qq浏览器书签
|
||||||
'cgi.connect.qq.com' => true, //qq互联
|
'pacaio.match.qq.com' => 0, //腾讯网qq登录
|
||||||
'stdl.qq.com' => true, //qq浏览器
|
'gia.jd.com' => 0, //京东滑动验证码
|
||||||
'wup.imtt.qq.com' => true, //qq浏览器书签
|
'edge.yunjiasu.com' => 0, //百度云加速javascript快速加载功能
|
||||||
'pacaio.match.qq.com' => true, //腾讯网qq登录
|
'cd.bendibao.com' => 0, //成都本地宝
|
||||||
'gia.jd.com' => true, //京东滑动验证码
|
'm.qpic.cn' => 0, // qq,微信,QQ空间等用到的静态资源域名
|
||||||
'edge.yunjiasu.com' => true, //百度云加速javascript快速加载功能
|
'ipify.org' => 0, // 获得公网 IP
|
||||||
'cd.bendibao.com' => true, //成都本地宝
|
'pass.1688.com' => 0, // 阿里巴巴网站访问不正常
|
||||||
'm.qpic.cn' => true, // qq,微信,QQ空间等用到的静态资源域名
|
'cedexis.net' => 0, // windowsupdate CNAME
|
||||||
'ipify.org' => true, // 获得公网 IP
|
'y0.cn' => 0, // 短网址服务,涉及本次丁香医生实时疫情页面 http://y0.cn/sari
|
||||||
'pass.1688.com' => true, // 阿里巴巴网站访问不正常
|
'click.taobao.com' => 0, //淘宝粉丝福利购
|
||||||
'cedexis.net' => true, // windowsupdate CNAME
|
't1.baidu.com' => 0, //百度图片自有平台
|
||||||
'y0.cn' => true, // 短网址服务,涉及本次丁香医生实时疫情页面 http://y0.cn/sari
|
't2.baidu.com' => 0, //百度图片自有平台
|
||||||
'click.taobao.com' => true, //淘宝粉丝福利购
|
't3.baidu.com' => 0, //百度图片自有平台
|
||||||
't1.baidu.com' => true, //百度图片自有平台
|
't4.baidu.com' => 0, //百度图片自有平台
|
||||||
't2.baidu.com' => true, //百度图片自有平台
|
't5.baidu.com' => 0, //百度图片自有平台
|
||||||
't3.baidu.com' => true, //百度图片自有平台
|
't6.baidu.com' => 0, //百度图片自有平台
|
||||||
't4.baidu.com' => true, //百度图片自有平台
|
't7.baidu.com' => 0, //百度图片自有平台
|
||||||
't5.baidu.com' => true, //百度图片自有平台
|
't8.baidu.com' => 0, //百度图片自有平台
|
||||||
't6.baidu.com' => true, //百度图片自有平台
|
't9.baidu.com' => 0, //百度图片自有平台
|
||||||
't7.baidu.com' => true, //百度图片自有平台
|
't10.baidu.com' => 0, //百度图片自有平台
|
||||||
't8.baidu.com' => true, //百度图片自有平台
|
't11.baidu.com' => 0, //百度图片自有平台
|
||||||
't9.baidu.com' => true, //百度图片自有平台
|
't12.baidu.com' => 0, //百度图片自有平台
|
||||||
't10.baidu.com' => true, //百度图片自有平台
|
'bytedance.com' => 0, //字节跳动
|
||||||
't11.baidu.com' => true, //百度图片自有平台
|
|
||||||
't12.baidu.com' => true, //百度图片自有平台
|
|
||||||
|
|
||||||
|
|
||||||
'activate.adobe.com' => true,
|
'activate.adobe.com' => 0,
|
||||||
'ereg.adobe.com' => true,
|
'ereg.adobe.com' => 0,
|
||||||
'hlrcv.stage.adobe.com' => true,
|
'hlrcv.stage.adobe.com' => 0,
|
||||||
'lm.licenses.adobe.com' => true,
|
'lm.licenses.adobe.com' => 0,
|
||||||
'lmlicenses.wip4.adobe.com' => true,
|
'lmlicenses.wip4.adobe.com' => 0,
|
||||||
'na1r.services.adobe.com' => true,
|
'na1r.services.adobe.com' => 0,
|
||||||
'na2m-pr.licenses.adobe.com' => true,
|
'na2m-pr.licenses.adobe.com' => 0,
|
||||||
'serial.alcohol-soft.com' => true,
|
'serial.alcohol-soft.com' => 0,
|
||||||
'trial.alcohol-soft.com' => true,
|
'trial.alcohol-soft.com' => 0,
|
||||||
'licenses.ashampoo.com' => true,
|
'licenses.ashampoo.com' => 0,
|
||||||
'license.bluesoleil.com' => true,
|
'license.bluesoleil.com' => 0,
|
||||||
'license2.bluesoleil.com' => true,
|
'license2.bluesoleil.com' => 0,
|
||||||
'license3.bluesoleil.com' => true,
|
'license3.bluesoleil.com' => 0,
|
||||||
'activation.phaseone.com' => true,
|
'activation.phaseone.com' => 0,
|
||||||
'apps.corel.com' => true,
|
'apps.corel.com' => 0,
|
||||||
'mc.corel.com' => true,
|
'mc.corel.com' => 0,
|
||||||
'origin-mc.corel.com' => true,
|
'origin-mc.corel.com' => 0,
|
||||||
'iws.corel.com' => true,
|
'iws.corel.com' => 0,
|
||||||
'ipm.corel.com' => true,
|
'ipm.corel.com' => 0,
|
||||||
'sws.corel.com' => true,
|
'sws.corel.com' => 0,
|
||||||
'dam.corel.com' => true,
|
'dam.corel.com' => 0,
|
||||||
'dbregistration.cuteftp.com' => true,
|
'dbregistration.cuteftp.com' => 0,
|
||||||
'activation.cyberlink.com' => true,
|
'activation.cyberlink.com' => 0,
|
||||||
'cap.cyberlink.com' => true,
|
'cap.cyberlink.com' => 0,
|
||||||
'activation.easeus.com' => true,
|
'activation.easeus.com' => 0,
|
||||||
'upd.faronicslabs.com' => true,
|
'upd.faronicslabs.com' => 0,
|
||||||
'backup.lumion3d.com' => true,
|
'backup.lumion3d.com' => 0,
|
||||||
'backup.lumion3d.net' => true,
|
'backup.lumion3d.net' => 0,
|
||||||
'license.lumion3d.com' => true,
|
'license.lumion3d.com' => 0,
|
||||||
'license.lumion3d.net' => true,
|
'license.lumion3d.net' => 0,
|
||||||
'act2.mediafour.com' => true,
|
'act2.mediafour.com' => 0,
|
||||||
'sams.nikonimaging.com' => true,
|
'sams.nikonimaging.com' => 0,
|
||||||
'license.piriform.com' => true,
|
'license.piriform.com' => 0,
|
||||||
'www.bitsumactivationserver.com' => true,
|
'www.bitsumactivationserver.com' => 0,
|
||||||
'licensing.tableausoftware.com' => true,
|
'licensing.tableausoftware.com' => 0,
|
||||||
'activation.cloud.techsmith.com' => true,
|
'activation.cloud.techsmith.com' => 0,
|
||||||
'updates-s3.binaryage.com' => true,
|
'updates-s3.binaryage.com' => 0,
|
||||||
'reg.wisecleaner.com' => true,
|
'reg.wisecleaner.com' => 0,
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user