Comment 12 for bug 1258361

Revision history for this message
Stephen Brandt (ztefn) wrote :

I haven't found any other methods than ping to check the internet connection (by command line). Within Haguichi itself I've used some different .NET methods over the years. Started out with TcpClient then replaced it by Dns.GetHostAddresses [1] to gain some speed, but later it turned out to be even slower in some situation so eventually replaced it by a Ping method [2] to 8.8.8.8 which is as fast as Google DNS can be.

Maybe I could let Haguichi ping the default gateway instead of 8.8.8.8, like suggested here:
http://stackoverflow.com/questions/929368/how-to-test-a-internet-connection-in-bash#answer-932187

I'm not sure if it's reliable, I'd think it might only check the connection to the gateway itself.

[1] http://bazaar.launchpad.net/~ztefn/haguichi/1.0/revision/293
[2] http://bazaar.launchpad.net/~ztefn/haguichi/1.0/revision/358