Commit Graph

634 Commits

Author SHA1 Message Date
Nathan Freitas 57855932f4 move to using meek_lite mode from obfs4client and update/improve proxying code 2016-02-23 23:21:02 -05:00
Nathan Freitas e9d28a4445 handle NPE better for dev.gp.info #6686
in some cases the connection becomes null while you are interacting with it
2016-02-22 15:07:40 -05:00
Nathan Freitas bac16a57fc enable backwards compat to Android SDK 10 (Android 2.3.*) 2016-02-02 12:22:24 -05:00
Nathan Freitas fd45fa38f6 enable TransProxy and DNSPort by default without root
- some users run their own iptables transproxy scripts with AFWall and need Orbot to have these ports open by default. There is no risk to enable them by default, so we'll them on for now, and think about how to better make this a user option in the future.
2016-01-28 09:24:07 -05:00
Nathan Freitas 1839b8f0b9 add-in missing "break" for Meek Google 2016-01-26 18:31:04 -05:00
Nathan Freitas da7eb961f1 small fixes to VPN service port setup to ensure proper setup 2016-01-25 23:44:44 -05:00
Nathan Freitas 2a728140b4 choose up to 2 bridges from default list randomly 2016-01-25 22:09:26 -05:00
Nathan Freitas 1dbe5eac55 make bridge allocation shuffle randomly to distribute load
inspired by this work: https://trac.torproject.org/projects/tor/ticket/18113
we don't want all users to start with the same bridges in the same order
2016-01-25 15:45:36 -05:00
Nathan Freitas ba835599f7 this should be kbps in fact 2016-01-25 15:45:29 -05:00
Nathan Freitas cf1a644c19 add support for loading default bridges from asset file 2016-01-25 12:50:03 -05:00
Nathan Freitas 0669addd49 re-add appcompat, update to latest, move to Android 23 to build
- this is required for latest appcompat, and to address the bug
with the white-on-white spinner popup error
2016-01-25 11:28:33 -05:00
Nathan Freitas c05d8e7b43 remove appcompat, and just support support-v4 2016-01-25 10:43:34 -05:00
Hans-Christoph Steiner 72eab39a95 build jtorctl directly, using a symlink to point to its source code
This builds the jtorctl java with the rest of Orbot's java.  The process of
making a jar breaks when external/Makefile is run with frozen time using
faketime.  That is needed to get reproducible native bits.
2016-01-22 23:25:54 +01:00
Nathan Freitas 6eb0a93dd8 improvements to Locale changing in app 2016-01-20 16:52:59 -05:00
Nathan Freitas 9af00fe263 change VPN mode DNS to use Google's 8.8.8.8 2016-01-20 14:11:48 -05:00
Nathan Freitas 6ffea9e38f add ability to check if configured SOCKS port is available
Samsung devices like to use 9050 (Since their hardware model is i9050!). Tor likes to use port 9050. This new code looks to see if port 9050 is available, and if not, change the setting to 'auto' so Tor can find another port.
2016-01-15 23:43:54 -05:00
Nathan Freitas 8f7165ce57 fixes for settings processing and QRCode scanning of bridges
- support new JSON array form bridges.torproject.org
- only enable TransProxy and DNSPort settings if the user enables transproxy
2016-01-12 23:57:37 -05:00
Nathan Freitas 39244a613a fix the ability to select per app VPN routing 2016-01-11 17:11:58 -05:00
Nathan Freitas 52acf68ed4 move "World" string to resource 2016-01-07 01:06:43 -05:00
Nathan Freitas 3b41365708 allow country exit node select to persist 2016-01-07 00:59:34 -05:00
Nathan Freitas b2081789f5 add initial support for easy exit country selection 2016-01-06 23:42:08 -05:00
Nathan Freitas d839b154a1 fixes for VPN service UI to work on Android6 2016-01-06 16:13:56 -05:00
Nathan Freitas f36965211e add code to kill pdnsd daemon when VPN is stopped 2016-01-04 02:28:31 -05:00
Nathan Freitas f1fcec3d45 add support for PDNSD DNS Daemon for VPN DNS resolution
Tor's DNS port doesn't work well with the VPN mode, so we
will use PDSND to resolve DNS over Tor using OpenDNS. This is
a hack/solution that we learned from SocksDroid.
2016-01-04 01:38:36 -05:00
Nathan Freitas 8d8fe0ceb4 updates to improve VPN support 2015-12-30 13:21:33 -05:00
Nathan Freitas bb55557b44 update installer to get PLUTO binaries from assets 2015-12-16 10:27:06 -05:00
Nathan Freitas 51205b8222 update for Orfox 2015-12-16 10:01:24 -05:00
Nathan Freitas 0a5dd086cd use a browser constant here, with the new constant being Orfox 2015-12-16 10:00:03 -05:00
Nathan Freitas 256ecc4df0 update tor version constant to 0.2.6.10 2015-07-13 23:12:10 -04:00
Nathan Freitas dc06eedcfd final fixes for AppsVPN mode on boot and Android 4.x support 2015-06-26 09:52:42 -04:00
Nathan Freitas 1b6126e3d0 Enable support for app selection to work with VPN mode on Lollipop+
For now we will re-use/overload the app selection transproxy UI in Settings
2015-06-25 10:48:50 -04:00
Nathan Freitas 765bc61ded enable background starts by default only for Service intent calls 2015-06-22 12:57:59 -04:00
Nathan Freitas e11cae883e Merge branch 'the-big-start-stop-makeover' of https://github.com/eighthave/orbot into eighthave-the-big-start-stop-makeover
Conflicts:
	src/org/torproject/android/OrbotMainActivity.java
	src/org/torproject/android/service/TorService.java
