This script uses Puppeteer to launch a headless Chromium browser and navigate to the Cloudflare 1.1.1.1 help page. It fetches and logs various connection details such as DNS settings, Cloudflare Data Center, and resolver IPs.
Ensure you have Node.js and npm installed on your system. You will also need to have Chromium installed along with Puppeteer Extra and its plugins.
sudo apt-get update
sudo apt-get install chromium-browser
npm install puppeteer-extra
npm install puppeteer-extra-plugin-stealth
-
Clone the repository
git clone https://github.com/o-Oby/cloudflare-dns-checker.git cd cloudflare-dns-checker
-
Create the script file
Create a JavaScript file (e.g.,
cloudfare_dns_checker.js
) and copy the provided script into the file. -
Run the script
node cloudflare-dns-checker.js
This script does the following:
- Launches a headless Chromium browser with specific arguments for performance.
- Navigates to the Cloudflare 1.1.1.1 help page and waits until the network is idle.
- Fetches connection details:
- Whether connected to 1.1.1.1
- Whether using DNS over HTTPS (DoH)
- Whether using DNS over TLS (DoT)
- Whether using DNS over WARP
- AS Name
- AS Number
- Cloudflare Data Center
- Fetches resolver IPs and their statuses.
- Logs all the fetched information.
Fetching connection information...
Connected to 1.1.1.1: Yes
Using DNS over HTTPS (DoH): Yes
Using DNS over TLS (DoT): No
Using DNS over WARP: No
AS Name: AS12345
AS Number: 12345
Cloudflare Data Center: ABC
Resolver IP Addresses:
- 1.1.1.1: OK
- 1.0.0.1: OK
This project is licensed under the MIT License - see the LICENSE file for details.