Update cloudflare-template.sh

pull/54/head
MohairVomNipa 3 years ago committed by GitHub
parent 7fb8a4607a
commit 2338306c7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      cloudflare-template.sh

@ -17,6 +17,11 @@ discorduri="" # URI for Discord WebHook "h
########################################### ###########################################
## Check if we have a public IP ## Check if we have a public IP
########################################### ###########################################
exit 0
ipv4_regex='([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])' ipv4_regex='([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])'
ip=$(curl -s -4 https://cloudflare.com/cdn-cgi/trace | grep -E '^ip'); ret=$? ip=$(curl -s -4 https://cloudflare.com/cdn-cgi/trace | grep -E '^ip'); ret=$?
if [[ ! $ret == 0 ]]; then # In the case that cloudflare failed to return an ip. if [[ ! $ret == 0 ]]; then # In the case that cloudflare failed to return an ip.

Loading…
Cancel
Save