Changed the IP checking service for "check-vpn"

The original "check-vpn" used an endpoint that is no longer online.
FIX: Replace the endpoint with ipinfo.io, a currently active service
This commit is contained in:
gloof11 2024-06-20 21:54:50 +09:00
parent e2c83c9400
commit 3a7dbab35c

5
yams
View File

@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
set -euo pipefail set -euo pipefail
dc="docker compose -f <filename> -f <custom_file_filename>" dc="docker compose -f <filename> -f <custom_file_filename>"
install_directory="<install_directory>" install_directory="<install_directory>"
@ -54,14 +53,14 @@ fi
if [ "$option" == "check-vpn" ]; then if [ "$option" == "check-vpn" ]; then
echo "Getting your IP..." echo "Getting your IP..."
your_ip=$(curl -s api.ipify.org) your_ip=$(curl -s https://ipinfo.io/ip)
echo "$your_ip" echo "$your_ip"
echo "Your local IP country is $(curl -s https://am.i.mullvad.net/country)" echo "Your local IP country is $(curl -s https://am.i.mullvad.net/country)"
echo echo
echo echo
echo "Getting your qBittorrent IP..." echo "Getting your qBittorrent IP..."
qbittorrent_ip=$(docker exec qbittorrent sh -c "curl -s api.ipify.org"); qbittorrent_ip=$(docker exec qbittorrent sh -c 'curl -s https://ipinfo.io/ip');
if [ -n "$qbittorrent_ip" ]; then if [ -n "$qbittorrent_ip" ]; then
echo "$qbittorrent_ip" echo "$qbittorrent_ip"
echo "Your country in qBittorrent is $(docker exec -it qbittorrent sh -c 'curl -s https://am.i.mullvad.net/country')" echo "Your country in qBittorrent is $(docker exec -it qbittorrent sh -c 'curl -s https://am.i.mullvad.net/country')"