lists.torproject.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

tbb-commits

Thread Start a new thread
Threads by month
  • ----- 2026 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2015 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2014 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
tbb-commits@lists.torproject.org

  • 1 participants
  • 20449 discussions
[tor-browser/tor-browser-52.7.2esr-8.0-1] set default browser to DuckDuckGo modify DDG URL to the non-javascript site
by gk@torproject.org 20 Mar '18

20 Mar '18
commit 750e3372e1a4887337ab6460ef3bb950c72b36f3 Author: n8fr8 <nathan(a)freitas.net> Date: Mon Jul 17 00:08:50 2017 -0400 set default browser to DuckDuckGo modify DDG URL to the non-javascript site Signed-off-by: Amogh Pradeep <amoghbl1(a)gmail.com> --- mobile/locales/en-US/chrome/region.properties | 10 +++++----- mobile/locales/en-US/searchplugins/duckduckgo.xml | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mobile/locales/en-US/chrome/region.properties b/mobile/locales/en-US/chrome/region.properties index 201152118819..d194cdac4131 100644 --- a/mobile/locales/en-US/chrome/region.properties +++ b/mobile/locales/en-US/chrome/region.properties @@ -3,17 +3,17 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Default search engine -browser.search.defaultenginename=Google +browser.search.defaultenginename=DuckDuckGo # Search engine order (order displayed in the search bar dropdown). -browser.search.order.1=Google -browser.search.order.2=Yahoo +browser.search.order.1=DuckDuckGo +browser.search.order.2=Google browser.search.order.3=Bing # These override the equivalents above when the client detects that it is in # US market only. -browser.search.defaultenginename.US=Yahoo -browser.search.order.US.1=Yahoo +browser.search.defaultenginename.US=DuckDuckGo +browser.search.order.US.1=DuckDuckGo browser.search.order.US.2=Google browser.search.order.US.3=Bing diff --git a/mobile/locales/en-US/searchplugins/duckduckgo.xml b/mobile/locales/en-US/searchplugins/duckduckgo.xml index 9e96ae21a005..824b42a05c9d 100644 --- a/mobile/locales/en-US/searchplugins/duckduckgo.xml +++ b/mobile/locales/en-US/searchplugins/duckduckgo.xml @@ -11,13 +11,13 @@ <Param name="type" value="list"/> </Url> <!-- this is effectively x-moz-phonesearch, but search service expects a text/html entry --> -<Url type="text/html" method="GET" template="https://duckduckgo.com/"> +<Url type="text/html" method="GET" template="https://duckduckgo.com/html/"> <Param name="q" value="{searchTerms}" /> <Param name="t" value="fpas" /> </Url> -<Url type="application/x-moz-tabletsearch" method="GET" template="https://duckduckgo.com/"> +<Url type="application/x-moz-tabletsearch" method="GET" template="https://duckduckgo.com/html/"> <Param name="q" value="{searchTerms}" /> <Param name="t" value="ftas" /> </Url> -<SearchForm>https://duckduckgo.com</SearchForm> +<SearchForm>https://duckduckgo.com/html/</SearchForm> </SearchPlugin>
1 0
0 0
[tor-browser/tor-browser-52.7.2esr-8.0-1] Orfox: hook up default panic trigger to "quit and clear"
by gk@torproject.org 20 Mar '18

20 Mar '18
commit 4f8bad4120d0d20148840adae41ad712812c4ddc Author: Hans-Christoph Steiner <hans(a)eds.org> Date: Sat Nov 21 00:24:09 2015 +0100 Orfox: hook up default panic trigger to "quit and clear" Signed-off-by: Amogh Pradeep <amoghbl1(a)gmail.com> --- mobile/android/base/AndroidManifest.xml.in | 7 ++ .../base/java/org/mozilla/gecko/GeckoApp.java | 76 ++++++++++++---------- 2 files changed, 49 insertions(+), 34 deletions(-) diff --git a/mobile/android/base/AndroidManifest.xml.in b/mobile/android/base/AndroidManifest.xml.in index 2ec98c35ab54..1aa50a08463d 100644 --- a/mobile/android/base/AndroidManifest.xml.in +++ b/mobile/android/base/AndroidManifest.xml.in @@ -155,6 +155,13 @@ <data android:pathPattern=".*\\.xpi" /> </intent-filter> + <!-- receive triggers from panickit apps --> + <intent-filter> + <action android:name="info.guardianproject.panic.action.TRIGGER" /> + + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + #ifdef MOZ_ANDROID_BEAM <intent-filter> <action android:name="android.nfc.action.NDEF_DISCOVERED"/> diff --git a/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java b/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java index 2f989576c1a9..1bf4f1d77de5 100644 --- a/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java +++ b/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java @@ -152,6 +152,8 @@ public abstract class GeckoApp public static final String INTENT_REGISTER_STUMBLER_LISTENER = "org.mozilla.gecko.STUMBLER_REGISTER_LOCAL_LISTENER"; + public static final String ACTION_PANIC_TRIGGER = "info.guardianproject.panic.action.TRIGGER"; + public static final String EXTRA_STATE_BUNDLE = "stateBundle"; public static final String LAST_SELECTED_TAB = "lastSelectedTab"; @@ -520,48 +522,52 @@ public abstract class GeckoApp @Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == R.id.quit) { - // Make sure the Guest Browsing notification goes away when we quit. - GuestSession.hideNotification(this); + quitAndClear(); + return true; + } - final SharedPreferences prefs = GeckoSharedPrefs.forProfile(this); - final Set<String> clearSet = - PrefUtils.getStringSet(prefs, ClearOnShutdownPref.PREF, new HashSet<String>()); + return super.onOptionsItemSelected(item); + } - final JSONObject clearObj = new JSONObject(); - for (String clear : clearSet) { - try { - clearObj.put(clear, true); - } catch (JSONException ex) { - Log.e(LOGTAG, "Error adding clear object " + clear, ex); - } - } + private void quitAndClear() { + // Make sure the Guest Browsing notification goes away when we quit. + GuestSession.hideNotification(this); - final JSONObject res = new JSONObject(); - try { - res.put("sanitize", clearObj); - } catch (JSONException ex) { - Log.e(LOGTAG, "Error adding sanitize object", ex); - } + final SharedPreferences prefs = GeckoSharedPrefs.forProfile(this); + final Set<String> clearSet = + PrefUtils.getStringSet(prefs, ClearOnShutdownPref.PREF, new HashSet<String>()); - // If the user has opted out of session restore, and does want to clear history - // we also want to prevent the current session info from being saved. - if (clearObj.has("private.data.history")) { - final String sessionRestore = getSessionRestorePreference(getSharedPreferences()); - try { - res.put("dontSaveSession", "quit".equals(sessionRestore)); - } catch (JSONException ex) { - Log.e(LOGTAG, "Error adding session restore data", ex); - } + final JSONObject clearObj = new JSONObject(); + for (String clear : clearSet) { + try { + clearObj.put(clear, true); + } catch(JSONException ex) { + Log.e(LOGTAG, "Error adding clear object " + clear, ex); } + } - GeckoAppShell.notifyObservers("Browser:Quit", res.toString()); - // We don't call doShutdown() here because this creates a race condition which can - // cause the clearing of private data to fail. Instead, we shut down the UI only after - // we're done sanitizing. - return true; + final JSONObject res = new JSONObject(); + try { + res.put("sanitize", clearObj); + } catch(JSONException ex) { + Log.e(LOGTAG, "Error adding sanitize object", ex); } - return super.onOptionsItemSelected(item); + // If the user has opted out of session restore, and does want to clear history + // we also want to prevent the current session info from being saved. + if (clearObj.has("private.data.history")) { + final String sessionRestore = getSessionRestorePreference(getSharedPreferences()); + try { + res.put("dontSaveSession", "quit".equals(sessionRestore)); + } catch(JSONException ex) { + Log.e(LOGTAG, "Error adding session restore data", ex); + } + } + + GeckoAppShell.notifyObservers("Browser:Quit", res.toString()); + // We don't call doShutdown() here because this creates a race condition which can + // cause the clearing of private data to fail. Instead, we shut down the UI only after + // we're done sanitizing. } @Override @@ -1625,6 +1631,8 @@ public abstract class GeckoApp // Copy extras. settingsIntent.putExtras(intent.getUnsafe()); startActivity(settingsIntent); + } else if (ACTION_PANIC_TRIGGER.equals(action)) { + quitAndClear(); } //app state callbacks
1 0
0 0
[tor-browser/tor-browser-52.7.2esr-8.0-1] Orfox: Strings fix, probably a WONTAPPLY ESR59.
by gk@torproject.org 20 Mar '18

20 Mar '18
commit 6f851d8b0d02fba238dab78d12044f290a8dc8dd Author: Amogh Pradeep <amoghbl1(a)gmail.com> Date: Thu Jun 29 15:37:08 2017 -0700 Orfox: Strings fix, probably a WONTAPPLY ESR59. Signed-off-by: Amogh Pradeep <amoghbl1(a)gmail.com> --- mobile/android/base/strings.xml.in | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mobile/android/base/strings.xml.in b/mobile/android/base/strings.xml.in index ec39107f8f60..adc431789713 100644 --- a/mobile/android/base/strings.xml.in +++ b/mobile/android/base/strings.xml.in @@ -30,10 +30,6 @@ #include ../services/strings.xml.in #include ../orfox/strings.xml.in - <string name="no_space_to_start_error">&no_space_to_start_error;</string> - <string name="error_loading_file">&error_loading_file;</string> - - <string name="firstrun_panel_title_welcome">&firstrun_panel_title_welcome;</string> <string name="firstrun_urlbar_message">&firstrun_urlbar_message;</string>
1 0
0 0
[tor-browser/tor-browser-52.7.2esr-8.0-1] Orfox: remove Tab:Load event queuing and only use Intent queuing
by gk@torproject.org 20 Mar '18

20 Mar '18
commit 274ae1ec2dcacb68e860f7aa1d10a10504877507 Author: Hans-Christoph Steiner <hans(a)eds.org> Date: Fri Sep 18 11:03:18 2015 +0200 Orfox: remove Tab:Load event queuing and only use Intent queuing Tab:Load queuing is too flaky, since the Fennec UI will block waiting for Gecko to confirm that it received the event. For more on this: refs #5530 https://dev.guardianproject.info/issues/5530 https://lists.mayfirst.org/pipermail/guardian-dev/2015-September/004499.html Signed-off-by: Amogh Pradeep <amoghbl1(a)gmail.com> --- mobile/android/base/java/org/mozilla/gecko/BrowserApp.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java index 34f93ee56cdb..8cb69ce011ab 100644 --- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java +++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java @@ -1080,12 +1080,7 @@ public class BrowserApp extends GeckoApp @Override public void onReceive(Context context, Intent intent) { if (TextUtils.equals(intent.getAction(), OrbotHelper.ACTION_STATUS)) { - String status = intent.getStringExtra(OrbotHelper.EXTRA_STATUS); - Tabs.getInstance().setTorStatus(status); - - if (status.equals(OrbotHelper.STATUS_ON)) { - GeckoAppShell.sendPendingUrlIntents(BrowserApp.this); - } + GeckoAppShell.setTorStatus(intent); } } };
1 0
0 0
[tor-browser/tor-browser-52.7.2esr-8.0-1] Orfox: Update orfox branding and icon
by gk@torproject.org 20 Mar '18

20 Mar '18
commit 379d5b66211fc2d28ceceed512aaa7a5c58081cf Author: n8fr8 <nathan(a)freitas.net> Date: Wed Jun 29 13:49:35 2016 -0400 Orfox: Update orfox branding and icon Signed-off-by: Amogh Pradeep <amoghbl1(a)gmail.com> --- mobile/android/branding/orfox/LICENSE.txt | 2 + mobile/android/branding/orfox/content/favicon.png | Bin 0 -> 820 bytes .../android/branding/orfox/content/favicon32.png | Bin 2418 -> 1797 bytes .../android/branding/orfox/content/favicon64.png | Bin 7165 -> 3993 bytes mobile/android/branding/orfox/ic_launcher.zip | Bin 96525 -> 0 bytes mobile/android/branding/orfox/icon.png | Bin 36456 -> 0 bytes mobile/android/branding/orfox/orfox.png | Bin 36456 -> 55962 bytes mobile/android/branding/orfox/orfox.xcf | Bin 267775 -> 0 bytes mobile/android/branding/orfox/orfox_icon_v2.svg | 100 +++++++++++++++++++++ .../branding/orfox/res/drawable-hdpi/icon.png | Bin 8545 -> 3549 bytes .../orfox/res/drawable-hdpi/large_icon.png | Bin 27 -> 9558 bytes .../branding/orfox/res/drawable-mdpi/icon.png | Bin 4332 -> 2577 bytes .../orfox/res/drawable-mdpi/large_icon.png | Bin 26 -> 5878 bytes .../branding/orfox/res/drawable-xhdpi/icon.png | Bin 13454 -> 5878 bytes .../orfox/res/drawable-xhdpi/large_icon.png | Bin 28 -> 13553 bytes .../branding/orfox/res/drawable-xxhdpi/icon.png | Bin 26491 -> 9558 bytes .../orfox/res/drawable-xxhdpi/large_icon.png | Bin 28 -> 13553 bytes .../branding/orfox/res/drawable-xxxhdpi/icon.png | Bin 42959 -> 13553 bytes 18 files changed, 102 insertions(+) diff --git a/mobile/android/branding/orfox/LICENSE.txt b/mobile/android/branding/orfox/LICENSE.txt new file mode 100644 index 000000000000..5edd0bec67a3 --- /dev/null +++ b/mobile/android/branding/orfox/LICENSE.txt @@ -0,0 +1,2 @@ +Fox by Sebastian Blei from the Noun Project +https://thenounproject.com/search/?q=fox&i=4144 diff --git a/mobile/android/branding/orfox/content/favicon.png b/mobile/android/branding/orfox/content/favicon.png new file mode 100644 index 000000000000..6c711b2544e1 Binary files /dev/null and b/mobile/android/branding/orfox/content/favicon.png differ diff --git a/mobile/android/branding/orfox/content/favicon32.png b/mobile/android/branding/orfox/content/favicon32.png index 90d37f997854..0c414d6ca46b 100644 Binary files a/mobile/android/branding/orfox/content/favicon32.png and b/mobile/android/branding/orfox/content/favicon32.png differ diff --git a/mobile/android/branding/orfox/content/favicon64.png b/mobile/android/branding/orfox/content/favicon64.png index a3db8126f5a1..bfc9e05538c6 100644 Binary files a/mobile/android/branding/orfox/content/favicon64.png and b/mobile/android/branding/orfox/content/favicon64.png differ diff --git a/mobile/android/branding/orfox/ic_launcher.zip b/mobile/android/branding/orfox/ic_launcher.zip deleted file mode 100644 index 69601344519e..000000000000 Binary files a/mobile/android/branding/orfox/ic_launcher.zip and /dev/null differ diff --git a/mobile/android/branding/orfox/icon.png b/mobile/android/branding/orfox/icon.png deleted file mode 100644 index 6e0051b95a32..000000000000 Binary files a/mobile/android/branding/orfox/icon.png and /dev/null differ diff --git a/mobile/android/branding/orfox/orfox.png b/mobile/android/branding/orfox/orfox.png index 350edb58d994..6c6d906aa044 100644 Binary files a/mobile/android/branding/orfox/orfox.png and b/mobile/android/branding/orfox/orfox.png differ diff --git a/mobile/android/branding/orfox/orfox.xcf b/mobile/android/branding/orfox/orfox.xcf deleted file mode 100644 index 2a8f829c3c34..000000000000 Binary files a/mobile/android/branding/orfox/orfox.xcf and /dev/null differ diff --git a/mobile/android/branding/orfox/orfox_icon_v2.svg b/mobile/android/branding/orfox/orfox_icon_v2.svg new file mode 100644 index 000000000000..b9f575b6d077 --- /dev/null +++ b/mobile/android/branding/orfox/orfox_icon_v2.svg @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Generator: flash2svg, http://dissentgraphics.com/tools/flash2svg --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + id="Tor" + image-rendering="optimizeSpeed" + version="1.1" + style="background-color:#ffffff" + x="0px" + y="0px" + width="1024px" + height="1024px" + viewBox="0 0 1024 1024" + enable-background="new 0 0 1024 1024" + inkscape:version="0.48.4 r9939" + sodipodi:docname="orfox_icon_v2.svg"> + <metadata + id="metadata3977"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1147" + inkscape:window-height="818" + id="namedview3975" + showgrid="false" + inkscape:zoom="0.23046875" + inkscape:cx="175.88107" + inkscape:cy="513.58454" + inkscape:window-x="363" + inkscape:window-y="132" + inkscape:window-maximized="0" + inkscape:current-layer="Tor" /> + <defs + transform="matrix(1 0 0 1 0 0) " + id="defs3953" /> + <g + id="shadow"> + <g + id="shape"> + <path + id="path" + fill="#000000" + fill-opacity="0.09803921568627451" + d="M969.65,351.3 Q961.05,330.45 950.25,310.45 C946.2,302.9 941.9,295.4 937.35,288.05 917.8,256.35 893.95,226.4 865.8,198.25 773.65,106.1 662.35,60 532,60 401.65,60 290.4,106.1 198.25,198.25 106.1,290.4 60,401.65 60,532 60,662.35 106.1,773.65 198.25,865.8 290.4,957.95 401.65,1004 532,1004 662.35,1004 773.65,957.95 865.8,865.8 916.55,815 953.35,758.4 976.15,696.05 994.7,645.2 1004,590.55 1004,532 1004,487.1 998.55,444.45 987.6,404.05 986.35,399.5 985.05,394.95 983.7,390.45 979.6,377.15 974.9,364.1 969.65,351.3z" /> + </g> + </g> + <g + id="bg"> + <g + id="shape2"> + <path + id="path1" + d="M969.75,394 C968.65,389.65 967.4,385 966.1,380.4 963.6,371.65 960.75,362.8 957.65,354.05 951.2,335.8 943.5,318 934.5,300.4 930.7,293 926.55,285.45 922.2,278 901.9,243.5 876.4,210.8 845.85,180.25 806.9,141.3 764.5,110.55 718.35,87.9 679.05,68.6 636.9,55.35 592.2,48.2 575.95,45.6 559.4,43.8 542.15,42.85 532.45,42.3 522.3,42 512.05,42 502.7,42 493.45,42.25 484.15,42.75 477.45,43.1 470.8,43.55 464.1,44.2 407.25,49.4 354.3,64 305.15,88.2 259.55,110.6 217.25,141.3 178.3,180.25 89.05,269.5 43,376.75 40.2,501.75 Q40.05,507.85 40.05,514 C40.05,644.35 86.15,755.65 178.3,847.8 263.55,933.05 365.15,978.85 483,985.2 483.35,985.25 483.75,985.25 484.15,985.3 484.3,985.3 484.4,985.3 484.55,985.3 493.05,985.75 501.15,986 509.05,986 510.25,986 511.15,986 512.05,986 522.35,986 532.55,985.7 542.15,985.2 544.65,985.05 546.9,984.9 549.1,984.75 569.3,983.3 589,980.7 607.8,977.05 615.75,975.5 623.6,973.75 631.2,971.9 712,951.6 783.35,910.3 845.85,847.8 851.95,841.7 857.85,835.55 863.35,829.5 90 3.2,785.65 933.1,737.9 953.2,686 962.3,662.55 969.35,638.25 974.5,612.95 979.7,587.15 982.8,560.3 983.75,532.5 983.95,526.45 984.05,520.25 984.05,514 984.05,513.35 984.05,512.65 984.05,512 984.05,511.65 984.05,511.35 984.05,511 984.05,507.9 984,504.8 983.95,501.65 983.1,464.45 978.4,428.65 969.75,394z" + fill-opacity="1" + fill="#4F3663" /> + </g> + </g> + <path + inkscape:connector-curvature="0" + d="m 686.21069,582.70555 c -1.93177,-1.97288 -4.58283,-3.08262 -7.34348,-3.08262 -78.07933,0 -82.75807,0 -110.78935,53.47317 -1.58926,3.02781 -1.56871,6.65845 0.0685,9.66572 1.62352,3.00727 4.65133,5.00754 8.06276,5.32951 0.17811,0.0206 4.58283,0.42471 11.24814,0.42471 16.98866,0 48.19846,-2.70585 66.26261,-20.8111 7.14483,-7.16538 11.54955,-15.88577 13.13196,-25.99676 0.66448,-0.0548 1.2947,-0.11645 1.87697,-0.15755 12.16608,-1.03439 20.2083,-1.71942 20.4138,-11.4331 0.0685,-2.76065 -1.00014,-5.43226 -2.93191,-7.41198 z" + id="path4-8" + style="fill:#4f3663;fill-opacity:1" /> + <path + inkscape:connector-curvature="0" + d="m 464.25524,633.0961 c -28.03128,-53.47317 -32.70316,-53.47317 -110.78933,-53.47317 -2.76066,0 -5.41171,1.10974 -7.34349,3.08262 -1.93177,1.97972 -2.99356,4.65133 -2.93191,7.41198 0.20551,9.70683 8.24772,10.39871 20.41379,11.4331 0.57542,0.048 1.21935,0.1096 1.87697,0.15755 1.58926,10.12469 5.99398,18.83138 13.13196,25.99676 18.06415,18.1121 49.26711,20.8111 66.26261,20.8111 0,0 0,0 0,0 6.65846,0 11.05633,-0.41101 11.24129,-0.42471 3.41143,-0.32197 6.42555,-2.32224 8.06276,-5.32951 1.63721,-3.00727 1.66462,-6.63791 0.0754,-9.66572 z" + id="path6-8" + style="fill:#4f3663;fill-opacity:1" /> + <path + inkscape:connector-curvature="0" + d="m 797.15129,217.4905 c -13.59093,-13.58407 -39.06021,-13.17991 -73.6746,1.1577 -62.37168,25.8392 -146.02711,96.09552 -164.02961,170.83877 -14.88562,-1.34265 -30.57958,-2.13728 -47.28053,-2.13728 -16.70779,0 -32.40175,0.79463 -47.28738,2.13728 -18.00249,-74.7501 -101.65793,-145.00642 -164.03644,-170.84562 -34.60754,-14.33076 -60.07683,-14.74177 -73.65405,-1.15085 -23.70192,23.70192 -27.39421,88.48488 -23.35941,136.76556 4.89794,58.54236 20.78371,109.24118 43.34163,139.93721 -2.6305,30.36723 -10.88507,146.02025 12.20717,183.3953 24.93497,40.34806 122.90061,82.19633 149.8838,93.1362 -0.26031,19.11909 0.63023,62.87173 13.22101,80.33991 17.49558,24.27049 67.85188,34.77194 89.68367,34.77194 21.83865,0 72.2018,-10.50145 89.68367,-34.77194 12.60449,-17.47503 13.42652,-61.54963 13.13881,-80.79888 27.0654,-10.86452 125.03105,-52.33602 149.97286,-92.67038 23.09909,-37.37505 14.83767,-153.06232 12.20717,-183.40215 51.76061,-70.63993 59.69321,-236.99177 19.98223,-276.70277 z m -45.0405,2 89.08805 c 1.57556,1.57556 3.56899,2.34964 5.60352,2.69216 3.32923,47.56824 5.55557,131.94295 -10.248,157.50814 -18.14635,29.36709 -92.19772,64.598 -132.54578,81.3332 v -45.42411 c 0,-5.67202 -4.60338,-10.2754 -10.2754,-10.2754 -5.67202,0 -10.2754,4.60338 -10.2754,10.2754 v 58.71362 6.85026 5.61722 c 0,0.30141 0.0685,0.58912 0.0891,0.88369 0.007,24.18828 -2.55515,54.95967 -9.27526,64.28973 -8.48748,11.78246 -34.51164,21.01662 -55.95297,24.60615 10.82342,-10.00138 21.914,-25.61999 21.914,-38.9369 0,-21.53038 -17.44763,-28.80537 -38.97116,-28.80537 -21.52353,0 -38.97801,7.27499 -38.97801,28.80537 0,13.31006 11.12483,28.94237 21.94825,38.9369 -21.44133,-3.57583 -47.48603,-12.81684 -55.98036,-24.60615 -6.68586,-9.27526 -9.29581,-39.62878 -9.35061,-63.59101 0.0685,-0.51377 0.1507,-1.04124 0.1507,-1.58241 v -9.30951 c 0,-0.1233 0,-0.25346 0,-0.37676 0,-0.0274 0,-0.0548 0,-0.0822 V 702.6811 c 0,-5.67202 -4.59653,-10.2754 -10.2754,-10.2754 -5.67887,0 -10.27539,4.60338 -10.27539,10.2754 v 45 .88992 C 369.09881,731.69197 295.02004,696.15965 276.85314,666.77886 261.06328,641.22737 263.28961,556.83896 266.61199,509.26387 c 2.04138,-0.34252 4.03481,-1.1166 5.61037,-2.69216 4.01426,-4.0074 4.01426,-10.52201 0,-14.52941 -24.76371,-24.77056 -42.67715,-76.92163 -47.91075,-139.50565 -4.61023,-55.13094 2.7127,-105.81605 17.40652,-120.51672 5.0966,-5.0966 21.56463,-6.69271 51.26053,5.61036 64.94052,26.901 154.90505,104.52821 154.90505,180.33324 0,5.67887 4.59652,10.2754 10.27539,10.2754 5.67887,0 10.2754,-4.59653 10.2754,-10.2754 0,-2.7127 -0.10275,-5.41856 -0.30141,-8.12441 13.87179,-1.23305 28.5108,-1.93862 44.02665,-1.93862 15.51585,0 30.14802,0.71242 44.02665,1.93862 -0.1918,2.70585 -0.30141,5.41856 -0.30141,8.12441 0,5.67887 4.60338,10.2754 10.2754,10.2754 5.67202,0 10.2754,-4.59653 10.2754,-10.2754 0,-75.79133 89.95768,-153.42539 154.8982,-180.32639 29.67535,-12.29622 46.17764,-10.70696 51.27423,-5.61036 30.9221,30.9221 24.70891,204.80238 -30.50423,260.02237 -4.0074,4.01426 -4.0074,10.51516 0.007,14.52941 z" + id="path8-0" + style="fill:#78af52;fill-opacity:1" /> + <path + style="fill:#eaeace;fill-opacity:1" + d="m 462.6355,852.50032 c -25.77069,-12.9955 -28.86564,-22.7931 -28.93825,-91.6151 0,-31.9291 -1.44541,-60.2368 -3.13674,-62.9059 -1.69202,-2.6691 -6.97357,-4.3018 -11.73656,-3.6283 -8.03262,1.1357 -8.73888,3.0145 -9.73765,25.9062 -1.02891,23.5723 -1.4365,24.5702 -9.07112,22.2012 -27.12363,-8.4164 -99.5049,-51.247 -113.61918,-67.2326 -12.99496,-14.71792 -16.50298,-31.9536 -18.58135,-91.29648 -1.7475,-49.90494 -1.17756,-59.05477 4.46158,-71.56006 l 6.46597,-14.33871 -9.80753,-12.85876 c -24.61506,-32.27133 -38.06076,-80.73449 -40.8858,-147.36496 -2.1503,-50.72751 1.47691,-79.77202 12.07564,-96.67821 17.61272,-28.09519 109.25145,19.60307 166.48816,86.65757 19.39173,22.71836 33.8499,52.43495 38.58275,79.30285 2.3099,13.11449 5.88574,22.11094 9.31019,23.4251 6.36047,2.44068 15.52476,-3.90335 15.52476,-10.7469 0,-7.17572 8.91356,-9.01468 43.69373,-9.01468 24.50819,0 33.33407,1.3321 36.89347,5.56838 12.93604,15.39672 14.24033,16.19402 20.77274,12.69785 4.29238,-2.29703 7.33321,-9.622 56 8.90124,-21.43927 7.43801,-56.07209 69.85078,-126.27005 143.75623,-161.68824 34.77263,-16.66451 55.40769,-17.63067 62.97243,-2.9485 14.5486,28.23645 16.3646,99.39338 4.05125,158.73893 -6.42144,30.94998 -25.57135,76.57336 -35.59535,84.80272 -6.44267,5.28964 -8.24635,20.45647 -2.82984,23.80365 5.43226,3.35745 8.25799,70.79207 4.4513,106.23665 -4.69586,43.72537 -10.81725,55.80167 -38.1135,75.18717 -19.27459,13.6884 -91.89973,52.8459 -98.01291,52.8459 -1.1988,0 -2.20442,-9.3883 -2.23524,-20.8628 -0.0685,-24.7592 -3.22305,-30.9905 -14.86782,-29.344 l -8.66079,1.2246 -1.99548,63.4955 c -1.40567,44.7465 -3.54844,66.619 -7.25648,74.0734 -5.01508,10.0828 -20.47819,20.209 -39.37944,25.7878 l -8.7197,2.5737 7.81273,-12.6413 c 10.08907,-16.3245 9.89246,-28.9182 -0.64393,-41.1665 -11.79615,-13.7141 -42.15105,-16.2806 -60.01585,-5.0744 -11.72012,7.3519 -12.1606,8.4262 -10.50694,25.6369 0.97068,10.0998 4.58625,21.1241 8.26005,25.1834 9.04988,10.0004 0.80901,9.6139 -20.12745,-0.9438 l 0,0 z m -0 .54117,-212.0739 c 1.73038,-12.16224 -22.68122,-47.8041 -36.61124,-53.45392 -13.7889,-5.59235 -75.42484,-10.02722 -82.0922,-5.90671 -8.09633,5.00398 -3.22305,20.04175 6.90438,21.30412 6.46939,0.80641 10.94604,5.1627 15.60901,15.18984 9.89658,21.28049 36.02555,33.23756 69.65624,31.87593 23.0299,-0.93239 25.50422,-1.77264 26.53381,-9.00926 z m 160.69078,5.61187 c 18.85467,-6.39534 32.59082,-17.42337 38.08747,-30.5789 3.66627,-8.77341 7.62229,-12.21744 15.0103,-13.06681 7.09277,-0.81545 10.3624,-3.47302 11.15909,-9.07153 1.84409,-12.95378 -8.67998,-15.58668 -49.62469,-12.41501 -33.35737,2.58385 -38.01144,3.8395 -47.33328,12.77061 -13.73684,13.16073 -29.96306,43.45931 -27.17089,50.73573 2.72983,7.11359 40.65632,8.14353 59.872,1.62591 l 0,0 z" + id="path3787" + inkscape:connector-curvature="0" /> +</svg> diff --git a/mobile/android/branding/orfox/res/drawable-hdpi/icon.png b/mobile/android/branding/orfox/res/drawable-hdpi/icon.png index 30731f03daf6..2a1dc9aea83d 100644 Binary files a/mobile/android/branding/orfox/res/drawable-hdpi/icon.png and b/mobile/android/branding/orfox/res/drawable-hdpi/icon.png differ diff --git a/mobile/android/branding/orfox/res/drawable-hdpi/large_icon.png b/mobile/android/branding/orfox/res/drawable-hdpi/large_icon.png deleted file mode 120000 index fd11ee776429..000000000000 --- a/mobile/android/branding/orfox/res/drawable-hdpi/large_icon.png +++ /dev/null @@ -1 +0,0 @@ -../drawable-xxhdpi/icon.png \ No newline at end of file diff --git a/mobile/android/branding/orfox/res/drawable-hdpi/large_icon.png b/mobile/android/branding/orfox/res/drawable-hdpi/large_icon.png new file mode 100644 index 000000000000..946e03e42d0b Binary files /dev/null and b/mobile/android/branding/orfox/res/drawable-hdpi/large_icon.png differ diff --git a/mobile/android/branding/orfox/res/drawable-mdpi/icon.png b/mobile/android/branding/orfox/res/drawable-mdpi/icon.png index a7d98aa9c771..78ace1c9b6d3 100644 Binary files a/mobile/android/branding/orfox/res/drawable-mdpi/icon.png and b/mobile/android/branding/orfox/res/drawable-mdpi/icon.png differ diff --git a/mobile/android/branding/orfox/res/drawable-mdpi/large_icon.png b/mobile/android/branding/orfox/res/drawable-mdpi/large_icon.png deleted file mode 120000 index 79362e743cd1..000000000000 --- a/mobile/android/branding/orfox/res/drawable-mdpi/large_icon.png +++ /dev/null @@ -1 +0,0 @@ -../drawable-xhdpi/icon.png \ No newline at end of file diff --git a/mobile/android/branding/orfox/res/drawable-mdpi/large_icon.png b/mobile/android/branding/orfox/res/drawable-mdpi/large_icon.png new file mode 100644 index 000000000000..8e45a100870b Binary files /dev/null and b/mobile/android/branding/orfox/res/drawable-mdpi/large_icon.png differ diff --git a/mobile/android/branding/orfox/res/drawable-xhdpi/icon.png b/mobile/android/branding/orfox/res/drawable-xhdpi/icon.png index 155611f2da7d..8e45a100870b 100644 Binary files a/mobile/android/branding/orfox/res/drawable-xhdpi/icon.png and b/mobile/android/branding/orfox/res/drawable-xhdpi/icon.png differ diff --git a/mobile/android/branding/orfox/res/drawable-xhdpi/large_icon.png b/mobile/android/branding/orfox/res/drawable-xhdpi/large_icon.png deleted file mode 120000 index 17528430e69f..000000000000 --- a/mobile/android/branding/orfox/res/drawable-xhdpi/large_icon.png +++ /dev/null @@ -1 +0,0 @@ -../drawable-xxxhdpi/icon.png \ No newline at end of file diff --git a/mobile/android/branding/orfox/res/drawable-xhdpi/large_icon.png b/mobile/android/branding/orfox/res/drawable-xhdpi/large_icon.png new file mode 100644 index 000000000000..d3a4929e7503 Binary files /dev/null and b/mobile/android/branding/orfox/res/drawable-xhdpi/large_icon.png differ diff --git a/mobile/android/branding/orfox/res/drawable-xxhdpi/icon.png b/mobile/android/branding/orfox/res/drawable-xxhdpi/icon.png index 8e6e60311f8f..946e03e42d0b 100644 Binary files a/mobile/android/branding/orfox/res/drawable-xxhdpi/icon.png and b/mobile/android/branding/orfox/res/drawable-xxhdpi/icon.png differ diff --git a/mobile/android/branding/orfox/res/drawable-xxhdpi/large_icon.png b/mobile/android/branding/orfox/res/drawable-xxhdpi/large_icon.png deleted file mode 120000 index 17528430e69f..000000000000 --- a/mobile/android/branding/orfox/res/drawable-xxhdpi/large_icon.png +++ /dev/null @@ -1 +0,0 @@ -../drawable-xxxhdpi/icon.png \ No newline at end of file diff --git a/mobile/android/branding/orfox/res/drawable-xxhdpi/large_icon.png b/mobile/android/branding/orfox/res/drawable-xxhdpi/large_icon.png new file mode 100644 index 000000000000..d3a4929e7503 Binary files /dev/null and b/mobile/android/branding/orfox/res/drawable-xxhdpi/large_icon.png differ diff --git a/mobile/android/branding/orfox/res/drawable-xxxhdpi/icon.png b/mobile/android/branding/orfox/res/drawable-xxxhdpi/icon.png index 9c4820ce6729..d3a4929e7503 100644 Binary files a/mobile/android/branding/orfox/res/drawable-xxxhdpi/icon.png and b/mobile/android/branding/orfox/res/drawable-xxxhdpi/icon.png differ
1 0
0 0
[tor-browser/tor-browser-52.7.2esr-8.0-1] Orfox: NetCipher enabled, checks if orbot is installed
by gk@torproject.org 20 Mar '18

