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