2015-06-22 12:43:42 -04:00
Nathan Freitas 225ad9d1ac fix handling of foreground intent starts, and set bg start off by default 2015-06-22 12:37:51 -04:00
Nathan Freitas e132a79a61 improve status request/callback interaction and status UI layout 2015-06-22 12:25:37 -04:00
Hans-Christoph Steiner aa87e6712a on start, check for running tor daemon, and if TorService stopped, then start
If Orbot was killed when the tor daemon was running, the tor daemon will
still be running when Orbot starts again.  OrbotMainActivity then checks to
see if tor daemon is running while TorService is stopped.  If so, TorService
is started so that the state of everything is in sync.
2015-06-17 12:08:52 -04:00
Hans-Christoph Steiner a81c0001d6 init file path variables (tor, polipo, etc) when the app starts
These file path variables can be set at the very start, OrbotApp.onCreate()
and they will not change during the lifetime of the app, so represent them
as globally accessible static variables.  This is needed for things like
OrbotMainActivity detecting whether the tor daemon is still running, even
though TorService is not.
2015-06-17 12:06:23 -04:00
Hans-Christoph Steiner 943edf094b "Allow Background Starts" prefs also controls the old START_TOR Intent 2015-06-17 11:45:07 -04:00
Hans-Christoph Steiner adf7c09f0e remove delayed handling of Intents in OrbotMainActivity
This is a leftover bit from the old structure, it should no longer be
needed and it causes the status updates to be noticeably delayed so when
OrbotMainActivity is started after being killed, it flashes OFF then ON.
2015-06-17 11:15:31 -04:00
Hans-Christoph Steiner c9e31020e0 prevent a status request from starting TorService
If some internal bit of Orbot is requesting the status of TorService, it
should not cause it to start.  So only request status from TorService if it
is running, otherwise keep status as OFF.

the big imports change is because of the Android auto-formatter
2015-06-17 11:13:35 -04:00
Hans-Christoph Steiner e5c2e1a040 when OrbotMainActivity starts, query TorService for current status
If OrbotMainActivity gets killed while TorService is running, then when
OrbotMainActivity starts again, it needs to get the current status from
TorService to correctly represent things to the user.
2015-06-17 11:00:48 -04:00
Hans-Christoph Steiner f16394b7db include all status messages with "start" in them in the starting sequence
Before, the startup sequence showed "Orbot is starting..." for a long time,
then quickly showed the final tor percentage messages.  This adds a few
more messages to provide useful feedback.
2015-06-12 14:55:17 -04:00
Hans-Christoph Steiner ddaae1d941 drive main screen UI updated entirely from TorService status updates
Now that STATUS_STARTING is sent in TorService.onCreate(), the response
time is snappy enough that we don't need hacks in OrbotMainActivity to
show that long press happened.
2015-06-12 14:54:04 -04:00
Hans-Christoph Steiner 232098eeaf set STATUS_STARTING in TorService.onCreate(), that's where it begins
The very first place that the whole tor start sequence starts is from
TorService's onCreate(), so that is where STATUS_STARTING should be
announced from.  The open question is whether Intents besides ACTION_START
ever cause TorService to start.  In theory, TorService should already be
running when any Intent is sent besides ACTION_START.
2015-06-12 14:49:19 -04:00
Hans-Christoph Steiner 8f57b42e68 rename TorStarter to IncomingIntentRouter, it handles all Intents
TorStarter does lots of things besides starting Tor
2015-06-12 14:46:47 -04:00
Hans-Christoph Steiner ff04bde300 announce Orbot is ON once the first circuit is complete
Before, it was announcing tor was started when it had completed starting
the daemons.  But that does not guarantee that Tor is actually connected
and working.  So instead, this waits for the first circuit to be built,
then announces Tor is ON.
2015-06-12 14:24:57 -04:00
Hans-Christoph Steiner b620f828a1 include dynamic proxy config info in ACTION_STATUS replies
This includes extras in the Intents that are sent as replies to the two
different requests to start tor (ACTION_START and ACTION_START_TOR).  These
extras give all of the current SOCKS and HTTP proxy settings, so that the
app can dynamically use the correct settings.  Sometimes there are port
conflicts, so apps should dynamically adjust in order to reliably find tor.

closes #3612 https://dev.guardianproject.info/issues/3612
refs #4419 https://dev.guardianproject.info/issues/4419
refs #3690 https://dev.guardianproject.info/issues/3690
refs #3687 https://dev.guardianproject.info/issues/3687
refs #3859 https://dev.guardianproject.info/issues/3859
2015-06-11 17:02:56 -04:00
Hans-Christoph Steiner 0937c8838f use constants for setting default ports, and variables when running 2015-06-11 16:32:31 -04:00
Hans-Christoph Steiner 623084548d standardize network port constant variables
use consistent naming and types for code clarity
2015-06-11 16:31:39 -04:00
Hans-Christoph Steiner 775135d07a let the requesting app know that the user has disabled starting via Intent
If an app is using ACTION_START to start Orbot in the background, but the
user had disabled that using the allowBackgroundStarts pref, then the app
will want to know about that so it can fallback on prompting the user to
bring up Orbot itself for the user to manually start it.

refs #3117 https://dev.guardianproject.info/issues/3117
2015-06-10 18:15:29 -04:00