20 Mar '18
commit 67aca67cc7b0802f19024ad39f3d70733a47ce49 Author: Amogh Pradeep <amoghbl1(a)gmail.com> Date: Mon Jul 20 21:46:25 2015 -0400 Orfox: NetCipher enabled, checks if orbot is installed Signed-off-by: Amogh Pradeep <amoghbl1(a)gmail.com> --- .../base/java/org/mozilla/gecko/BrowserApp.java | 32 ++- mobile/android/base/moz.build | 6 + mobile/android/base/strings.xml.in | 5 + .../netcipher/proxy/OrbotHelper.java | 186 ++++++++++++++++ .../netcipher/proxy/TorServiceUtils.java | 233 +++++++++++++++++++++ mobile/android/orfox/strings.xml.in | 5 + 6 files changed, 462 insertions(+), 5 deletions(-) diff --git a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java index 9023618669ef..a532b454a263 100644 --- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java +++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java @@ -174,6 +174,8 @@ import android.animation.ObjectAnimator; import org.json.JSONException; import org.json.JSONObject; +import info.guardianproject.netcipher.proxy.OrbotHelper; + import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileNotFoundException; @@ -1068,6 +1070,30 @@ public class BrowserApp extends GeckoApp } } + public void checkStartOrbot() { + if (!OrbotHelper.isOrbotInstalled(this)) { + final Intent intent = OrbotHelper.getOrbotInstallIntent(this); + + AlertDialog.Builder builder = new AlertDialog.Builder(this); + builder.setTitle(R.string.install_orbot); + builder.setMessage(R.string.you_must_have_orbot); + builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialogInterface, int i) { + startActivity(intent); + } + }); + builder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialogInterface, int i) { + } + }); + builder.show(); + } else { + OrbotHelper.requestStartTor(this); + } + } + @Override public void onResume() { super.onResume(); @@ -1076,11 +1102,7 @@ public class BrowserApp extends GeckoApp return; } - if (!mHasResumed) { - EventDispatcher.getInstance().unregisterGeckoThreadListener((GeckoEventListener) this, - "Prompt:ShowTop"); - mHasResumed = true; - } + checkStartOrbot(); processTabQueue(); diff --git a/mobile/android/base/moz.build b/mobile/android/base/moz.build index 6c88464ab521..4dbb1c25fdab 100644 --- a/mobile/android/base/moz.build +++ b/mobile/android/base/moz.build @@ -12,6 +12,7 @@ include('android-services.mozbuild') geckoview_source_dir = TOPSRCDIR + '/mobile/android/geckoview/src/main/' geckoview_thirdparty_source_dir = TOPSRCDIR + '/mobile/android/geckoview/src/thirdparty/' +geckoview_netcipher_source_dir = TOPSRCDIR + '/mobile/android/geckoview/src/thirdparty/java/info/guardianproject/netcipher/proxy/' thirdparty_source_dir = TOPSRCDIR + '/mobile/android/thirdparty/' constants_jar = add_java_jar('constants') @@ -289,6 +290,11 @@ gvjar.sources += [geckoview_thirdparty_source_dir + f for f in [ 'java/com/googlecode/eyesfree/braille/selfbraille/WriteData.java', ]] +gvjar.sources += [geckoview_netcipher_source_dir + f for f in [ + 'OrbotHelper.java', + 'TorServiceUtils.java', +]] + gvjar.extra_jars += [ CONFIG['ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB'], CONFIG['ANDROID_SUPPORT_V4_AAR_LIB'], diff --git a/mobile/android/base/strings.xml.in b/mobile/android/base/strings.xml.in index 3511a4eca644..ec39107f8f60 100644 --- a/mobile/android/base/strings.xml.in +++ b/mobile/android/base/strings.xml.in @@ -28,6 +28,11 @@ #include ../search/strings/search_strings.xml.in #include ../services/strings.xml.in +#include ../orfox/strings.xml.in + + <string name="no_space_to_start_error">&no_space_to_start_error;</string> + <string name="error_loading_file">&error_loading_file;</string> + <string name="firstrun_panel_title_welcome">&firstrun_panel_title_welcome;</string> diff --git a/mobile/android/geckoview/src/thirdparty/java/info/guardianproject/netcipher/proxy/OrbotHelper.java b/mobile/android/geckoview/src/thirdparty/java/info/guardianproject/netcipher/proxy/OrbotHelper.java new file mode 100644 index 000000000000..d6a632fda37d --- /dev/null +++ b/mobile/android/geckoview/src/thirdparty/java/info/guardianproject/netcipher/proxy/OrbotHelper.java @@ -0,0 +1,186 @@ + +package info.guardianproject.netcipher.proxy; + +import android.app.Activity; +import android.content.Context; +import android.content.Intent; +import android.content.pm.PackageManager; +import android.content.pm.ResolveInfo; +import android.net.Uri; +import android.text.TextUtils; +import android.util.Log; + + +import java.util.List; + +public class OrbotHelper { + + private final static int REQUEST_CODE_STATUS = 100; + + public final static String ORBOT_PACKAGE_NAME = "org.torproject.android"; + public final static String ORBOT_MARKET_URI = "market://details?id=" + ORBOT_PACKAGE_NAME; + public final static String ORBOT_FDROID_URI = "https://f-droid.org/repository/browse/?fdid=" + + ORBOT_PACKAGE_NAME; + public final static String ORBOT_PLAY_URI = "https://play.google.com/store/apps/details?id=" + + ORBOT_PACKAGE_NAME; + + /** + * A request to Orbot to transparently start Tor services + */ + public final static String ACTION_START = "org.torproject.android.intent.action.START"; + /** + * {@link Intent} send by Orbot with {@code ON/OFF/STARTING/STOPPING} status + */ + public final static String ACTION_STATUS = "org.torproject.android.intent.action.STATUS"; + /** + * {@code String} that contains a status constant: {@link #STATUS_ON}, + * {@link #STATUS_OFF}, {@link #STATUS_STARTING}, or + * {@link #STATUS_STOPPING} + */ + public final static String EXTRA_STATUS = "org.torproject.android.intent.extra.STATUS"; + /** + * A {@link String} {@code packageName} for Orbot to direct its status reply + * to, used in {@link #ACTION_START} {@link Intent}s sent to Orbot + */ + public final static String EXTRA_PACKAGE_NAME = "org.torproject.android.intent.extra.PACKAGE_NAME"; + + /** + * All tor-related services and daemons are stopped + */ + public final static String STATUS_OFF = "OFF"; + /** + * All tor-related services and daemons have completed starting + */ + public final static String STATUS_ON = "ON"; + public final static String STATUS_STARTING = "STARTING"; + public final static String STATUS_STOPPING = "STOPPING"; + /** + * The user has disabled the ability for background starts triggered by + * apps. Fallback to the old Intent that brings up Orbot. + */ + public final static String STATUS_STARTS_DISABLED = "STARTS_DISABLED"; + + public final static String ACTION_START_TOR = "org.torproject.android.START_TOR"; + public final static String ACTION_REQUEST_HS = "org.torproject.android.REQUEST_HS_PORT"; + public final static int START_TOR_RESULT = 0x048079234; + public final static int HS_REQUEST_CODE = 9999; + + private final static String FDROID_PACKAGE_NAME = "org.fdroid.fdroid"; + private final static String PLAY_PACKAGE_NAME = "com.android.vending"; + + private OrbotHelper() { + // only static utility methods, do not instantiate + } + + public static boolean isOrbotRunning(Context context) { + int procId = TorServiceUtils.findProcessId(context); + + return (procId != -1); + } + + public static boolean isOrbotInstalled(Context context) { + return isAppInstalled(context, ORBOT_PACKAGE_NAME); + } + + private static boolean isAppInstalled(Context context, String uri) { + try { + PackageManager pm = context.getPackageManager(); + pm.getPackageInfo(uri, PackageManager.GET_ACTIVITIES); + return true; + } catch (PackageManager.NameNotFoundException e) { + return false; + } + } + + public static void requestHiddenServiceOnPort(Activity activity, int port) { + Intent intent = new Intent(ACTION_REQUEST_HS); + intent.setPackage(ORBOT_PACKAGE_NAME); + intent.putExtra("hs_port", port); + + activity.startActivityForResult(intent, HS_REQUEST_CODE); + } + + /** + * First, checks whether Orbot is installed. If Orbot is installed, then a + * broadcast {@link Intent} is sent to request Orbot to start transparently + * in the background. When Orbot receives this {@code Intent}, it will + * immediately reply to this all with its status via an + * {@link #ACTION_STATUS} {@code Intent} that is broadcast to the + * {@code packageName} of the provided {@link Context} (i.e. + * {@link Context#getPackageName()}. + * + * @param context the app {@link Context} will receive the reply + * @return whether the start request was sent to Orbot + */ + public static boolean requestStartTor(Context context) { + if (OrbotHelper.isOrbotInstalled(context)) { + Log.i("OrbotHelper", "requestStartTor " + context.getPackageName()); + Intent intent = getOrbotStartIntent(); + intent.putExtra(EXTRA_PACKAGE_NAME, context.getPackageName()); + context.sendBroadcast(intent); + return true; + } + return false; + } + + public static Intent getOrbotStartIntent() { + Intent intent = new Intent(ACTION_START); + intent.setPackage(ORBOT_PACKAGE_NAME); + return intent; + } + + /** + * First, checks whether Orbot is installed, then checks whether Orbot is + * running. If Orbot is installed and not running, then an {@link Intent} is + * sent to request Orbot to start, which will show the main Orbot screen. + * The result will be returned in + * {@link Activity#onActivityResult(int requestCode, int resultCode, Intent data)} + * with a {@code requestCode} of {@link START_TOR_RESULT} + * + * @param activity the {@link Activity} that gets the + * {@code START_TOR_RESULT} result + * @return whether the start request was sent to Orbot + */ + public static boolean requestShowOrbotStart(Activity activity) { + if (OrbotHelper.isOrbotInstalled(activity)) { + if (!OrbotHelper.isOrbotRunning(activity)) { + Intent intent = getShowOrbotStartIntent(); + activity.startActivityForResult(intent, START_TOR_RESULT); + return true; + } + } + return false; + } + + public static Intent getShowOrbotStartIntent() { + Intent intent = new Intent(ACTION_START_TOR); + intent.setPackage(ORBOT_PACKAGE_NAME); + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + return intent; + } + + public static Intent getOrbotInstallIntent(Context context) { + final Intent intent = new Intent(Intent.ACTION_VIEW); + intent.setData(Uri.parse(ORBOT_MARKET_URI)); + + PackageManager pm = context.getPackageManager(); + List<ResolveInfo> resInfos = pm.queryIntentActivities(intent, 0); + + String foundPackageName = null; + for (ResolveInfo r : resInfos) { + Log.i("OrbotHelper", "market: " + r.activityInfo.packageName); + if (TextUtils.equals(r.activityInfo.packageName, FDROID_PACKAGE_NAME) + || TextUtils.equals(r.activityInfo.packageName, PLAY_PACKAGE_NAME)) { + foundPackageName = r.activityInfo.packageName; + break; + } + } + + if (foundPackageName == null) { + intent.setData(Uri.parse(ORBOT_FDROID_URI)); + } else { + intent.setPackage(foundPackageName); + } + return intent; + } +} diff --git a/mobile/android/geckoview/src/thirdparty/java/info/guardianproject/netcipher/proxy/TorServiceUtils.java b/mobile/android/geckoview/src/thirdparty/java/info/guardianproject/netcipher/proxy/TorServiceUtils.java new file mode 100644 index 000000000000..e553ecac3543 --- /dev/null +++ b/mobile/android/geckoview/src/thirdparty/java/info/guardianproject/netcipher/proxy/TorServiceUtils.java @@ -0,0 +1,233 @@ +/* Copyright (c) 2009, Nathan Freitas, Orbot / The Guardian Project - http://openideals.com/guardian */ +/* See LICENSE for licensing information */ + +package info.guardianproject.netcipher.proxy; + +import android.content.Context; +import android.util.Log; + + +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.net.URLEncoder; +import java.util.StringTokenizer; + +public class TorServiceUtils { + + private final static String TAG = "TorUtils"; + // various console cmds + public final static String SHELL_CMD_CHMOD = "chmod"; + public final static String SHELL_CMD_KILL = "kill -9"; + public final static String SHELL_CMD_RM = "rm"; + public final static String SHELL_CMD_PS = "ps"; + public final static String SHELL_CMD_PIDOF = "pidof"; + + public final static String CHMOD_EXE_VALUE = "700"; + + public static boolean isRootPossible() + { + + StringBuilder log = new StringBuilder(); + + try { + + // Check if Superuser.apk exists + File fileSU = new File("/system/app/Superuser.apk"); + if (fileSU.exists()) + return true; + + fileSU = new File("/system/app/superuser.apk"); + if (fileSU.exists()) + return true; + + fileSU = new File("/system/bin/su"); + if (fileSU.exists()) + { + String[] cmd = { + "su" + }; + int exitCode = TorServiceUtils.doShellCommand(cmd, log, false, true); + if (exitCode != 0) + return false; + else + return true; + } + + // Check for 'su' binary + String[] cmd = { + "which su" + }; + int exitCode = TorServiceUtils.doShellCommand(cmd, log, false, true); + + if (exitCode == 0) { + Log.d(TAG, "root exists, but not sure about permissions"); + return true; + + } + + } catch (IOException e) { + // this means that there is no root to be had (normally) so we won't + // log anything + Log.e(TAG, "Error checking for root access", e); + + } catch (Exception e) { + Log.e(TAG, "Error checking for root access", e); + // this means that there is no root to be had (normally) + } + + Log.e(TAG, "Could not acquire root permissions"); + + return false; + } + + public static int findProcessId(Context context) { + String dataPath = context.getFilesDir().getParentFile().getParentFile().getAbsolutePath(); + String command = dataPath + "/" + OrbotHelper.ORBOT_PACKAGE_NAME + "/app_bin/tor"; + int procId = -1; + + try { + procId = findProcessIdWithPidOf(command); + + if (procId == -1) + procId = findProcessIdWithPS(command); + } catch (Exception e) { + try { + procId = findProcessIdWithPS(command); + } catch (Exception e2) { + Log.e(TAG, "Unable to get proc id for command: " + URLEncoder.encode(command), e2); + } + } + + return procId; + } + + // use 'pidof' command + public static int findProcessIdWithPidOf(String command) throws Exception + { + + int procId = -1; + + Runtime r = Runtime.getRuntime(); + + Process procPs = null; + + String baseName = new File(command).getName(); + // fix contributed my mikos on 2010.12.10 + procPs = r.exec(new String[] { + SHELL_CMD_PIDOF, baseName + }); + // procPs = r.exec(SHELL_CMD_PIDOF); + + BufferedReader reader = new BufferedReader(new InputStreamReader(procPs.getInputStream())); + String line = null; + + while ((line = reader.readLine()) != null) + { + + try + { + // this line should just be the process id + procId = Integer.parseInt(line.trim()); + break; + } catch (NumberFormatException e) + { + Log.e("TorServiceUtils", "unable to parse process pid: " + line, e); + } + } + + return procId; + + } + + // use 'ps' command + public static int findProcessIdWithPS(String command) throws Exception + { + + int procId = -1; + + Runtime r = Runtime.getRuntime(); + + Process procPs = null; + + procPs = r.exec(SHELL_CMD_PS); + + BufferedReader reader = new BufferedReader(new InputStreamReader(procPs.getInputStream())); + String line = null; + + while ((line = reader.readLine()) != null) + { + if (line.indexOf(' ' + command) != -1) + { + + StringTokenizer st = new StringTokenizer(line, " "); + st.nextToken(); // proc owner + + procId = Integer.parseInt(st.nextToken().trim()); + + break; + } + } + + return procId; + + } + + public static int doShellCommand(String[] cmds, StringBuilder log, boolean runAsRoot, + boolean waitFor) throws Exception + { + + Process proc = null; + int exitCode = -1; + + if (runAsRoot) + proc = Runtime.getRuntime().exec("su"); + else + proc = Runtime.getRuntime().exec("sh"); + + OutputStreamWriter out = new OutputStreamWriter(proc.getOutputStream()); + + for (int i = 0; i < cmds.length; i++) + { + // TorService.logMessage("executing shell cmd: " + cmds[i] + + // "; runAsRoot=" + runAsRoot + ";waitFor=" + waitFor); + + out.write(cmds[i]); + out.write("\n"); + } + + out.flush(); + out.write("exit\n"); + out.flush(); + + if (waitFor) + { + + final char buf[] = new char[10]; + + // Consume the "stdout" + InputStreamReader reader = new InputStreamReader(proc.getInputStream()); + int read = 0; + while ((read = reader.read(buf)) != -1) { + if (log != null) + log.append(buf, 0, read); + } + + // Consume the "stderr" + reader = new InputStreamReader(proc.getErrorStream()); + read = 0; + while ((read = reader.read(buf)) != -1) { + if (log != null) + log.append(buf, 0, read); + } + + exitCode = proc.waitFor(); + + } + + return exitCode; + + } +} diff --git a/mobile/android/orfox/strings.xml.in b/mobile/android/orfox/strings.xml.in new file mode 100644 index 000000000000..e3a22974ed78 --- /dev/null +++ b/mobile/android/orfox/strings.xml.in @@ -0,0 +1,5 @@ +<!-- NetCipher Integration Strings, used for dialog --> + <string name="install_orbot">Install Orbot?</string> + <string name="you_must_have_orbot">You must have Orbot installed and activated to proxy traffic through it. Would you like to download it?</string> + <string name="yes">Yes</string> + <string name="no">No</string>
1 0
0 0
[tor-browser/tor-browser-52.7.2esr-8.0-1] Orfox: quit button added, functionality changed to bring it up to date with current GeckoApp.java class, earlier version seemed to have problems with quitting
by gk@torproject.org 20 Mar '18

20 Mar '18
commit 25f95adb4015299cee5c6c8a14c3f3c849e7ad22 Author: Amogh Pradeep <amoghbl1(a)gmail.com> Date: Fri Jul 17 17:01:09 2015 -0400 Orfox: quit button added, functionality changed to bring it up to date with current GeckoApp.java class, earlier version seemed to have problems with quitting Signed-off-by: Amogh Pradeep <amoghbl1(a)gmail.com> --- mobile/android/base/java/org/mozilla/gecko/BrowserApp.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java index 5eddca3cf726..9023618669ef 100644 --- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java +++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java @@ -3428,7 +3428,7 @@ public class BrowserApp extends GeckoApp !PrefUtils.getStringSet(GeckoSharedPrefs.forProfile(this), ClearOnShutdownPref.PREF, new HashSet<String>()).isEmpty(); - aMenu.findItem(R.id.quit).setVisible(visible); + aMenu.findItem(R.id.quit).setVisible(true); // If tab data is unavailable we disable most of the context menu and related items and // return early.
1 0
0 0
[tor-browser/tor-browser-52.7.2esr-8.0-1] Orfox: top sites changed, used bookmarks icon temporarily.
by gk@torproject.org 20 Mar '18

20 Mar '18
commit 65346d3b1e0aa0ef706a80b8860882121b6335d4 Author: Amogh Pradeep <amoghbl1(a)gmail.com> Date: Thu Jun 18 04:14:18 2015 -0400 Orfox: top sites changed, used bookmarks icon temporarily. Signed-off-by: Amogh Pradeep <amoghbl1(a)gmail.com> --- .../drawable-hdpi/suggestedsites_checktor.png | Bin 0 -> 1286 bytes .../suggestedsites_guardianproject.png | Bin 0 -> 1286 bytes .../drawable-hdpi/suggestedsites_torproject.png | Bin 0 -> 1286 bytes .../drawable-mdpi/suggestedsites_checktor.png | Bin 0 -> 950 bytes .../drawable-mdpi/suggestedsites_facebook.png | Bin 0 -> 950 bytes .../suggestedsites_guardianproject.png | Bin 0 -> 950 bytes .../drawable-mdpi/suggestedsites_torproject.png | Bin 0 -> 950 bytes .../drawable-xhdpi/suggestedsites_checktor.png | Bin 0 -> 1626 bytes .../suggestedsites_guardianproject.png | Bin 0 -> 1626 bytes .../drawable-xhdpi/suggestedsites_torproject.png | Bin 0 -> 1626 bytes .../drawable-xxhdpi/suggestedsites_checktor.png | Bin 0 -> 1626 bytes .../suggestedsites_guardianproject.png | Bin 0 -> 1626 bytes .../drawable-xxhdpi/suggestedsites_torproject.png | Bin 0 -> 1626 bytes mobile/locales/en-US/chrome/region.properties | 71 +++++++-------------- 14 files changed, 24 insertions(+), 47 deletions(-) diff --git a/mobile/android/base/resources/drawable-hdpi/suggestedsites_checktor.png b/mobile/android/base/resources/drawable-hdpi/suggestedsites_checktor.png new file mode 100644 index 000000000000..a87c16e3d566 Binary files /dev/null and b/mobile/android/base/resources/drawable-hdpi/suggestedsites_checktor.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/suggestedsites_guardianproject.png b/mobile/android/base/resources/drawable-hdpi/suggestedsites_guardianproject.png new file mode 100644 index 000000000000..a87c16e3d566 Binary files /dev/null and b/mobile/android/base/resources/drawable-hdpi/suggestedsites_guardianproject.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/suggestedsites_torproject.png b/mobile/android/base/resources/drawable-hdpi/suggestedsites_torproject.png new file mode 100644 index 000000000000..a87c16e3d566 Binary files /dev/null and b/mobile/android/base/resources/drawable-hdpi/suggestedsites_torproject.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/suggestedsites_checktor.png b/mobile/android/base/resources/drawable-mdpi/suggestedsites_checktor.png new file mode 100644 index 000000000000..c20ab864297a Binary files /dev/null and b/mobile/android/base/resources/drawable-mdpi/suggestedsites_checktor.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/suggestedsites_facebook.png b/mobile/android/base/resources/drawable-mdpi/suggestedsites_facebook.png new file mode 100644 index 000000000000..c20ab864297a Binary files /dev/null and b/mobile/android/base/resources/drawable-mdpi/suggestedsites_facebook.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/suggestedsites_guardianproject.png b/mobile/android/base/resources/drawable-mdpi/suggestedsites_guardianproject.png new file mode 100644 index 000000000000..c20ab864297a Binary files /dev/null and b/mobile/android/base/resources/drawable-mdpi/suggestedsites_guardianproject.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/suggestedsites_torproject.png b/mobile/android/base/resources/drawable-mdpi/suggestedsites_torproject.png new file mode 100644 index 000000000000..c20ab864297a Binary files /dev/null and b/mobile/android/base/resources/drawable-mdpi/suggestedsites_torproject.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/suggestedsites_checktor.png b/mobile/android/base/resources/drawable-xhdpi/suggestedsites_checktor.png new file mode 100644 index 000000000000..fa7f676310df Binary files /dev/null and b/mobile/android/base/resources/drawable-xhdpi/suggestedsites_checktor.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/suggestedsites_guardianproject.png b/mobile/android/base/resources/drawable-xhdpi/suggestedsites_guardianproject.png new file mode 100644 index 000000000000..fa7f676310df Binary files /dev/null and b/mobile/android/base/resources/drawable-xhdpi/suggestedsites_guardianproject.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/suggestedsites_torproject.png b/mobile/android/base/resources/drawable-xhdpi/suggestedsites_torproject.png new file mode 100644 index 000000000000..fa7f676310df Binary files /dev/null and b/mobile/android/base/resources/drawable-xhdpi/suggestedsites_torproject.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/suggestedsites_checktor.png b/mobile/android/base/resources/drawable-xxhdpi/suggestedsites_checktor.png new file mode 100644 index 000000000000..fa7f676310df Binary files /dev/null and b/mobile/android/base/resources/drawable-xxhdpi/suggestedsites_checktor.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/suggestedsites_guardianproject.png b/mobile/android/base/resources/drawable-xxhdpi/suggestedsites_guardianproject.png new file mode 100644 index 000000000000..fa7f676310df Binary files /dev/null and b/mobile/android/base/resources/drawable-xxhdpi/suggestedsites_guardianproject.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/suggestedsites_torproject.png b/mobile/android/base/resources/drawable-xxhdpi/suggestedsites_torproject.png new file mode 100644 index 000000000000..fa7f676310df Binary files /dev/null and b/mobile/android/base/resources/drawable-xxhdpi/suggestedsites_torproject.png differ diff --git a/mobile/locales/en-US/chrome/region.properties b/mobile/locales/en-US/chrome/region.properties index 6d89a6f0fe75..201152118819 100644 --- a/mobile/locales/en-US/chrome/region.properties +++ b/mobile/locales/en-US/chrome/region.properties @@ -46,51 +46,28 @@ browser.contentHandlers.types.0.uri=https://add.my.yahoo.com/rss?url=%s # browser.suggestedsites.NAME.title=Displayed name # browser.suggestedsites.NAME.url=Website URL # browser.suggestedsites.NAME.bgcolor= Color (hex format) -# -# Note that if you remove or add items to this set, you need to adjust -# mobile/android/tests/browser/robocop/testDistribution.java -# to reflect the new set of IDs reported as tiles data. -# -browser.suggestedsites.list.0=facebook -browser.suggestedsites.list.1=youtube -browser.suggestedsites.list.2=amazon -browser.suggestedsites.list.3=wikipedia -browser.suggestedsites.list.4=twitter -browser.suggestedsites.facebook.title=Facebook -browser.suggestedsites.facebook.url=https://m.facebook.com/ -browser.suggestedsites.facebook.bgcolor=#385185 - -browser.suggestedsites.youtube.title=YouTube -browser.suggestedsites.youtube.url=https://m.youtube.com/ -browser.suggestedsites.youtube.bgcolor=#cd201f - -browser.suggestedsites.amazon.title=Amazon -browser.suggestedsites.amazon.url=https://www.amazon.com/ -browser.suggestedsites.amazon.bgcolor=#000000 - -browser.suggestedsites.wikipedia.title=Wikipedia -browser.suggestedsites.wikipedia.url=https://www.wikipedia.org/ -browser.suggestedsites.wikipedia.bgcolor=#000000 - -browser.suggestedsites.twitter.title=Twitter -browser.suggestedsites.twitter.url=https://mobile.twitter.com/ -browser.suggestedsites.twitter.bgcolor=#55acee - -browser.suggestedsites.restricted.list.0=restricted_fxsupport -browser.suggestedsites.restricted.list.1=webmaker -browser.suggestedsites.restricted.list.2=restricted_mozilla - -browser.suggestedsites.restricted_fxsupport.title=Firefox Help and Support for restricted profiles on Android tablets -browser.suggestedsites.restricted_fxsupport.url=https://support.mozilla.org/kb/controlledaccess -browser.suggestedsites.restricted_fxsupport.bgcolor=#f37c00 - -browser.suggestedsites.webmaker.title=Learn the Web: Mozilla Webmaker -browser.suggestedsites.webmaker.url=https://webmaker.org/ -browser.suggestedsites.webmaker.bgcolor=#f37c00 - -# LOCALIZATION NOTE: browser.suggestedsites.restricted_mozilla.url must be different from browser.suggestedsites.mozilla.url -browser.suggestedsites.restricted_mozilla.title=The Mozilla Project -browser.suggestedsites.restricted_mozilla.url=https://www.mozilla.org -browser.suggestedsites.restricted_mozilla.bgcolor=#ce4e41 -browser.suggestedsites.restricted_mozilla.trackingid=632 +browser.suggestedsites.list.0=checktor +browser.suggestedsites.list.1=torproject +browser.suggestedsites.list.2=guardianproject +browser.suggestedsites.list.3=facebook + +browser.suggestedsites.checktor.title=Check Tor Connection +browser.suggestedsites.checktor.url=https://check.torproject.org/ +browser.suggestedsites.checktor.bgcolor=#ffecf0f3 +browser.suggestedsites.checktor.trackingid=632 + +browser.suggestedsites.torproject.title=The Tor Project +browser.suggestedsites.torproject.url=https://www.torproject.org/ +browser.suggestedsites.torproject.bgcolor=#ffecf0f3 +browser.suggestedsites.torproject.trackingid=629 + +browser.suggestedsites.guardianproject.title=The Guardian Project +browser.suggestedsites.guardianproject.url=https://guardianproject.info/ +browser.suggestedsites.guardianproject.bgcolor=#ffecf0f3 +browser.suggestedsites.guardianproject.trackingid=630 + +browser.suggestedsites.facebook.title=Facebook Hidden Service +browser.suggestedsites.facebook.url=https://facebookcorewwwi.onion +browser.suggestedsites.facebook.bgcolor=#ffecf0f3 +browser.suggestedsites.facebook.trackingid=631
1 0
0 0
[tor-browser/tor-browser-52.7.2esr-8.0-1] Orfox: Added tbb prefs to mobile.js Bug #5404 - We need a mobile friendly user-agent. Moving back to the default user-agent used by the esr38 build
by gk@torproject.org 20 Mar '18

20 Mar '18
commit 908389c3fdbcd76ec7e2f6f4b57741253e9757a6 Author: Amogh Pradeep <amoghbl1(a)gmail.com> Date: Thu Jun 11 09:43:09 2015 -0400 Orfox: Added tbb prefs to mobile.js Bug #5404 - We need a mobile friendly user-agent. Moving back to the default user-agent used by the esr38 build Signed-off-by: Amogh Pradeep <amoghbl1(a)gmail.com> --- mobile/android/app/mobile.js | 226 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 216 insertions(+), 10 deletions(-) diff --git a/mobile/android/app/mobile.js b/mobile/android/app/mobile.js index 2a64297c4bbe..437177a67250 100644 --- a/mobile/android/app/mobile.js +++ b/mobile/android/app/mobile.js @@ -905,16 +905,222 @@ pref("identity.fxaccounts.remote.oauth.uri", "https://oauth.accounts.firefox.com // Token server used by Firefox Account-authenticated Sync. pref("identity.sync.tokenserver.uri", "https://token.services.mozilla.com/1.0/sync/1.5"); -// Enable Presentation API -pref("dom.presentation.enabled", false); -pref("dom.presentation.discovery.enabled", true); -pref("dom.presentation.discovery.legacy.enabled", true); // for TV 2.5 backward capability +# Default Preferences +# Tor Browser Bundle +# Do not edit this file. -pref("dom.audiochannel.audioCompeting", true); -pref("dom.audiochannel.mediaControl", true); +// Please maintain unit tests at ./tbb-tests/browser_tor_TB4.js -// Space separated list of URLS that are allowed to send objects (instead of -// only strings) through webchannels. This list is duplicated in browser/app/profile/firefox.js -pref("webchannel.allowObject.urlWhitelist", "https://accounts.firefox.com https://content.cdn.mozilla.net https://input.mozilla.org https://support.mozilla.org https://install.mozilla.org"); +// Disable browser auto updaters and associated homepage notifications +pref("app.update.auto", false); +pref("app.update.enabled", false); +pref("browser.search.update", false); +pref("browser.rights.3.shown", true); +pref("browser.startup.homepage_override.mstone", "ignore"); +pref("startup.homepage_welcome_url", ""); +pref("startup.homepage_override_url", ""); + +// Disable "Slow startup" warnings and associated disk history +// (bug #13346) +pref("browser.slowStartup.notificationDisabled", true); +pref("browser.slowStartup.maxSamples", 0); +pref("browser.slowStartup.samples", 0); + +// Disk activity: Disable Browsing History Storage +pref("browser.privatebrowsing.autostart", true); +pref("browser.cache.disk.enable", false); +pref("browser.cache.offline.enable", false); +pref("dom.indexedDB.enabled", false); +pref("permissions.memory_only", true); +pref("network.cookie.lifetimePolicy", 2); +pref("browser.download.manager.retention", 1); +pref("security.nocertdb", true); + +// Disk activity: TBB Directory Isolation +pref("browser.download.useDownloadDir", false); +pref("browser.shell.checkDefaultBrowser", false); +pref("browser.download.manager.addToRecentDocs", false); + +// Misc privacy: Disk +pref("signon.rememberSignons", false); +pref("browser.formfill.enable", false); +pref("signon.autofillForms", false); +pref("browser.sessionstore.privacy_level", 2); +pref("media.cache_size", 0); + +// Misc privacy: Remote +pref("browser.send_pings", false); +pref("geo.enabled", false); +pref("geo.wifi.uri", ""); +pref("browser.search.suggest.enabled", false); +pref("browser.safebrowsing.enabled", false); +pref("browser.safebrowsing.malware.enabled", false); +pref("browser.download.manager.scanWhenDone", false); // prevents AV remote reporting of downloads +pref("extensions.ui.lastCategory", "addons://list/extension"); +pref("datareporting.healthreport.service.enabled", false); // Yes, all three of these must be set +pref("datareporting.healthreport.uploadEnabled", false); +pref("datareporting.policy.dataSubmissionEnabled", false); +pref("security.mixed_content.block_active_content", false); // Disable until https://bugzilla.mozilla.org/show_bug.cgi?id=878890 is patched +pref("browser.syncPromoViewsLeftMap", "{\"addons\":0, \"passwords\":0, \"bookmarks\":0}"); // Don't promote sync +pref("services.sync.engine.prefs", false); // Never sync prefs, addons, or tabs with other browsers +pref("services.sync.engine.addons", false); +pref("services.sync.engine.tabs", false); +pref("extensions.getAddons.cache.enabled", false); // https://blog.mozilla.org/addons/how-to-opt-out-of-add-on-metadata-updates/ + +// Fingerprinting +pref("webgl.min_capability_mode", true); +pref("webgl.disable-extensions", true); +pref("dom.battery.enabled", false); // fingerprinting due to differing OS implementations +pref("dom.network.enabled",false); // fingerprinting due to differing OS implementations +pref("browser.display.max_font_attempts",10); +pref("browser.display.max_font_count",10); +pref("gfx.downloadable_fonts.fallback_delay", -1); +// pref("general.appname.override", "Netscape"); +// pref("general.appversion.override", "5.0 (Windows)"); +// pref("general.oscpu.override", "Windows NT 6.1"); +// pref("general.platform.override", "Win32"); +pref("general.useragent.override", "Mozilla/5.0 (Android; Mobile; rv:38.0) Gecko/38.0 Firefox/38.0"); +// pref("general.productSub.override", "20100101"); +// pref("general.buildID.override", "20100101"); +// pref("browser.startup.homepage_override.buildID", "20100101"); +pref("general.useragent.vendor", ""); +pref("general.useragent.vendorSub", ""); +pref("dom.enable_performance", false); +pref("plugin.expose_full_path", false); +pref("browser.zoom.siteSpecific", false); +pref("intl.charset.default", "windows-1252"); +pref("browser.link.open_newwindow.restriction", 0); // Bug 9881: Open popups in new tabs (to avoid fullscreen popups) +pref("dom.gamepad.enabled", false); // bugs.torproject.org/13023 +pref("javascript.use_us_english_locale", true); +// pref("intl.accept_languages", "en-us, en"); // Set by Torbutton +// pref("intl.accept_charsets", "iso-8859-1,*,utf-8"); // Set by Torbutton +// pref("intl.charsetmenu.browser.cache", "UTF-8"); // Set by Torbutton +// Disable video statistics fingerprinting vector (bug 15757) +pref("media.video_stats.enabled", false); +// Disable device sensors as possible fingerprinting vector (bug 15758) +pref("device.sensors.enabled", false); + +// Third party stuff +pref("network.cookie.cookieBehavior", 1); +pref("security.enable_tls_session_tickets", false); +pref("network.http.spdy.enabled", false); // Stores state and may have keepalive issues (both fixable) +pref("network.http.spdy.enabled.v2", false); // Seems redundant, but just in case +pref("network.http.spdy.enabled.v3", false); // Seems redundant, but just in case +pref("privacy.thirdparty.isolate", 2); // Always enforce third party isolation +pref("dom.workers.sharedWorkers.enabled", false); // See https://bugs.torproject.org/15562 + +// Proxy and proxy security +pref("network.proxy.socks", "127.0.0.1"); +pref("network.proxy.socks_port", 9050); +pref("network.proxy.socks_remote_dns", true); +pref("network.proxy.no_proxies_on", ""); // For fingerprinting and local service vulns (#10419) +pref("network.proxy.type", 1); +pref("network.security.ports.banned", "9050,9051,9150,9151"); +pref("network.dns.disablePrefetch", true); +pref("network.protocol-handler.external-default", false); +pref("network.protocol-handler.external.mailto", false); +pref("network.protocol-handler.external.news", false); +pref("network.protocol-handler.external.nntp", false); +pref("network.protocol-handler.external.snews", false); +pref("network.protocol-handler.warn-external.mailto", true); +pref("network.protocol-handler.warn-external.news", true); +pref("network.protocol-handler.warn-external.nntp", true); +pref("network.protocol-handler.warn-external.snews", true); +pref("plugin.disable", true); // Disable to search plugins on first start +pref("plugins.click_to_play", true); +pref("plugin.state.flash", 1); +pref("plugins.hide_infobar_for_missing_plugin", true); +pref("plugins.hideMissingPluginsNotification", true); +pref("media.peerconnection.enabled", false); // Disable WebRTC interfaces + +// Security slider +pref("svg.in-content.enabled", true); +pref("mathml.disabled", false); + +// Network and performance +pref("network.http.pipelining", true); +pref("network.http.pipelining.aggressive", true); +pref("network.http.pipelining.maxrequests", 12); +pref("network.http.pipelining.ssl", true); +pref("network.http.proxy.pipelining", true); +pref("security.ssl.enable_false_start", true); +pref("network.http.connection-retry-timeout", 0); +pref("network.http.max-persistent-connections-per-proxy", 256); +pref("network.http.pipelining.reschedule-timeout", 15000); +pref("network.http.pipelining.read-timeout", 60000); +// Hacked pref: Now means "Attempt to pipeline at least this many requests together" +pref("network.http.pipelining.max-optimistic-requests", 3); +pref("security.ssl.disable_session_identifiers", true); + +// Extension support +pref("extensions.autoDisableScopes", 0); +pref("extensions.bootstrappedAddons", "{}"); +pref("extensions.checkCompatibility.4.*", false); +pref("extensions.databaseSchema", 3); +pref("extensions.enabledAddons", "https-everywhere%40eff.org:3.1.4,%7B73a6fe31-595d-460b-a920-fcc0f8843232%7D:2.6.6.1,torbutton%40torproject.org:1.5.2,ubufox%40ubuntu.com:2.6,tor-launcher%40torproject.org:0.1.1pre-alpha,%7B972ce4c6-7e08-4474-a285-3208198ce6fd%7D:17.0.5"); +pref("extensions.enabledItems", "langpack-en-US@firefox.mozilla.org:,{73a6fe31-595d-460b-a920-fcc0f8843232}:1.9.9.57,{e0204bd5-9d31-402b-a99d-a6aa8ffebdca}:1.2.4,{972ce4c6-7e08-4474-a285-3208198ce6fd}:3.5.8"); +pref("extensions.enabledScopes", 1); +pref("extensions.pendingOperations", false); +pref("xpinstall.whitelist.add", ""); +pref("xpinstall.whitelist.add.36", ""); + + +// Putting the search engine prefs into this file to fix #11236. +// Default search engine +pref("browser.search.defaultenginename", "Search"); + +// Search engine order (order displayed in the search bar dropdown) +// Somewhat surprisingly we get some random behavior if we specify more than +// two search engines as below. See +// https://bugzilla.mozilla.org/show_bug.cgi?id=1126722 for details. +pref("browser.search.order.extra.1", "Search"); +pref("browser.search.order.extra.2", "YouTube"); + +// Audio_data is deprecated in future releases, but still present +// in FF24. This is a dangerous combination (spotted by iSec) +pref("media.audio_data.enabled", false); + +// If true, remote JAR files will not be opened, regardless of content type +// Patch done by Jeff Gibat (iSEC). We bind it to the security slider but allow +// jar: in default mode. +pref("network.jar.block-remote-files", false); + +// Enable TLS 1.1 and 1.2: +// https://trac.torproject.org/projects/tor/ticket/11253 +pref("security.tls.version.max", 3); + +#ifdef TOR_BROWSER_VERSION +#expand pref("torbrowser.version", __TOR_BROWSER_VERSION__); +#endif -pref("media.openUnsupportedTypeWithExternalApp", true); +// More Orfox specific flags (some might be redundant) +pref("privacy.clearOnShutdown.cache", true); +pref("privacy.clearOnShutdown.cookies",true); +pref("privacy.clearOnShutdown.downloads",true); +pref("privacy.clearOnShutdown.formdata",true); +pref("privacy.clearOnShutdown.history",true); +pref("privacy.clearOnShutdown.offlineApps",true); +pref("privacy.clearOnShutdown.passwords",true); +pref("privacy.clearOnShutdown.sessions",true); +pref("privacy.clearOnShutdown.siteSettings",true); + +// Do Not Track! +pref("privacy.donottrackheader.enabled",false); +pref("privacy.donottrackheader.value",1); + +// Don't send a referrer: +pref("network.http.sendRefererHeader", 0); + +// Make sure certificates are up-to-date: +pref("security.OCSP.require", true); pref("security.checkloaduri",true); + +// Don't display mixed content (i.e. not secure content on a secure page) +pref("security.mixed_content.block_display_content", true); + +// Disable RTSP +pref("media.rtsp.enabled", false); +pref("media.rtsp.video.enabled", false); + +// Disable UDP Push service wakeup +pref("services.push.udp.wakeupEnabled", false); +pref("dom.push.udp.wakeupEnabled", false);
1 0
0 0
[tor-browser/tor-browser-52.7.2esr-8.0-1] Orfox: confvars changes to disable screen casting
by gk@torproject.org 20 Mar '18

20 Mar '18
commit 36df808f70e1108b926a1187a03387d4b4823878 Author: Amogh Pradeep <amoghbl1(a)gmail.com> Date: Wed Jun 10 17:12:02 2015 -0400 Orfox: confvars changes to disable screen casting Signed-off-by: Amogh Pradeep <amoghbl1(a)gmail.com> --- mobile/android/confvars.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mobile/android/confvars.sh b/mobile/android/confvars.sh index b4215ca89a0c..8af6925a6dc9 100644 --- a/mobile/android/confvars.sh +++ b/mobile/android/confvars.sh @@ -32,6 +32,11 @@ MOZ_RAW=1 MOZ_RUST_MP4PARSE=1 +MOZ_PLACES= +MOZ_SOCIAL= +MOZ_ANDROID_HISTORY=0 +MOZ_DISABLE_EXPORT_JS=1 + # use custom widget for html:select MOZ_USE_NATIVE_POPUP_WINDOWS=1 @@ -40,7 +45,7 @@ MOZ_APP_ID={aa3c5121-dab2-40e2-81ca-7ea25febc110} MOZ_APP_STATIC_INI=1 # Enable second screen using native Android libraries. -MOZ_NATIVE_DEVICES=1 +MOZ_NATIVE_DEVICES=0 # Enable install tracking SDK if we have Google Play support; MOZ_NATIVE_DEVICES # is a proxy flag for that support.
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 1690
  • 1691
  • 1692
  • 1693
  • 1694
  • 1695
  • 1696
  • ...
  • 2045
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.