Opened 4 years ago

Closed 4 years ago

#1956 closed defect (fixed)

add sensors for Internet availability to i2p router

Reported by: anonymous maybe Owned by: zzz
Priority: minor Milestone: undecided
Component: router/transport Version: 0.9.29
Keywords: Cc:
Parent Tickets: Sensitive: no


if i2p is running and u just un-plug the internet cable or shutdowned ur internet router i2p will not recognize this at all. the green light will keep up running inside the i2p console.


Change History (4)

comment:1 Changed 4 years ago by zzz

Component: unspecifiedrouter/transport
Owner: set to zzz

We have a checker for network status that runs every 3 minutes. This only checks for a local network, so it works if you disconnect the cable from the computer, but not if you disconnect your internet router from the phone line / cable. Once this fires, you will get a 'network disconnected' message in the console.

Also, if you run out of connected peers, which takes a few minutes to time out after your network goes down, the console will also assume you are disconnected. This does take too long.

One alternative is to ping or connect to some well-known host like google and get a valid reply. I think it uses a special HTTP response code. This is what the Android OS does to detect captive portals. This has privacy implications, as that site would know everybody running I2P.

Another alternative, on linux only, is connecting to dbus and its network manager. We would get immediate notifications of network connectivity changes. This would require bundling a third-party library including JNI libs. This has always seemed to be more trouble than it's worth.

You have other ideas?

comment:2 Changed 4 years ago by zzz

Status: newinfoneeded_new

I asserted above that we do recognize when the network is disconnected. Please explain your setup or test in which this doesn't work for you.

comment:3 Changed 4 years ago by slumlord

Status: infoneeded_newnew

I would be against pinging a clearnet page to detect network connectivity, for the reason mentioned by zzz.

I also assume zzz meant "This does not take too long" instead of "This does take too long"

comment:4 Changed 4 years ago by anonymous maybe

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.