Added country detection to check-vpn

This commit is contained in:
Roger Gonzalez 2023-01-16 11:41:35 -03:00
parent 64564f5889
commit 49f0ab5b46
Signed by: rogs
GPG Key ID: C7ECE9C6C36EC2E6

2
yams
View File

@ -53,10 +53,12 @@ if [ $option == "check-vpn" ]; then
echo "Getting your qBittorrent IP..."
qbittorrent_ip=$($dc exec -it qbittorrent sh -c "curl -s ifconfig.me");
echo "$qbittorrent_ip"
echo "Your country in qBittorrent is $($dc exec -it qbittorrent sh -c 'curl -s https://am.i.mullvad.net/country')"
echo
echo "Getting your IP..."
your_ip=$(curl -s ifconfig.me)
echo "$your_ip"
echo "Your local IP country is $(curl -s https://am.i.mullvad.net/country)"
echo
if [ $qbittorrent_ip == $your_ip ]; then
send_error_message "Your IPs are the same! qBittorrent is NOT working! ⚠️"