[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [orbot/master] Merge branch 'master' of github.com:guardianproject/orbot



commit 888f836a5e62eb6bd3ca7c3a4fd8917843d0096b
Merge: 2b97df38 dbf13dcc
Author: n8fr8 <nathan@xxxxxxxxxxxxxxxxxxxx>
Date:   Tue Oct 29 09:39:10 2019 -0400

    Merge branch 'master' of github.com:guardianproject/orbot

 app-mini/build.gradle                              |   2 +-
 app-mini/src/main/ic_launcher-web.png              | Bin 18915 -> 20211 bytes
 .../torproject/android/mini/MiniMainActivity.java  |  14 -----
 .../torproject/android/mini/OnBootReceiver.java    |   5 +-
 .../org/torproject/android/mini/OrbotMiniApp.java  |   7 +--
 .../android/mini/settings/LocaleHelper.java        |   1 -
 .../android/mini/settings/SettingsPreferences.java |   1 -
 .../android/mini/ui/AppConfigActivity.java         |   6 --
 .../android/mini/ui/AppManagerActivity.java        |  25 ++++----
 .../mini/ui/onboarding/CustomSlideBigText.java     |   1 -
 .../mini/ui/onboarding/OnboardingActivity.java     |   2 -
 .../android/mini/vpn/VPNEnableActivity.java        |   7 +--
 .../res/drawable-hdpi-v11/ic_stat_notifyerr.png    | Bin 480 -> 359 bytes
 .../main/res/drawable-hdpi-v11/ic_stat_tor_off.png | Bin 744 -> 944 bytes
 .../res/drawable-hdpi-v9/ic_stat_notifyerr.png     | Bin 616 -> 508 bytes
 .../main/res/drawable-hdpi/ic_action_settings.png  | Bin 553 -> 329 bytes
 .../res/drawable-hdpi/ic_settings_white_24dp.png   | Bin 460 -> 816 bytes
 .../main/res/drawable-hdpi/ic_stat_notifyerr.png   | Bin 1312 -> 901 bytes
 .../src/main/res/drawable-hdpi/ic_stat_tor.png     | Bin 606 -> 912 bytes
 .../res/drawable-ldpi-v11/ic_stat_notifyerr.png    | Bin 294 -> 262 bytes
 .../res/drawable-ldpi-v9/ic_stat_notifyerr.png     | Bin 342 -> 326 bytes
 .../main/res/drawable-ldpi/ic_action_settings.png  | Bin 319 -> 250 bytes
 .../main/res/drawable-ldpi/ic_stat_notifyerr.png   | Bin 647 -> 443 bytes
 .../res/drawable-mdpi-v11/ic_stat_notifyerr.png    | Bin 357 -> 317 bytes
 .../res/drawable-mdpi-v9/ic_stat_notifyerr.png     | Bin 458 -> 417 bytes
 .../res/drawable-mdpi/ic_settings_white_24dp.png   | Bin 326 -> 598 bytes
 .../src/main/res/drawable-mdpi/ic_stat_tor.png     | Bin 389 -> 576 bytes
 .../res/drawable-xhdpi-v11/ic_stat_notifyerr.png   | Bin 618 -> 406 bytes
 .../res/drawable-xhdpi-v9/ic_stat_notifyerr.png    | Bin 747 -> 580 bytes
 .../res/drawable-xhdpi/ic_settings_white_24dp.png  | Bin 562 -> 982 bytes
 .../src/main/res/drawable-xhdpi/ic_stat_tor.png    | Bin 773 -> 1115 bytes
 .../res/drawable-xxhdpi/ic_settings_white_24dp.png | Bin 843 -> 1455 bytes
 .../src/main/res/drawable-xxhdpi/ic_stat_tor.png   | Bin 1131 -> 1496 bytes
 .../drawable-xxxhdpi/ic_settings_white_24dp.png    | Bin 1074 -> 1764 bytes
 .../src/main/res/drawable-xxxhdpi/ic_stat_tor.png  | Bin 1564 -> 1899 bytes
 app-mini/src/main/res/drawable/ic_menu_about.png   | Bin 1771 -> 1479 bytes
 app-mini/src/main/res/drawable/ic_menu_exit.png    | Bin 2693 -> 1031 bytes
 app-mini/src/main/res/drawable/ic_stat_tor_off.png | Bin 744 -> 944 bytes
 app-mini/src/main/res/drawable/onion32.png         | Bin 1599 -> 1402 bytes
 app-mini/src/main/res/drawable/toroff.png          | Bin 19187 -> 19161 bytes
 app-mini/src/main/res/drawable/toron.png           | Bin 19057 -> 19035 bytes
 app-mini/src/main/res/drawable/torstarting.png     | Bin 18052 -> 18019 bytes
 app-mini/src/main/res/mipmap-hdpi/ic_launcher.png  | Bin 2019 -> 2579 bytes
 .../res/mipmap-hdpi/ic_launcher_foreground.png     | Bin 1815 -> 2048 bytes
 .../src/main/res/mipmap-hdpi/ic_launcher_round.png | Bin 4055 -> 5226 bytes
 app-mini/src/main/res/mipmap-mdpi/ic_launcher.png  | Bin 1456 -> 1473 bytes
 .../res/mipmap-mdpi/ic_launcher_foreground.png     | Bin 1174 -> 1536 bytes
 .../src/main/res/mipmap-mdpi/ic_launcher_round.png | Bin 2620 -> 3414 bytes
 app-mini/src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 2761 -> 3479 bytes
 .../res/mipmap-xhdpi/ic_launcher_foreground.png    | Bin 2495 -> 2543 bytes
 .../main/res/mipmap-xhdpi/ic_launcher_round.png    | Bin 5714 -> 7313 bytes
 .../src/main/res/mipmap-xxhdpi/ic_launcher.png     | Bin 4143 -> 5120 bytes
 .../res/mipmap-xxhdpi/ic_launcher_foreground.png   | Bin 3922 -> 3468 bytes
 .../main/res/mipmap-xxhdpi/ic_launcher_round.png   | Bin 8706 -> 10885 bytes
 .../src/main/res/mipmap-xxxhdpi/ic_launcher.png    | Bin 5726 -> 6935 bytes
 .../res/mipmap-xxxhdpi/ic_launcher_foreground.png  | Bin 5467 -> 4466 bytes
 .../main/res/mipmap-xxxhdpi/ic_launcher_round.png  | Bin 12555 -> 15090 bytes
 app-mini/src/main/res/values/strings.xml           |   4 ++
 app-mini/src/main/res/xml/preferences.xml          |  14 ++++-
 app/build.gradle                                   |  19 +++++-
 .../org/torproject/android/OnBootReceiver.java     |   3 +-
 .../main/java/org/torproject/android/OrbotApp.java |   3 -
 .../org/torproject/android/OrbotMainActivity.java  |  69 ++++++++++-----------
 .../torproject/android/settings/LocaleHelper.java  |   1 -
 .../android/settings/SettingsPreferences.java      |   1 -
 .../torproject/android/ui/AppManagerActivity.java  |  25 ++++----
 .../torproject/android/ui/VPNEnableActivity.java   |   7 +--
 .../ui/hiddenservices/ClientCookiesActivity.java   |   2 -
 .../ui/hiddenservices/HiddenServicesActivity.java  |   1 -
 .../ui/hiddenservices/adapters/BackupAdapter.java  |   1 -
 .../adapters/ClientCookiesAdapter.java             |   1 -
 .../hiddenservices/adapters/OnionListAdapter.java  |   1 -
 .../ui/hiddenservices/backup/BackupUtils.java      |   1 -
 .../ui/hiddenservices/dialogs/AddCookieDialog.java |   1 -
 .../dialogs/CookieActionsDialog.java               |   1 -
 .../hiddenservices/dialogs/CookieDeleteDialog.java |   1 -
 .../ui/hiddenservices/dialogs/HSActionsDialog.java |   1 -
 .../ui/hiddenservices/dialogs/HSCookieDialog.java  |   2 -
 .../ui/hiddenservices/dialogs/HSDataDialog.java    |   1 -
 .../ui/hiddenservices/dialogs/HSDeleteDialog.java  |   1 -
 .../dialogs/SelectCookieBackupDialog.java          |   1 -
 .../dialogs/SelectHSBackupDialog.java              |   1 -
 .../permissions/PermissionManager.java             |   1 -
 .../providers/CookieContentProvider.java           |   1 -
 .../providers/HSContentProvider.java               |   1 -
 .../ui/onboarding/BridgeWizardActivity.java        |   1 -
 .../android/ui/onboarding/CustomSlideBigText.java  |   1 -
 .../android/ui/onboarding/OnboardingActivity.java  |   4 +-
 .../res/drawable-hdpi-v11/ic_stat_notifyerr.png    | Bin 480 -> 359 bytes
 app/src/main/res/drawable-hdpi-v11/ic_stat_tor.png | Bin 802 -> 660 bytes
 .../main/res/drawable-hdpi-v11/ic_stat_tor_off.png | Bin 744 -> 944 bytes
 .../res/drawable-hdpi-v11/ic_stat_tor_xfer.png     | Bin 967 -> 1073 bytes
 .../res/drawable-hdpi-v9/ic_stat_notifyerr.png     | Bin 616 -> 508 bytes
 app/src/main/res/drawable-hdpi-v9/ic_stat_tor.png  | Bin 713 -> 640 bytes
 .../main/res/drawable-hdpi/ic_action_settings.png  | Bin 553 -> 329 bytes
 app/src/main/res/drawable-hdpi/ic_launcher.png     | Bin 4194 -> 3616 bytes
 .../res/drawable-hdpi/ic_settings_white_24dp.png   | Bin 460 -> 816 bytes
 .../main/res/drawable-hdpi/ic_stat_notifyerr.png   | Bin 1312 -> 901 bytes
 app/src/main/res/drawable-hdpi/ic_stat_tor.png     | Bin 852 -> 715 bytes
 .../main/res/drawable-hdpi/ic_stat_tor_xfer.png    | Bin 990 -> 969 bytes
 .../res/drawable-ldpi-v11/ic_stat_notifyerr.png    | Bin 294 -> 262 bytes
 app/src/main/res/drawable-ldpi-v11/ic_stat_tor.png | Bin 390 -> 420 bytes
 .../res/drawable-ldpi-v9/ic_stat_notifyerr.png     | Bin 342 -> 326 bytes
 app/src/main/res/drawable-ldpi-v9/ic_stat_tor.png  | Bin 358 -> 365 bytes
 .../main/res/drawable-ldpi/ic_action_settings.png  | Bin 319 -> 250 bytes
 app/src/main/res/drawable-ldpi/ic_launcher.png     | Bin 2394 -> 2004 bytes
 .../main/res/drawable-ldpi/ic_stat_notifyerr.png   | Bin 647 -> 443 bytes
 app/src/main/res/drawable-ldpi/ic_stat_tor.png     | Bin 606 -> 494 bytes
 .../res/drawable-mdpi-v11/ic_stat_notifyerr.png    | Bin 357 -> 317 bytes
 app/src/main/res/drawable-mdpi-v11/ic_stat_tor.png | Bin 517 -> 441 bytes
 .../res/drawable-mdpi-v11/ic_stat_tor_xfer.png     | Bin 607 -> 741 bytes
 .../res/drawable-mdpi-v9/ic_stat_notifyerr.png     | Bin 458 -> 417 bytes
 app/src/main/res/drawable-mdpi-v9/ic_stat_tor.png  | Bin 475 -> 464 bytes
 .../res/drawable-mdpi/ic_settings_white_24dp.png   | Bin 326 -> 598 bytes
 .../res/drawable-xhdpi-v11/ic_stat_notifyerr.png   | Bin 618 -> 406 bytes
 .../main/res/drawable-xhdpi-v11/ic_stat_tor.png    | Bin 1165 -> 887 bytes
 .../res/drawable-xhdpi-v11/ic_stat_tor_xfer.png    | Bin 1337 -> 1348 bytes
 .../res/drawable-xhdpi-v9/ic_stat_notifyerr.png    | Bin 747 -> 580 bytes
 app/src/main/res/drawable-xhdpi-v9/ic_stat_tor.png | Bin 970 -> 864 bytes
 .../res/drawable-xhdpi/ic_settings_white_24dp.png  | Bin 562 -> 982 bytes
 .../main/res/drawable-xxhdpi-v11/ic_stat_tor.png   | Bin 1903 -> 1307 bytes
 .../res/drawable-xxhdpi-v11/ic_stat_tor_xfer.png   | Bin 2019 -> 1734 bytes
 .../res/drawable-xxhdpi/ic_settings_white_24dp.png | Bin 843 -> 1455 bytes
 .../main/res/drawable-xxxhdpi-v11/ic_stat_tor.png  | Bin 2661 -> 1734 bytes
 .../res/drawable-xxxhdpi-v11/ic_stat_tor_xfer.png  | Bin 3156 -> 2424 bytes
 .../drawable-xxxhdpi/ic_settings_white_24dp.png    | Bin 1074 -> 1764 bytes
 app/src/main/res/drawable/ic_launcher.png          | Bin 6055 -> 5111 bytes
 app/src/main/res/drawable/ic_menu_about.png        | Bin 1771 -> 1479 bytes
 app/src/main/res/drawable/ic_menu_exit.png         | Bin 2693 -> 1031 bytes
 app/src/main/res/drawable/ic_stat_tor_off.png      | Bin 744 -> 944 bytes
 app/src/main/res/drawable/ic_stat_tor_xfer.png     | Bin 600 -> 628 bytes
 app/src/main/res/drawable/onion32.png              | Bin 1599 -> 1402 bytes
 app/src/main/res/drawable/toroff.png               | Bin 19187 -> 19161 bytes
 app/src/main/res/drawable/toron.png                | Bin 19057 -> 19035 bytes
 app/src/main/res/drawable/torstarting.png          | Bin 18052 -> 18019 bytes
 app/src/main/res/values/strings.xml                |   4 ++
 app/src/main/res/xml/preferences.xml               |  14 ++++-
 .../android/en-US/images/featureGraphic.png        | Bin 299999 -> 224893 bytes
 fastlane/metadata/android/en-US/images/icon.png    | Bin 46595 -> 31345 bytes
 .../phoneScreenshots/device-2018-01-05-122015.png  | Bin 337474 -> 254422 bytes
 .../phoneScreenshots/device-2018-01-05-122035.png  | Bin 119904 -> 96898 bytes
 .../phoneScreenshots/device-2018-01-05-122111.png  | Bin 472163 -> 358410 bytes
 .../phoneScreenshots/device-2018-01-05-122301.png  | Bin 65793 -> 52269 bytes
 .../phoneScreenshots/device-2018-01-05-122310.png  | Bin 65793 -> 52269 bytes
 .../phoneScreenshots/device-2018-01-05-122314.png  | Bin 65793 -> 52269 bytes
 .../phoneScreenshots/device-2018-01-05-122344.png  | Bin 236020 -> 193597 bytes
 .../phoneScreenshots/device-2018-01-05-123814.png  | Bin 282081 -> 222617 bytes
 .../phoneScreenshots/device-2018-01-05-123828.png  | Bin 148480 -> 120576 bytes
 .../phoneScreenshots/device-2018-01-05-123836.png  | Bin 161380 -> 130945 bytes
 .../phoneScreenshots/device-2018-01-05-123908.png  | Bin 344849 -> 259920 bytes
 .../phoneScreenshots/device-2018-01-05-124039.png  | Bin 49019 -> 39303 bytes
 .../phoneScreenshots/device-2018-01-05-124045.png  | Bin 73495 -> 58218 bytes
 .../phoneScreenshots/device-2018-01-05-124052.png  | Bin 80358 -> 64827 bytes
 .../phoneScreenshots/device-2018-01-05-124059.png  | Bin 120833 -> 96786 bytes
 make-release-build                                 |  30 +++------
 orbotservice/build.gradle                          |   6 +-
 .../android/control/TorControlConnection.java      |   2 -
 .../torproject/android/service/OrbotConstants.java |   2 +
 .../android/service/StartTorReceiver.java          |   1 -
 .../android/service/TorEventHandler.java           |  16 +----
 .../org/torproject/android/service/TorService.java |  20 ++++--
 .../android/service/util/CustomShell.java          |   3 -
 .../service/util/CustomTorResourceInstaller.java   |   1 -
 .../android/service/util/NativeLoader.java         |   2 -
 .../android/service/util/PortForwarder.java        |   1 -
 .../android/service/util/TCPSourceApp.java         |  13 ++--
 .../android/service/util/TorServiceUtils.java      |   1 -
 .../android/service/vpn/OrbotVpnManager.java       |   5 --
 .../android/service/vpn/TorVpnService.java         |   1 -
 .../torproject/android/service/vpn/Tun2Socks.java  |   2 -
 .../res/drawable-hdpi-v11/ic_stat_notifyerr.png    | Bin 480 -> 359 bytes
 .../main/res/drawable-hdpi-v11/ic_stat_tor_off.png | Bin 744 -> 944 bytes
 .../res/drawable-hdpi-v9/ic_stat_notifyerr.png     | Bin 616 -> 508 bytes
 .../res/drawable-hdpi/ic_refresh_white_24dp.png    | Bin 387 -> 675 bytes
 .../main/res/drawable-hdpi/ic_stat_notifyerr.png   | Bin 1312 -> 901 bytes
 .../src/main/res/drawable-hdpi/ic_stat_tor.png     | Bin 1136 -> 1519 bytes
 .../res/drawable-ldpi-v11/ic_stat_notifyerr.png    | Bin 294 -> 262 bytes
 .../res/drawable-ldpi-v9/ic_stat_notifyerr.png     | Bin 342 -> 326 bytes
 .../main/res/drawable-ldpi/ic_stat_notifyerr.png   | Bin 647 -> 443 bytes
 .../res/drawable-mdpi-v11/ic_stat_notifyerr.png    | Bin 357 -> 317 bytes
 .../res/drawable-mdpi-v9/ic_stat_notifyerr.png     | Bin 458 -> 417 bytes
 .../drawable-mdpi/ic_action_settings.png           | Bin 364 -> 251 bytes
 .../drawable-mdpi/ic_autorenew_black_36dp.png      | Bin 369 -> 578 bytes
 .../drawable-mdpi/ic_filter_none_black_36dp.png    | Bin 198 -> 251 bytes
 .../drawable-mdpi/drawable-mdpi/ic_launcher.png    | Bin 2677 -> 2319 bytes
 .../ic_playlist_add_check_black_36dp.png           | Bin 163 -> 202 bytes
 .../drawable-mdpi/ic_stat_notifyerr.png            | Bin 883 -> 617 bytes
 .../drawable-mdpi/drawable-mdpi/ic_stat_tor.png    | Bin 535 -> 479 bytes
 .../drawable-mdpi/ic_stat_tor_xfer.png             | Bin 600 -> 628 bytes
 .../res/drawable-mdpi/drawable-mdpi/inverse.png    | Bin 1027 -> 1231 bytes
 .../res/drawable-mdpi/ic_refresh_white_24dp.png    | Bin 254 -> 426 bytes
 .../main/res/drawable-mdpi/ic_stat_notifyerr.png   | Bin 883 -> 617 bytes
 .../src/main/res/drawable-mdpi/ic_stat_tor.png     | Bin 622 -> 943 bytes
 .../res/drawable-xhdpi-v11/ic_stat_notifyerr.png   | Bin 618 -> 406 bytes
 .../res/drawable-xhdpi-v9/ic_stat_notifyerr.png    | Bin 747 -> 580 bytes
 .../res/drawable-xhdpi/ic_refresh_white_24dp.png   | Bin 509 -> 895 bytes
 .../main/res/drawable-xhdpi/ic_stat_notifyerr.png  | Bin 1796 -> 1370 bytes
 .../src/main/res/drawable-xhdpi/ic_stat_tor.png    | Bin 1774 -> 2148 bytes
 .../drawable-xxhdpi/ic_autorenew_black_36dp.png    | Bin 1000 -> 1440 bytes
 .../drawable-xxhdpi/ic_filter_none_black_36dp.png  | Bin 415 -> 518 bytes
 .../drawable-xxhdpi/ic_launcher.png                | Bin 9556 -> 7975 bytes
 .../ic_playlist_add_check_black_36dp.png           | Bin 325 -> 413 bytes
 .../drawable-xxhdpi/ic_stat_tor.png                | Bin 1872 -> 1430 bytes
 .../drawable-xxhdpi/ic_stat_tor_xfer.png           | Bin 2216 -> 1295 bytes
 .../drawable-xxhdpi/drawable-xxhdpi/inverse.png    | Bin 1027 -> 1231 bytes
 .../res/drawable-xxhdpi/ic_refresh_white_24dp.png  | Bin 734 -> 1231 bytes
 .../src/main/res/drawable-xxhdpi/ic_stat_tor.png   | Bin 3241 -> 3296 bytes
 .../drawable-xxxhdpi/ic_autorenew_black_36dp.png   | Bin 1362 -> 1953 bytes
 .../drawable-xxxhdpi/ic_filter_none_black_36dp.png | Bin 505 -> 577 bytes
 .../drawable-xxxhdpi/ic_launcher.png               | Bin 13297 -> 11077 bytes
 .../ic_playlist_add_check_black_36dp.png           | Bin 379 -> 440 bytes
 .../drawable-xxxhdpi/ic_stat_tor.png               | Bin 2631 -> 1998 bytes
 .../drawable-xxxhdpi/ic_stat_tor_xfer.png          | Bin 2859 -> 1585 bytes
 .../drawable-xxxhdpi/drawable-xxxhdpi/inverse.png  | Bin 1027 -> 1231 bytes
 .../res/drawable-xxxhdpi/ic_refresh_white_24dp.png | Bin 967 -> 1553 bytes
 .../src/main/res/drawable-xxxhdpi/ic_stat_tor.png  | Bin 3188 -> 3580 bytes
 tools/png-pre-compress                             |  18 ++++++
 217 files changed, 178 insertions(+), 207 deletions(-)

diff --cc app/build.gradle
index 73426289,d7d8957c..1c89e568
--- a/app/build.gradle
+++ b/app/build.gradle
@@@ -59,18 -74,9 +74,18 @@@ android 
              applicationId 'org.torproject.android'
              targetSdkVersion 28
              versionCode 16123000
-             versionName '16.1.2-RC-2-tor-0.4.1.5-rc'
+             versionName getVersionName()
              archivesBaseName = "Orbot-$versionName"
          }
 +        appmax {
 +            dimension "free"
 +            minSdkVersion 16
 +            applicationId 'org.torproject.android.max'
 +            targetSdkVersion 28
 +            versionCode 16123000
 +            versionName '16.1.2-RC-2-tor-0.4.1.5-rc'
 +            archivesBaseName = "orbotMAX-$versionName"
 +        }
      }
  
      splits {
diff --cc orbotservice/src/main/java/org/torproject/android/service/TorService.java
index 8c8330be,52e67248..ecad5fa9
--- a/orbotservice/src/main/java/org/torproject/android/service/TorService.java
+++ b/orbotservice/src/main/java/org/torproject/android/service/TorService.java
@@@ -1730,57 -1735,50 +1739,58 @@@ public class TorService extends Servic
  
          ContentResolver mCR = getApplicationContext().getContentResolver();
  
 -        /* ---- Hidden Services ---- */
 -        Cursor hidden_services = mCR.query(HS_CONTENT_URI, hsProjection, HiddenService.ENABLED + "=1", null, null);
 -        if(hidden_services != null) {
 -            try {
 -                while (hidden_services.moveToNext()) {
 -                    String HSname = hidden_services.getString(hidden_services.getColumnIndex(HiddenService.NAME));
 -                    Integer HSLocalPort = hidden_services.getInt(hidden_services.getColumnIndex(HiddenService.PORT));
 -                    Integer HSOnionPort = hidden_services.getInt(hidden_services.getColumnIndex(HiddenService.ONION_PORT));
 -                    Integer HSAuthCookie = hidden_services.getInt(hidden_services.getColumnIndex(HiddenService.AUTH_COOKIE));
 -                    String hsDirPath = new File(mHSBasePath.getAbsolutePath(),"hs" + HSLocalPort).getCanonicalPath();
 +        try {
 +            /* ---- Hidden Services ---- */
 +            Cursor hidden_services = mCR.query(HS_CONTENT_URI, hsProjection, HiddenService.ENABLED + "=1", null, null);
 +            if (hidden_services != null) {
 +                try {
 +                    while (hidden_services.moveToNext()) {
 +                        String HSname = hidden_services.getString(hidden_services.getColumnIndex(HiddenService.NAME));
 +                        Integer HSLocalPort = hidden_services.getInt(hidden_services.getColumnIndex(HiddenService.PORT));
 +                        Integer HSOnionPort = hidden_services.getInt(hidden_services.getColumnIndex(HiddenService.ONION_PORT));
 +                        Integer HSAuthCookie = hidden_services.getInt(hidden_services.getColumnIndex(HiddenService.AUTH_COOKIE));
 +                        String hsDirPath = new File(mHSBasePath.getAbsolutePath(), "hs" + HSLocalPort).getCanonicalPath();
  
 -                    debug("Adding hidden service on port: " + HSLocalPort);
 +                        debug("Adding hidden service on port: " + HSLocalPort);
  
 -                    extraLines.append("HiddenServiceDir" + ' ' + hsDirPath).append('\n');
 -                    extraLines.append("HiddenServicePort" + ' ' + HSOnionPort + " 127.0.0.1:" + HSLocalPort).append('\n');
 +                        extraLines.append("HiddenServiceDir" + ' ' + hsDirPath).append('\n');
 +                        extraLines.append("HiddenServicePort" + ' ' + HSOnionPort + " 127.0.0.1:" + HSLocalPort).append('\n');
+                     extraLines.append("HiddenServiceVersion 2").append('\n');
  
 -                    if(HSAuthCookie == 1)
 -                        extraLines.append("HiddenServiceAuthorizeClient stealth " + HSname).append('\n');
 +                        if (HSAuthCookie == 1)
 +                            extraLines.append("HiddenServiceAuthorizeClient stealth " + HSname).append('\n');
 +                    }
 +                } catch (NumberFormatException e) {
 +                    Log.e(OrbotConstants.TAG, "error parsing hsport", e);
 +                } catch (Exception e) {
 +                    Log.e(OrbotConstants.TAG, "error starting share server", e);
                  }
 -            } catch (NumberFormatException e) {
 -                    Log.e(OrbotConstants.TAG,"error parsing hsport",e);
 -            } catch (Exception e) {
 -                    Log.e(OrbotConstants.TAG,"error starting share server",e);
 +
 +                hidden_services.close();
              }
 +        }
 +        catch (SecurityException se) {}
  
 -            hidden_services.close();
 -		}
 +        try
 +        {
  
 -        /* ---- Client Cookies ---- */
 -        Cursor client_cookies = mCR.query(COOKIE_CONTENT_URI, cookieProjection, ClientCookie.ENABLED + "=1", null, null);
 -        if(client_cookies != null) {
 -            try {
 -                while (client_cookies.moveToNext()) {
 -                    String domain = client_cookies.getString(client_cookies.getColumnIndex(ClientCookie.DOMAIN));
 -                    String cookie = client_cookies.getString(client_cookies.getColumnIndex(ClientCookie.AUTH_COOKIE_VALUE));
 -                    extraLines.append("HidServAuth" + ' ' + domain + ' ' + cookie).append('\n');
 +            /* ---- Client Cookies ---- */
 +            Cursor client_cookies = mCR.query(COOKIE_CONTENT_URI, cookieProjection, ClientCookie.ENABLED + "=1", null, null);
 +            if(client_cookies != null) {
 +                try {
 +                    while (client_cookies.moveToNext()) {
 +                        String domain = client_cookies.getString(client_cookies.getColumnIndex(ClientCookie.DOMAIN));
 +                        String cookie = client_cookies.getString(client_cookies.getColumnIndex(ClientCookie.AUTH_COOKIE_VALUE));
 +                        extraLines.append("HidServAuth" + ' ' + domain + ' ' + cookie).append('\n');
 +                    }
 +                } catch (Exception e) {
 +                        Log.e(OrbotConstants.TAG,"error starting share server",e);
                  }
 -            } catch (Exception e) {
 -                    Log.e(OrbotConstants.TAG,"error starting share server",e);
 -            }
  
 -            client_cookies.close();
 -		}
 +                client_cookies.close();
 +            }
 +        }
 +        catch (SecurityException se) {}
  
          return extraLines;
      }



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits