Commit Graph

79 Commits

Author SHA1 Message Date
akwizgran 55b7e95d35 Update Tor assets if they're older than the APK. #582 2016-08-05 15:37:39 +01:00
akwizgran 36d15358a1 Don't connect to Tor if it's already running.
Fixes #572, #578.
2016-08-05 13:59:25 +01:00
akwizgran 86f409d0bf Don't send dev reports until transport is enabled. 2016-05-06 12:14:47 +01:00
akwizgran e36d1c8954 Fixed possible NPE from uninitialised control connection. 2016-05-06 12:14:47 +01:00
akwizgran 2ecccc66d1 Ensure that Plugin instances aren't reused. 2016-05-06 12:14:38 +01:00
akwizgran 1ae98ef2b5 Reduced polling intervals to improve connectivity. 2016-05-06 12:09:30 +01:00
akwizgran e5547a5a12 Removed extra logging for Tor connection failures. 2016-05-06 12:09:30 +01:00
akwizgran fbb3c0f9f2 Use exponential backoff for Tor polling. #314 2016-05-06 12:09:25 +01:00
str4d 84cdbb877d Use control port to create and set up the Tor hidden service 2016-05-06 12:03:39 +01:00
akwizgran 400a11e3b0 Renamed circuit status method. 2016-05-03 15:41:59 +01:00
akwizgran a0f22ec3d1 Refactored connection status variables into inner class. 2016-05-03 11:55:49 +01:00
akwizgran f58ee13244 Reset connection status when enabling network. 2016-05-03 11:53:27 +01:00
akwizgran 63d849b684 Hold partial wake lock to keep Tor connections alive. 2016-05-03 11:53:23 +01:00
akwizgran c35cad9719 Fixed name of Tor mobile data setting. #316 2016-05-03 11:43:25 +01:00
str4d c44b6a4095 Implement encrypted feedback 2016-04-28 16:44:01 +12:00
str4d f73f0aa4ab Migrate crash reports to ACRA 2016-04-27 22:22:16 +12:00
str4d d545aaa892 Encrypt and save crash reports, send them the next time TorPlugin start
Will currently fail at runtime; requires a public key and a server onion.
2016-04-20 23:42:46 +00:00
akwizgran 2b19e4c8db Close transport connection if tag isn't recognised. #281 2016-04-05 11:37:38 +01:00
akwizgran db6c813522 Merge branch '117-qr-contacts' into 'master'
BQP with QR codes

This MR implements BQP for key agreement over short-range transports. It also implements the Android UI for using BQP with QR codes.

Closes #117.

See merge request !84
2016-03-31 11:21:02 +00:00
akwizgran 9714713d73 Add transports to DB during startup. #269 2016-03-28 13:47:23 +01:00
str4d d2d8d9d46e Implement BQP transport descriptors 2016-03-26 15:52:58 +13:00
akwizgran e458853f34 Extra logging to track down Tor connection problems. 2016-03-11 15:21:26 +00:00
akwizgran 0ac67239e3 Fixed race condition when closing redundant sockets.
When more than one invitation socket is opened, Alice should pick which one to use and Bob should use whichever one Alice picks. This fixes a race condition where each party picked a different socket and closed the other.
2016-03-07 11:50:47 +00:00
akwizgran d8079b1841 Fixed race condition in descriptor publication.
If two contacts publish their descriptors simultaneously, they may both stop polling without retrieving each other's descriptors. Continue polling for 2 intervals after publishing the descriptor.
2016-02-25 10:10:57 +00:00
akwizgran 066285b86a New polling logic for Tor. #250
Poll for outgoing connections each time the network is enabled, then disable polling once our hidden service descriptor has been published.
2016-02-25 10:10:57 +00:00
akwizgran bdc17dfc8e Fixed a couple of bugs in settings. 2016-02-05 18:22:37 +00:00
akwizgran 88475bdd54 Transport properties client. #229 2016-01-27 12:51:55 +00:00
akwizgran 3b510e768a Replaced broken jsocks jar. #228 2016-01-21 11:28:54 +00:00
Santiago Torres 190bb12964 ENH: Replaces transport config with namespaced settings 2016-01-20 00:57:16 -05:00
Torsten Grote 872d10e2b0 Removed upstream jar files from all modules except briar-desktop 2016-01-15 12:10:28 -02:00
akwizgran c5282c5b17 Moved some API classes into packages. 2015-12-17 16:56:57 +00:00
Torsten Grote 2d28dcada2 Create two new events to signal enabling and disabling of transports 2015-12-17 11:34:10 -02:00
akwizgran 81c9992075 Code style: squashed. 2015-12-15 17:26:28 +00:00
Santiago Torres 403ab75d13 [plugins/tor/TorPlugin] Adds tor-over-wifi setting
Provides a checkbox in the settings view, as well as an event handler to
disable/enable the tor network if the device is not on using the wifi
connection.

Refactors network-enabling code to a separate function. This function
is ran after the network state changes, or the settings change and
will update the status accordingly.
2015-12-15 10:17:29 -05:00
akwizgran e4ac6d3afd Create hidden service in a subdirectory. #161
The permissions for the parent directory are too permissive (775) for Tor 0.2.7.5. The subdirectory is created with permissions 700.
2015-12-08 12:26:00 +00:00
akwizgran 79d9b4b6af Raised minimum Android version to 2.3 (API 9). #23 2015-12-02 13:20:55 +00:00
akwizgran 027ae8340f Whitespace-only code formatting changes. 2015-11-30 09:38:25 +00:00
akwizgran 6135bea2b4 Support Tor on Android x86 (thanks to n8fr8). 2015-04-16 08:02:57 +01:00
akwizgran 6e7578a0e0 Don't try to access Build.CPU_ABI2 on API version 7. 2015-04-07 19:11:59 +01:00
akwizgran a1d2aaf10e Use JDK 1.7, target Android 5.1. 2015-04-03 20:56:01 +01:00
akwizgran 10924709d0 Use PIE Tor binary on API version 16+. 2015-03-23 11:03:00 +00:00
akwizgran c14697972a Upgraded Tor to 0.2.5.10 with OpenSSL 1.0.2. 2015-01-30 19:23:36 +00:00
akwizgran d3bf2d59a1 Use the same maximum frame length for all transports. 2015-01-05 16:24:44 +00:00
akwizgran 388b36b6be Check periodically for retransmittable packets. Bug #46. 2014-12-14 20:26:41 +00:00
akwizgran 29a6596ee3 Use the transport's idle timeout, not a hardcoded value. 2014-12-14 15:18:39 +00:00
akwizgran d4fa656dbb Application layer keepalives to detect dead TCP connections.
DuplexOutgoingSession flushes its output stream if it's idle for a
transport-defined interval, causing an empty frame to be sent. The TCP
and Tor plugins use a socket timeout equal to twice the idle interval to
detect dead connections.

See bugs #27, #46 and #60.
2014-12-13 12:00:40 +00:00
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