mirror of https://github.com/koreader/koreader
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
4fa6783dbb
Device:getDefaultRoute parses /proc/net/route and converts the hex addresses to textual IP addresses, but in `isOnline` we don't care what address the gateway actually has, we only care about whether we have a default route into the Internet. This provides a simpler alternative that does the equivalent of "ip route get 203.0.113.1 || ip route get 2001:db8::1" (note that it does support IPv6-only connectivity as opposed to Device:getDefaultRoute) and returns true if we have a route. Inspired by https://github.com/pavel-odintsov/get_default_outgoing_ip_linux |
2 months ago | |
---|---|---|
.. | ||
apps | 2 months ago | |
device | 2 months ago | |
document | 3 months ago | |
ui | 2 months ago | |
cache.lua | 2 years ago | |
cacheitem.lua | 2 years ago | |
configurable.lua | 9 months ago | |
datetime.lua | 8 months ago | |
dbg.lua | 5 months ago | |
depgraph.lua | 4 years ago | |
device.lua | 3 years ago | |
dispatcher.lua | 3 months ago | |
docsettings.lua | 4 months ago | |
dump.lua | 2 years ago | |
fontlist.lua | 11 months ago | |
gettext.lua | 2 years ago | |
httpclient.lua | 8 years ago | |
languagesupport.lua | 9 months ago | |
logger.lua | 2 years ago | |
luadata.lua | 2 years ago | |
luadefaults.lua | 8 months ago | |
luasettings.lua | 8 months ago | |
luxl.lua | 4 years ago | |
optmath.lua | 3 years ago | |
persist.lua | 12 months ago | |
pluginloader.lua | 2 years ago | |
pluginshare.lua | 2 years ago | |
random.lua | 5 years ago | |
readcollection.lua | 6 months ago | |
readhistory.lua | 4 months ago | |
socketutil.lua | 10 months ago | |
sort.lua | 1 year ago | |
userpatch.lua | 1 year ago | |
util.lua | 2 months ago | |
version.lua | 1 year ago |