Changed how to check if Tor is working

This commit is contained in:
kexkey
2021-05-18 14:24:38 -04:00
parent fc5cae6d91
commit f747548e63

View File

@@ -128,9 +128,8 @@ checktor() {
echo -en "\r\n\e[1;36mTesting Tor... " > /dev/console
local rc
# Testing with onion.torproject.org hidden service.
rc=$(curl -s -o /dev/null -w "%{http_code}" --socks5-hostname tor:9050 http://yz7lpwfhhzcdyc5y.onion/)
[ "${rc}" -ne "200" ] && return 250
curl -s --socks5-hostname tor:9050 https://check.torproject.org/ | cat | grep -qm 1 Congratulations
[ "$?" -ne "0" ] && return 250
echo -e "\e[1;36mTor rocks!" > /dev/console