[tor-bugs] #16120 [Core Tor/Tor]: Detect if the network goes down

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Jun 26 10:45:01 UTC 2016


#16120: Detect if the network goes down
---------------------------------------+------------------------------
 Reporter:  dgoulet                    |          Owner:
     Type:  enhancement                |         Status:  new
 Priority:  Medium                     |      Milestone:  Tor: 0.2.???
Component:  Core Tor/Tor               |        Version:
 Severity:  Normal                     |     Resolution:
 Keywords:  network tor-guards-revamp  |  Actual Points:
Parent ID:                             |         Points:  6
 Reviewer:                             |        Sponsor:  SponsorU-can
---------------------------------------+------------------------------

Comment (by asn):

 Replying to [comment:15 timonh]:
 > I understand that it's hard to do this in a cross-platform manner but I
 think it would be good if an application running on a specific platform
 could inform Tor about network events.
 > For example I had the idea to monitor
 android.net.conn.CONNECTIVITY_CHANGE on Android and set DisableNetwork if
 the network is down.
 > But I'm not sure if DisableNetwork is suitable here. Maybe a new control
 command would be more appropriate?

 Hello,

 as we discussed on IRC the other day, I find this approach (of the
 application notifying Tor of network down events) plausible for now. In
 the future, if we find techniques to discover network down events in a
 clean manner in various OSes, we could potentially bake these into Tor (as
 suggested by this thread), but until then I think experimenting on the
 application-layer will be cleaner and faster.

 FWIW, I have the impression that Orbot is also doing tricks with
 `DisableNetwork` to stop Tor from going mental when the network is down.
 [https://github.com/amoghbl1/orbot/blob/master/src/org/torproject/android/service/TorService.java#L1636
 Check this function for example].

 Maybe you can try doing the same thing in your application, and then let
 us know how it works for you? It might be the case that toggling
 `DisableNetwork` does not do ''exactly'' what a hidden service should be
 doing when the network goes up and down. We should understand what
 `DisableNetwork` does, and what we would ideally like it to do in this
 case, and if we figure this out we potentially make a control port command
 or something that implements the precise functionalitity we are looking
 for (if `DisableNetwork` is inadequate).

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/16120#comment:16>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list