Commit Graph

45 Commits

Author SHA1 Message Date
akwizgran
7b8181e309 Massive refactoring to merge handling of simplex and duplex connections. 2014-11-04 16:51:25 +00:00
akwizgran
9e5e2e2df2 Patched tor and jtorctl for improved hidden service performance.
Two changes have been made to Tor:

1. Set can_complete_circuit to false when the network is disabled, and
don't try to build introduction circuits while can_complete_circuit is
false. This avoids a situation where Tor tries to build introduction
circuits as soon as the network is re-enabled, all the circuits fail,
and then Tor waits 5 minutes before trying to build more.

2. Added a FORGETHS command to the control protocol which clears any
cached client state relating to a specified hidden service. This can be
used to flush state that's likely to be stale before trying to connect
to a hidden service with an unstable network connection.

Support for the FORGETHS command was also added to jtorctl.
2014-10-06 18:57:57 +01:00
akwizgran
e5620f8b05 Parts of our jtorctl patch have been merged upstream. 2014-10-03 13:29:12 +01:00
akwizgran
6a4ea49786 Merge branch 'simpler-threading'.
This merge reduces the number of thread pools.
2014-10-02 18:26:26 +01:00
akwizgran
941efb4bbe Merged IncomingConnectionExecutor and PluginExecutor into IoExecutor.
We don't need two separate executors for long-running IO threads.
2014-10-02 18:02:53 +01:00
akwizgran
d406853f68 Shut down the Tor process without hacks.
Tor has a controller command, TAKEOWNERSHIP, and a configuration option,
__OwningControllerProcess, that work together to ensure Tor shuts down
when the controlling process dies and/or disconnects from the control
port. By using them we can avoid creating runaway Tor processes that
have to be killed with hacks.
2014-07-08 22:35:37 +01:00
akwizgran
7d9ce4c973 Don't assume Tor has bootstrapped if it's already running. 2014-07-02 23:01:14 +01:00
akwizgran
294a8853f2 Consider Tor to have started when it's bootstrapped and built a circuit. 2014-06-05 09:29:35 +01:00
akwizgran
586a0c468f Fixed logging of Tor circuit paths, added more Tor logging. 2014-06-05 09:29:35 +01:00
akwizgran
5ea0cce2bf Tell Tor to shut down when control socket is closed; more Tor logging.
Patched jtorctl to pass more information about circuit events to the
controller to help us debug connection problems.
2014-05-14 15:23:36 +01:00
akwizgran
eaff042601 Don't try to close server sockets twice.
This may have been the cause of bug #69. Removed the wait-for-shutdown
code in DroidtoothPlugin that was added to attempt to avoid that bug.
2014-05-09 19:09:13 +01:00
akwizgran
c86525c1d4 Kill zombie Tor processes more reliably. 2014-05-09 19:09:13 +01:00
akwizgran
f489da1a21 Wait for Bluetooth to be disabled before exiting.
This may have been the cause of Bluetooth not always being disabled at
shutdown on the Sony Xperia Tipo.
2014-04-05 21:36:56 +01:00
akwizgran
6745bbf9df Skip a logging method if logging is disabled. 2014-04-05 20:24:58 +01:00
akwizgran
6a0e7f8add Tor config was not being installed for fresh installs. 2014-04-05 20:12:20 +01:00
akwizgran
e3a8db6b7a Minor refactoring of TorPlugin. 2014-04-05 00:00:58 +01:00
akwizgran
08b91d2483 Poll plugins when connectivity changes. Bug #66.
This should enable us to connect to contacts faster at startup and
whenever a new means of connecting becomes available.
2014-04-04 22:06:36 +01:00
akwizgran
9f8d12e6c2 Extract latest Tor binary before starting Tor process. Dev task #81. 2014-04-04 20:04:47 +01:00
akwizgran
a563fcc192 Better connectivity detection for the Tor plugin. 2014-04-04 20:04:47 +01:00
akwizgran
75ce6cf1da LAN plugin should re-bind each time wifi becomes available. Bug #51. 2014-04-04 20:04:47 +01:00
akwizgran
e260aac3d2 All tryToClose() methods should check for null arguments. 2014-04-04 20:04:47 +01:00
akwizgran
a4954408a8 Less verbose Tor logging: don't log when circuits are extended.
We can get all the information we need from the other status messages.
2014-04-02 17:46:06 +01:00
akwizgran
c028728c19 Code cleanup for DroidtoothPlugin. 2014-03-22 16:35:47 +00:00
akwizgran
ab2849e2f3 Bluetooth discovery was running for too long. Bug #64 and possibly #61.
The variable now wasn't being updated when no devices were discovered.
2014-03-22 15:20:56 +00:00
akwizgran
5755aed362 Android Bluetooth plugin binds a socket each time BT is enabled.
Dev task #80.
2014-03-13 18:39:53 +00:00
akwizgran
814167613c Verbose logging of Tor connections, streams and circuits. 2014-03-13 09:37:30 +00:00
akwizgran
b270f0e8b1 Call Thread.currentThread().interrupt() when handling interruption. 2014-03-12 21:11:11 +00:00
akwizgran
b99a503f24 Removed unnecessary conditionals from logging statements.
Very important stuff.
2014-03-12 21:00:14 +00:00
akwizgran
4560cf17ff Notification settings. Dev task #76. 2014-03-10 18:00:36 +00:00
akwizgran
b5429f121a Use application context for all background tasks. 2014-03-06 18:25:37 +00:00
akwizgran
304ba53807 Check whether to enable or disable Tor at each connectivity change. 2014-03-06 15:42:21 +00:00
akwizgran
0198e40719 Made coding style consistent with rest of project. 2014-03-06 13:16:20 +00:00
Ximin Luo
4330f4bee3 don't start tor if it's probably blocked 2014-03-05 22:20:36 +00:00
Ximin Luo
9697b351e9 add the ability for briar-android to get the current country.
- this will be useful later for e.g. auto-disabling Tor
2014-03-05 15:13:50 +00:00
akwizgran
511b470aa4 Less verbose logging for plugins. 2014-03-03 15:31:46 +00:00
akwizgran
56f79755a4 Added a config setting to not enable Bluetooth automatically (bug #28).
There's currently no way to set this setting, so the bug isn't fixed.
2014-03-03 15:31:05 +00:00
akwizgran
a2d099ea17 Added debugging screen to alpha and beta builds. Dev task #73. 2014-02-28 23:44:35 +00:00
akwizgran
044c10e89f Bluetooth-only invitations: simpler and more reliable.
Of course, not all devices support Bluetooth...
2014-02-10 14:00:34 +00:00
akwizgran
3842a5c70d Code cleanup. 2014-02-04 19:05:48 +00:00
akwizgran
aee695b913 Don't enable the WAN TCP plugin on Android.
Direct P2P connections between mobile devices are unlikely to work, and
they'd expose the social graph to surveillance.
2014-01-24 21:13:31 +00:00
akwizgran
822392f9e7 Use strings rather than hashes to identify transports. Dev task #64. 2014-01-24 10:39:34 +00:00
akwizgran
6af3c54c28 Removed shouldFlush() from plugins, added missing PacketWriter method. 2014-01-15 17:10:25 +00:00
akwizgran
8886d954d7 Reorganised Guice modules. Contribute entropy to pool on Linux/Android. 2014-01-14 19:33:17 +00:00
akwizgran
c779d7b95a Inform Tor about network connectivity. Dev task #53.
Note that some devices (I'm looking at you, Huawei U8110) misreport
connectivity by failing to set EXTRA_NO_CONNECTIVITY and returning true
from ConnectivityManager.getActiveNetworkInfo().isConnected() when
there's no connectivity.
2014-01-09 14:45:41 +00:00
akwizgran
832476412c Changed the root package from net.sf.briar to org.briarproject. 2014-01-08 16:18:30 +00:00