@winni
The way i do it is inside Thread.Execute i check internet in two phases:
Ping timeout := 2000ms
1. Ping 8.8.8.8. / if no response in 2000ms then ----Google DNS
Ping 8.8.4.4. / if no response -||- ----Google DNS
Ping 1.1.1.1. ---Cloudfare
Only if phase 1 was unsuccesfull do phase 2
ConnectionTimeout := 2000
IOTimeout := 3000
2. Send HTTP header request and check responsecode and headers
https://google.com. / If not statuscode 200 OK then
https://bing.com / -||-
https://yahoo.com / -||-
.....
If those 2 phases all return false then Internet connection state is offline
I do the second phase because:
"Some software firewalls, as well as NAT routers may block ping requests in an effort to "hide" your external IP address and prevent any response to potential intruders and prevent possible denial-of-service attacks in the form of a ping flood, in which an attacker overwhelms the victim with ICMP echo request packets." - source
https://www.speedguide.net/faq/how-to-become-pingable-behind-a-routerfirewall-376