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

[tor-commits] [orbot/master] Snowflake proxy uses defaults in IPtProxy, displays cute toast when user connects. activity text for snowflake proxy isn't in ALL CAPS anymore



commit 50ef12d356d0a0548f12edc0c028da2dfc6820c5
Author: b <dsnake@xxxxxxxxxxxxxx>
Date:   Wed Dec 15 17:14:22 2021 -0500

    Snowflake proxy uses defaults in IPtProxy, displays cute toast when user connects. activity text for snowflake proxy isn't in ALL CAPS anymore
---
 app/src/main/res/values/strings.xml                          |  2 +-
 .../java/org/torproject/android/service/OrbotService.java    | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 9ba83a26..dfdb38ce 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -258,7 +258,7 @@
 
     <string name="be_a_snowflake_title_limit">Snowflake Proxy Limits</string>
     <string name="be_a_snowflake_desc_limit">Only when device is plugged in and on wifi</string>
-    <string name="snowflake_proxy_enabled">SNOWFLAKE PROXY MODE ENABLED</string>
+    <string formatted="true" name="snowflake_proxy_enabled">Snowflake proxy mode enabled</string>
     <string name="snowflake_proxy_msg_title">Show Connection Notification</string>
     <string name="snowflake_proxy_msg_description">Show a message when your snowflake helps someone circumvent censorship</string>
 
diff --git a/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java b/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java
index 8520a815..8fef4543 100644
--- a/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java
+++ b/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java
@@ -355,10 +355,10 @@ public class OrbotService extends VpnService implements TorServiceConstants, Orb
         String target = getCdnFront("snowflake-target");
         String front = getCdnFront("snowflake-front");
         String stunServer = getCdnFront("snowflake-stun");
-        String ampCache = "https://cdn.ampproject.org/";;
+        String ampCache = null; //  getCdnFront("snowflake-ampcache");
 
         IPtProxy.startSnowflake(stunServer, target, front, ampCache,
-                 null, true, false, true, 1);
+                 null, true, false, false, 1);
     }
 
     /*
@@ -366,9 +366,9 @@ public class OrbotService extends VpnService implements TorServiceConstants, Orb
      */
     private void enableSnowflakeProxy () {
         int capacity = 1;
-        String broker = "https://snowflake-broker.bamsoftware.com/";;
-        String relay = "wss://snowflake.bamsoftware.com/";
-        String stun = "stun:stun.stunprotocol.org:3478";
+        String broker = null; // "https://snowflake-broker.bamsoftware.com/";;
+        String relay =  null; // "wss://snowflake.bamsoftware.com/";
+        String stun = null; // "stun:stun.stunprotocol.org:3478";
         String natProbe = null;
         String logFile = null;
         boolean keepLocalAddresses = true;
@@ -377,7 +377,7 @@ public class OrbotService extends VpnService implements TorServiceConstants, Orb
         if (Prefs.showSnowflakeProxyMessage()) {
             callback = (SnowflakeClientConnected) () -> {
                 String message = String.format(getString(R.string.snowflake_proxy_client_connected_msg), "â??ï¸?", "â??ï¸?");
-                Toast.makeText(this, message, Toast.LENGTH_LONG).show();
+                new Handler(getMainLooper()).post(() -> Toast.makeText(getApplicationContext(), message, Toast.LENGTH_LONG).show());
             };
         }
         IPtProxy.startSnowflakeProxy(capacity, broker, relay, stun, natProbe, logFile, keepLocalAddresses, unsafeLogging, callback);



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