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 | |
---|---|---|
.. | ||
data | 2 months ago | |
elements | 2 months ago | |
message | 4 months ago | |
network | 2 months ago | |
plugin | 2 years ago | |
widget | 2 months ago | |
bidi.lua | 10 months ago | |
downloadmgr.lua | 2 years ago | |
event.lua | 2 years ago | |
font.lua | 11 months ago | |
geometry.lua | 5 months ago | |
gesturerange.lua | 2 years ago | |
hook_container.lua | 2 years ago | |
language.lua | 2 months ago | |
menusorter.lua | 4 years ago | |
otamanager.lua | 5 months ago | |
quickstart.lua | 3 years ago | |
renderimage.lua | 2 years ago | |
rendertext.lua | 5 months ago | |
screensaver.lua | 3 months ago | |
size.lua | 3 years ago | |
time.lua | 2 years ago | |
translator.lua | 6 months ago | |
trapper.lua | 6 months ago | |
uimanager.lua | 4 months ago | |
viewhtml.lua | 6 months ago | |
wikipedia.lua | 3 months ago |