mirror of
https://github.com/Nezumi-2711/cloudflare-gateway-pihole-scripts.git
synced 2026-09-22 13:38:37 +00:00
updated remaining list terms
This commit is contained in:
@@ -7,7 +7,7 @@ Cloudflare Gateway allows you to create custom rules to filter HTTP, DNS, and ne
|
|||||||
## About the individual scripts
|
## About the individual scripts
|
||||||
|
|
||||||
- `cf_list_delete.js` - Deletes all lists created by CGPS from Cloudflare Gateway. This is useful for subsequent runs.
|
- `cf_list_delete.js` - Deletes all lists created by CGPS from Cloudflare Gateway. This is useful for subsequent runs.
|
||||||
- `cf_list_create.js` - Takes an input.csv file containing domains and creates lists in Cloudflare Gateway
|
- `cf_list_create.js` - Takes an blocklist.txt file containing domains and creates lists in Cloudflare Gateway
|
||||||
- `cf_gateway_rule_create.js` - Creates a Cloudflare Gateway rule to block all traffic if it matches the lists created by CGPS.
|
- `cf_gateway_rule_create.js` - Creates a Cloudflare Gateway rule to block all traffic if it matches the lists created by CGPS.
|
||||||
- `cf_gateway_rule_delete.js` - Deletes the Cloudflare Gateway rule created by CGPS. Useful for subsequent runs.
|
- `cf_gateway_rule_delete.js` - Deletes the Cloudflare Gateway rule created by CGPS. Useful for subsequent runs.
|
||||||
|
|
||||||
@@ -27,8 +27,8 @@ Cloudflare Gateway allows you to create custom rules to filter HTTP, DNS, and ne
|
|||||||
1. Node.js installed on your machine
|
1. Node.js installed on your machine
|
||||||
2. Cloudflare [Zero Trust](https://one.dash.cloudflare.com/) account - the Free plan is enough. Use the Cloudflare [documentation](https://developers.cloudflare.com/cloudflare-one/) for details.
|
2. Cloudflare [Zero Trust](https://one.dash.cloudflare.com/) account - the Free plan is enough. Use the Cloudflare [documentation](https://developers.cloudflare.com/cloudflare-one/) for details.
|
||||||
3. Cloudflare email, API key (NOT the API token), and account ID
|
3. Cloudflare email, API key (NOT the API token), and account ID
|
||||||
4. A file containing the domains you want to block - **max 300,000 domains for the free plan** - in the working directory named `input.csv`. Mullvad provides awesome [DNS blocklists](https://github.com/mullvad/dns-blocklists) that work well with this project. A bash script that downloads recommended blocklists, `get_recommended_filters.sh`, is included.
|
4. A file containing the domains you want to block - **max 300,000 domains for the free plan** - in the working directory named `blocklist.txt`. Mullvad provides awesome [DNS blocklists](https://github.com/mullvad/dns-blocklists) that work well with this project. A bash script that downloads recommended blocklists, `get_recommended_filters.sh`, is included.
|
||||||
5. Optional: You can whitelist domains by putting them in a file `whitelist.csv`. You can also use the `get_recomended_whitelist.sh` Bash script to get the recommended whitelists.
|
5. Optional: You can whitelist domains by putting them in a file `allowlist.txt`. You can also use the `get_recomended_whitelist.sh` Bash script to get the recommended whitelists.
|
||||||
|
|
||||||
### Running locally
|
### Running locally
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ urls=(
|
|||||||
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
|
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
|
||||||
)
|
)
|
||||||
|
|
||||||
# download all files in parallel and append them to input.csv
|
# download all files in parallel and append them to blocklist.txt
|
||||||
node download_files.js blocklist.txt ${urls[@]}
|
node download_lists.js blocklist.txt ${urls[@]}
|
||||||
|
|
||||||
# print a message when done
|
# print a message when done
|
||||||
echo "Done. The blocklist.txt file contains merged data from recommended filter lists."
|
echo "Done. The blocklist.txt file contains merged data from recommended filter lists."
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ urls=(
|
|||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# download all files in parallel and append them to whitelist.csv
|
# download all files in parallel and append them to allowlist.txt
|
||||||
node download_files.js allowlist.txt ${urls[@]}
|
node download_lists.js allowlist.txt ${urls[@]}
|
||||||
|
|
||||||
# print a message when done
|
# print a message when done
|
||||||
echo "Done. The allowlist.txt file contains merged data from recommended whitelists."
|
echo "Done. The allowlist.txt file contains merged data from recommended whitelists."
|
||||||
|
|||||||
Reference in New Issue
Block a user