functions: add region block

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium
2024-08-17 00:17:42 +02:00
parent 8e0eebf817
commit 6640aa1f52

View File

@@ -608,6 +608,14 @@ function offlineCheck() {
fi
writeConfigKey "arc.nic" "${ARCNIC}" "${USER_CONFIG_FILE}"
writeConfigKey "arc.offline" "${OFFLINE}" "${USER_CONFIG_FILE}"
local BLOCK="$(curl -m 10 -v "http://ip-api.com/line?fields=countryCode" 2>/dev/null | tr '[:upper:]' '[:lower:]')"
if [ "${BLOCK}" == "ua" ]; then
dialog --backtitle "$(backtitle)" --title "Blocked Country" \
--infobox "You are in Ukraine and not authorized to use this Loader!\nSay THANKS to sania-owner.space!" 5 80
rm -rf "${CONFIG_PATH}"
sleep 5
exit 1
fi
}
###############################################################################