This bash script checks the status of Cloudflare Warp for a given endpoint (https://cloudflare.com/cdn-cgi/trace). It uses curl
to make a HTTP request to the specified URL, checks if the response contains "warp=on" or "warp=plus", and acts accordingly.
Before running the script, make sure you have the following tools installed on your system:
curl
: A command-line tool for making HTTP requests. You can install it with a package manager likeapt
,brew
, oryum
.warp-cli
: A command-line interface for managing Cloudflare Warp. Follow Cloudflare's instructions to install it.
-
Download or clone this repository.
-
Navigate to the directory containing the script.
-
Make the script executable with the following command:
chmod +x warp_status_check.sh
-
Run the script:
./warp_status_check.sh
-
The script will make a request to the Cloudflare endpoint, check the response, and output one of the following messages:
Status: warp=on
Status: warp=plus
Not using Cloudflare Warp
If the last message is output, the script will also execute
warp-cli connect
to try to connect to Cloudflare Warp.
This project is licensed under the MIT License - see the LICENSE file for details.