mrrfv / cloudflare-gateway-pihole-scripts

Use Cloudflare Gateway DNS/VPN to block ads, malware and tracking domains - free alternative to NextDNS, Pi-hole and Adguard
MIT License
293 stars 855 forks source link

whitelist #8

Open ShailendraMadarie opened 1 year ago

ShailendraMadarie commented 1 year ago

Hi,

the whitelist you added,is it automatically added when updating workflow? and can we select which whitelist we want to be used? I would prefer the hagezi's whitelist.

mrrfv commented 1 year ago

the whitelist you added,is it automatically added when updating workflow?

If you update the GitHub Actions workflow in your own repository to use the same auto_update_github_action.yml file as found in this repository, then yes, the whitelists will be automatically added because it runs get_recomended_whitelist.sh.

and can we select which whitelist we want to be used?

Yes.

If you're running this on a PC, just create a file whitelist.csv and put the domains you want to be whitelisted in it. If you are using GitHub Actions, remove the "Download recommended whitelists" step from the workflow yaml file and replace it with the command that downloads your custom filterlists, for example (untested):

curl https://raw.githubusercontent.com/hagezi/dns-blocklists/main/whitelist.txt -o whitelist.csv

ShailendraMadarie commented 1 year ago

Ok great, i am using github.For now i will leave it as default.

One more thing ,maybe you can change time that cgps updates the dns block list. I observed that mullvad pushes their update some hours later then the scheduled cgps update time.So i have to run manually to get the latest update for the week.

suricloud commented 1 year ago

It seems the whitelist are not working, i see some domains are blocked by some blocklist and the whitelist should work that these domain gets unblocked? Can you please check the issue, These domains are blocked by some block list, but are in the whitelists and should not be blocked; www.googletagmanager.com ichnaea.netflix.com tv.jsrdn.com adservice.google.com

norbertjoni commented 1 year ago

It seems the whitelist are not working, i see some domains are blocked by some blocklist and the whitelist should work that these domain gets unblocked? Can you please check the issue, These domains are blocked by some block list, but are in the whitelists and should not be blocked; www.googletagmanager.com ichnaea.netflix.com tv.jsrdn.com adservice.google.com

it's not blocked here. But I receive 400. That’s an error.

Try this : https://tagmanager.google.com and this : https://ads.google.com

suricloud commented 1 year ago

The blocked domains i mentioned earlier, are blocked by adguad dns list i found, which is also pulled from the mullvad list. So what i mean the whitelist you have added like from hagezi should resolve this false block, but is not happening.

duc2ht commented 11 months ago

new gateway update seems to have caused problems with whitelist, the domains in the whitelist still seem to be blocked

FiorenMas commented 11 months ago

The latest commit has the same problem, it have many false positives with subdomain blocking

mrrfv commented 11 months ago

@FiorenMas @duc2ht Could you please provide the following info:

Along with a complete log, if possible (you can email it if you are uncomfortable with sharing it publicly). It'll greatly help with debugging the issue. As a temporary workaround, you can revert back to the previous commit.

duc2ht commented 11 months ago

@mrrfv whitelist: raw.githubusercontent.com/notracking/hosts-blocklists-scripts/master/hostnames.whitelist.txt Domain are falsely blocked: www.googleadservices.com

Edit: Found the cause of the error, the problem has been solved. Because in blocklist, googleadservices.com includes 3 different formats: ||googleadservices.com^ googleadservices.com @@||www.googleadservices.com^| but in whitelist only had 1 format : googleadservices.com . After creating another whitelist with 3 formats like blocklist, the problem was solved.

lamminh2012 commented 11 months ago

Hi @mrrfv I have a question. I use just one block list in get_recommended_filters.sh (that is https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/domain.txt with less than 20,000 domains). Still, Lists in Cloudflare shows that I have 268,000 domains to block. I don't know where the mysterious lists come from. Also, with your update codes, videos on CBS News won't load any more. Could you please tell me how to fix this issue? Thank you.

mrrfv commented 11 months ago

@lamminh2012 Both issues might be because of leftover data from previous runs. Try running these scripts in order:

1) cf_gateway_rule_delete.js 2) cf_list_delete.js 3) cf_list_create.js 4) cf_gateway_rule_create.js

The first two remove all data ever created by CGPS from your Cloudflare account, the last two add everything back based on your current CGPS settings and lists.