Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add Utils::Internet.connected? to determine whether host machine has internet connection. #5870
This PR adds a POC for a common API for checking whether the user has an
Many plugins make calls out into the Internet for data. In order to facilitate a pattern
A lot of the work we're doing with GitHub Pages (jekyll/github-metadata,
This is good.
I wonder if, in the future, we should add an option to never connect to the internet. Maybe set an environment variable to always return false.
One limitation of this approach is that it will appear there is an internet connection if the user is connected but not authenticated to a hotspot that has a gateway where every request returns a webpage asking the user to agree to terms of service. I think, for our purposes, that is probably not a very big deal.
That's a good idea. This check doesn't mean we can actually make a TCP connection anywhere useful, but at least we can get situations where a user's wifi is turned off, etc.
@jekyllbot: merge +minor