mrrfv / cloudflare-gateway-pihole-scripts Goto Github PK
View Code? Open in Web Editor NEWUse Cloudflare Gateway DNS/VPN to block ads, malware and tracking domains - free alternative to NextDNS, Pi-hole and Adguard
License: MIT License
Use Cloudflare Gateway DNS/VPN to block ads, malware and tracking domains - free alternative to NextDNS, Pi-hole and Adguard
License: MIT License
> cloudflare-delete:list
> node cf_list_delete.js
file:///home/runner/work/cloudflare-gateway-adblock/cloudflare-gateway-adblock/lib/helpers.js:40
throw new Error(`HTTP error! Status: ${response.status}`);
^
Error: HTTP error! Status: 504
at request (file:///home/runner/work/cloudflare-gateway-adblock/cloudflare-gateway-adblock/lib/helpers.js:40:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///home/runner/work/cloudflare-gateway-adblock/cloudflare-gateway-adblock/cf_list_delete.js:9:29
Hi, my github action run failed and show up this HTTP error message, it works great before.
Is there any fixable problem? What info should I provide for maintainers?
Hi,
Can you please add hagezi Pro blocklist to the cgps script.
It is very well maintained block list.
@hlqviet Tagging you because this might be related to #25 (though I'll try to fix this on my own in my free time).
This is most likely caused by the old Node.js version, that we have to support because that's what the original GitHub Actions workflow uses.
Environment
node: v16.20.2
npm: 8.19.4
yarn: 1.22.19
Error
> Run bash ./get_recommended_whitelist.sh
file:///home/runner/work/***/***/cloudflare-gateway-pihole-scripts/lib/utils.js:69
await response.body?.pipeTo(writableStream, { preventClose: true });
^
TypeError: response.body?.pipeTo is not a function
at downloadFiles (file:///home/runner/work/***/***/cloudflare-gateway-pihole-scripts/lib/utils.js:69:26)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async downloadLists (file:///home/runner/work/***/***/cloudflare-gateway-pihole-scripts/download_lists.js:18:3)
at async file:///home/runner/work/***/***/cloudflare-gateway-pihole-scripts/download_lists.js:32:5
Error: Process completed with exit code 1.
while joining a server in CS2 everyone doesnt move, can only hear weapon sounds, disabling zero trust fixes the problem
Hi,
These days i see there are some great new updates, however with forked version we cant sync to the latest automatically anymore.
Please solve this issue,so when can sync the the latest version with no problem.
Hi,
I see mullavad already added adguard dns list.
Also cgps script adds adguard dns, so its double now.
I hope you can add some of hagezi's list.
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.
Error: HTTP error! Status: 400
at request (file:///home/runner/work/cloudflare-gateway-pihole-scripts/cloudflare-gateway-pihole-scripts/lib/helpers.js:106:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///home/runner/work/cloudflare-gateway-pihole-scripts/cloudflare-gateway-pihole-scripts/cf_gateway_rule_delete.js:4:27
Node.js v20.11.0
Error: Process completed with exit code 1.
Hi,
I just synced with the latest,and now getting these errors.
Could not create "CGPS List - Chunk 140" - Error: HTTP error! Status: 502
file:///home/runner/work/cloudflare-gateway-pihole-scripts/cloudflare-gateway-pihole-scripts/lib/helpers.js:106
throw new Error(HTTP error! Status: ${response.status}
);
^
Error: HTTP error! Status: 502
at request (file:///home/runner/work/cloudflare-gateway-pihole-scripts/cloudflare-gateway-pihole-scripts/lib/helpers.js:106:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async createZeroTrustListsOneByOne (file:///home/runner/work/cloudflare-gateway-pihole-scripts/cloudflare-gateway-pihole-scripts/lib/api.js:48:7)
at async file:///home/runner/work/cloudflare-gateway-pihole-scripts/cloudflare-gateway-pihole-scripts/cf_list_create.js:140:5
Node.js v20.9.0
Error: Process completed with exit code 1.
Hello,
Thank you for your work. I am trying to use your scripts with oisd list.
Is there a good way to clean up the oisd big list? https://big.oisd.nl/
It should be done in cf_list_create.js but not sure how.
An optional feature that creates a network firewall policy that denies access to blocked domains based on their SNI, making it near impossible to bypass the filter by apps using hardcoded DNS settings.
Hello, a youtube video with every step would be a godsend with this - as ive never used node.js and have no idea wth im doing.
Would grately appreciate it.
I am using Xiaomi Router 3c & Router 4c, both of which only support IPv4 DNS. Cause when I entered the IPv6 one, it gave an error saying the DNS needs to of a value 255.255.255.255 max. The script is working perfectly fine. This is first time I used node.js, npm, etc. but surprisingly managed to do it in one go. Tried the output in two of my android devices and chrome browser using the dns over tls / https DNS and all are working fine.
I just couldn't manage to make it work in my router and windows 10 PC.
My ISP is using PPPoE connection type, which assigns random IP address to my network.
If someone can guide me how can I use this DNS with my router I'll be very grateful ๐
Hope you can help me find what I'm doing wrong.
I forked the repo, setup my secrets and variables. I'm getting a 404 error. This looks like a CF/Credential error, but I cannot figure it out :( I run a curl test to verify the token is valid. "This API Token is valid and active"
Pics of my repo action secrets:
Log at Delete old rule and list (If I comment this step out, fails at Create).
Run npm run cloudflare-delete
cloudflare-delete
npm run cloudflare-delete:rule && npm run cloudflare-delete:list
cloudflare-delete:rule
node cf_gateway_rule_delete.js
file:///home/runner/work/cloudflare-gateway-pihole-scripts/cloudflare-gateway-pihole-scripts/lib/helpers.js:106
throw new Error(HTTP error! Status: ${response.status}
);
^
Error: HTTP error! Status: 404
at request (file:///home/runner/work/cloudflare-gateway-pihole-scripts/cloudflare-gateway-pihole-scripts/lib/helpers.js:106:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///home/runner/work/cloudflare-gateway-pihole-scripts/cloudflare-gateway-pihole-scripts/cf_gateway_rule_delete.js:4:27
Node.js v20.9.0
Error: Process completed with exit code 1.
Hi,
I need advice how to connect my mobile devices to cf gateway.
Should we create new dns location for evry device to get the unique dot/doh adress ?
Are there resctrictions on the zero trust free how many device/location we can have?
Hello,
I I run create lists script (and also delete lists script) I run into this error:
Creating 169 lists for 168793 domains...
Could not create "CGPS List - Chunk 1" - Error: HTTP error! Status: 400
file:///srv/cloudflare-gateway-pihole-scripts/lib/helpers.js:106
throw new Error(`HTTP error! Status: ${response.status}`);
^
Error: HTTP error! Status: 400
at request (file:///srv/cloudflare-gateway-pihole-scripts/lib/helpers.js:106:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async createZeroTrustListsOneByOne (file:///srv/cloudflare-gateway-pihole-scripts/lib/api.js:48:7)
at async file:///srv/cloudflare-gateway-pihole-scripts/cf_list_create.js:140:5
The error is the same as above for the delete lists script.
CGPS is more of a "set-and-forget" script, meaning that if something happens to go wrong, it usually isn't noticed until it's too late and ads start showing up. It'd be nice to have a feature allowing the use of Discord (as well as Matrix, maybe with the use of Matrix-Webhooks) for error notifications and such.
Hi,
If i understand good,this script can be installed on github?
If yes, can you please share the step by step procedure to install your script on my github account?
And also how to link cloudlfare gateway with github for the blocklist.
I see that google.com is blocked now, but we cant see which blocklist is doing this.
Can you check please and fix it.
A Docker image with cron built-in that works in a similar fashion as the GitHub Action, with the security benefit of being able to run it on your own hardware.
It doesnt block twitch ads, can you add ads from twitch to this script?
Hi,
I have the latest version forked, and synced yesterday the new update.
Now when i want to update my filter list, i get this error.
at new URL (node:internal/url:637:13)
at new Request (node:internal/deps/undici/undici:7132:25)
at fetch2 (node:internal/deps/undici/undici:10715:25)
at Object.fetch (node:internal/deps/undici/undici:11574:18)
at fetch (node:internal/process/pre_execution:242:25)
at file:///home/runner/work/cloudflare-gateway-pihole-scripts/cloudflare-gateway-pihole-scripts/lib/utils.js:60:57
at Array.map ()
at downloadFiles (file:///home/runner/work/cloudflare-gateway-pihole-scripts/cloudflare-gateway-pihole-scripts/lib/utils.js:60:44)
at downloadLists (file:///home/runner/work/cloudflare-gateway-pihole-scripts/cloudflare-gateway-pihole-scripts/download_lists.js:18:9) {
input: '',
code: 'ERR_INVALID_URL'
}
}
Node.js v18.18.0
Error: Process completed with exit code 1.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
This repository currently has no open or pending branches.
.github/workflows/dry-run.yml
actions/checkout v4
actions/setup-node v4
.github/workflows/sync-branch.yml
actions/checkout v4
connor-baer/action-sync-branch v1.1.0
auto_update_github_action.yml
actions/checkout v4
actions/setup-node v4
actions/checkout v4
gautamkrishnar/keepalive-workflow v2
.node-version
node 20.12.2
package.json
dotenv 16.4.5
node-fetch 3.3.2
node 20.12.2
I see that you wrote that there's a limit of 300000 blocked domains on the free account. I can't any info regarding this on cloudflare.
Also, according to this documentation https://developers.cloudflare.com/cloudflare-one/account-limits/#gateway there's a limit of 100 on Lists. And each list can only contain 1000 items. So shouldn't there be a limit of 100000 on free accounts?
Although, i tried your script via github on my cloudflare account with OISD list. It created around 187 lists without any error. I am worried if my cloudflare account will get banned for bypassing 100 limit on Lists. Is this correct?
Hi @mrrfv, I just noticed that the recent changes haven't merged into v1
๐
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.