Java layer Proxying fixed

Added by amoghbl1 over 2 years ago

The firefox app had multiple classes in the java layer where network code was used in the Java layer.
  1. mobile/android/base/favicons/LoadFaviconTask used apache.net.http.* and org.apache.http.*, this was migrated to the ch.boye library and Proxy has been applied to that connection.
  2. mobile/android/base/sync/net/BaseResource.java uses the ch.boye library but without proxy, this has been updated to use the tor proxy.
  3. Next finding was that the java.net.HttpURLConnection objects were not obeying the proxy rules either and all these calls have been modified to use the tor proxy. List of files modified in this manner:
    • mobile/android/base/CrashReporter.java
    • mobile/android/base/SuggestClient.java
    • mobile/android/base/distribution/Distribution.java
    • mobile/android/search/java/org/mozilla/search/providers/SearchEngineManager.java
    • mobile/android/stumbler/java/org/mozilla/mozstumbler/service/utils/AbstractCommunicator.java

Old apk https://dev.guardianproject.info/attachments/download/1647/fennec-38.0.en-US.android-arm.apk

New apk https://dev.guardianproject.info/attachments/download/1677/fennec-38.0.en-US.android-arm.apk

The proxy rules being followed by Searcan be easily tested using the following steps.
Install the old app with noRootFirewall pre installed.
https://dev.guardianproject.info/attachments/download/1675/Screenshot_2015-06-13-04-42-41.png image
Click Yes in the would you like to turn on search suggestions part
At this point, the noRootFirewall app will see a request from Fennec amoghbl1
https://dev.guardianproject.info/attachments/download/1676/Screenshot_2015-06-13-04-43-01.png image
Uninstall and reinstall the new app.
Follow the same procedure described above and click yes, but this time the suggestions load and no requests are seen on noRootFirewall

Another fun fact, the new version also strips out native video casting support and things like that, so it's about 3mb smaller!

Screenshot_2015-06-13-04-42-41.png - before enabling search (190 KB) amoghbl1, 06/13/2015 08:44 am

Screenshot_2015-06-13-04-43-01.png (188 KB) amoghbl1, 06/13/2015 08:50 am


Comments

Added by n8fr8 over 2 years ago

Please post links to your java code repo, and the relevant diffs/commits/patches

Added by amoghbl1 over 2 years ago

Proxies CrashReporter, SuggestClient, Distribution, SearchEngineManager, AbstractCommunicator https://github.com/amoghbl1/tor-browser/commit/68551e6c651a240a651346f374c964a74ee14169

Proxies BaseResources https://github.com/amoghbl1/tor-browser/commit/324273cc4eaf1f54dc9ca0a5777cb2ec1b2ed34e

Proxies LoadFaviconTask https://github.com/amoghbl1/tor-browser/commit/33d8d08fdf5719baa6e96896a63978c789e6c8f8