From 41fe3a94b180a4b6d9ba00aaf863fa0258a49321 Mon Sep 17 00:00:00 2001 From: Munif Tanjim Date: Fri, 11 Jun 2021 18:11:56 +0600 Subject: [PATCH] add whats-my-ip --- whats-my-ip | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 whats-my-ip diff --git a/whats-my-ip b/whats-my-ip new file mode 100755 index 0000000..e080141 --- /dev/null +++ b/whats-my-ip @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -euo pipefail + +declare -r my_ip="$(dig +short myip.opendns.com @resolver1.opendns.com)" +# declare -r my_ip="$(dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | tr -d '"')" +# declare -r my_ip="$(curl checkip.amazonaws.com)" +# declare -r my_ip="$(curl icanhazip.com)" +# declare -r my_ip="$(curl ifconfig.co)" +# declare -r my_ip="$(curl ifconfig.me)" +# declare -r my_ip="$(curl ipecho.net/plain)" + +echo "${my_ip}" -- knotmirror 0.0.1