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

[tor-commits] [orbot/master] update default bridges and bridge tester



commit 4cebceda5be8f90f25ad0665f220554150d69870
Author: n8fr8 <nathan@xxxxxxxxxxxxxxxxxxxx>
Date:   Mon Aug 24 16:02:30 2020 -0400

    update default bridges and bridge tester
---
 .../ui/onboarding/BridgeWizardActivity.java        | 41 ++++++++++++++++++++--
 orbotservice/src/main/res/raw/bridges.txt          | 10 +++---
 2 files changed, 44 insertions(+), 7 deletions(-)

diff --git a/app/src/main/java/org/torproject/android/ui/onboarding/BridgeWizardActivity.java b/app/src/main/java/org/torproject/android/ui/onboarding/BridgeWizardActivity.java
index 8585c29c..be8ab1bf 100644
--- a/app/src/main/java/org/torproject/android/ui/onboarding/BridgeWizardActivity.java
+++ b/app/src/main/java/org/torproject/android/ui/onboarding/BridgeWizardActivity.java
@@ -18,13 +18,18 @@ import androidx.appcompat.app.AppCompatActivity;
 import androidx.appcompat.widget.Toolbar;
 
 import org.torproject.android.R;
+import org.torproject.android.service.OrbotService;
 import org.torproject.android.service.util.Prefs;
 import org.torproject.android.settings.LocaleHelper;
 
+import java.io.BufferedReader;
 import java.io.IOException;
+import java.io.InputStreamReader;
 import java.net.InetSocketAddress;
 import java.net.Socket;
 import java.net.SocketAddress;
+import java.util.ArrayList;
+import java.util.StringTokenizer;
 
 public class BridgeWizardActivity extends AppCompatActivity {
 
@@ -158,9 +163,39 @@ public class BridgeWizardActivity extends AppCompatActivity {
         if (TextUtils.isEmpty(Prefs.getBridgesList()) || (!Prefs.bridgesEnabled())) {
             hostTester.execute("check.torproject.org", "443");
         } else if (Prefs.getBridgesList().equals("meek")) {
-            hostTester.execute("meek.azureedge.net", "443", "d2cly7j4zqgua7.cloudfront.net", "443");
+            hostTester.execute("meek.azureedge.net", "443");
         } else if (Prefs.getBridgesList().equals("obfs4")) {
-            hostTester.execute("85.17.30.79", "443", "154.35.22.9", "443", "192.99.11.54", "443");
+
+            ArrayList alBridges = new ArrayList<String>();
+
+            try
+            {
+                BufferedReader in=
+                        new BufferedReader(new InputStreamReader(getResources().openRawResource(org.torproject.android.service.R.raw.bridges), "UTF-8"));
+                String str;
+
+                while ((str=in.readLine()) != null) {
+
+                    StringTokenizer st = new StringTokenizer (str," ");
+                    String type = st.nextToken();
+
+                    if (type.equals("obfs4")) {
+                        String[] hostport = st.nextToken().split(":");
+                        hostTester.execute(hostport[0],hostport[1]);
+                        break;
+                    }
+
+                }
+
+                in.close();
+            }
+            catch (Exception e)
+            {
+                e.printStackTrace();
+            }
+
+
+
         } else {
             hostTester = null;
             mTvStatus.setText("");
@@ -187,7 +222,7 @@ public class BridgeWizardActivity extends AppCompatActivity {
                 String testHost = host[i];
                 i++; //move to the port
                 int testPort = Integer.parseInt(host[i]);
-                if (isHostReachable(testHost, testPort, 10000)) {
+                if (isHostReachable(testHost, testPort, 5000)) {
                     return true;
                 }
             }
diff --git a/orbotservice/src/main/res/raw/bridges.txt b/orbotservice/src/main/res/raw/bridges.txt
index 101db60a..c631831b 100644
--- a/orbotservice/src/main/res/raw/bridges.txt
+++ b/orbotservice/src/main/res/raw/bridges.txt
@@ -1,5 +1,7 @@
-obfs4 89.163.181.169:443 6A17D1E29E2807A1A4314215553079001031A7FF cert=e8JIYivx1zbYNOqq3a3+nDf/NDHoDQ/th/RVAnlVQePUIHxllG7aOku7pSwZisZ7i6ybVw iat-mode=0
-obfs4 94.242.249.2:40190 C7BE8154678E7537CCAC60B097D51A8A7EF8BCDF cert=8jw57wlMlVXCKsCnF7gCdApx7sRZLD5zPl8qdccwp0zltYG6kMYqBNm60dP8IxRH/l8OcQ iat-mode=0
-obfs4 77.81.104.251:443 115C90EBD0EB631C177560A872535772215478D9 cert=UsuF7oN4KNKviZP54JOyTCoCphrdM5gwZK4vT8GnCAcmqLUJEJxyw1dpko9a/ii6He4iZg iat-mode=0
-obfs4 5.249.146.133:80 FAF3A0073330D6AD92F3B4874B0D945562A633EF cert=TRe8bAODtjcGij7EPQaUayWEOqR99wDh2l3B4hFtCsn1JTJCph03pRZ9tx8wynpLYKWMQg iat-mode=0
+obfs4 192.95.36.142:443 CDF2E852BF539B82BD10E27E9115A31734E378C2 cert=qUVQ0srL1JI/vO6V6m/24anYXiJD3QP2HgzUKQtQ7GRqqUvs7P+tG43RtAqdhLOALP7DJQ iat-mode=1
+obfs4 38.229.1.78:80 C8CBDB2464FC9804A69531437BCF2BE31FDD2EE4 cert=Hmyfd2ev46gGY7NoVxA9ngrPF2zCZtzskRTzoWXbxNkzeVnGFPWmrTtILRyqCTjHR+s9dg iat-mode=1
+obfs4 38.229.33.83:80 0BAC39417268B96B9F514E7F63FA6FBA1A788955 cert=VwEFpk9F/UN9JED7XpG1XOjm/O8ZCXK80oPecgWnNDZDv5pdkhq1OpbAH0wNqOT6H6BmRQ iat-mode=1
+obfs4 37.218.240.34:40035 88CD36D45A35271963EF82E511C8827A24730913 cert=eGXYfWODcgqIdPJ+rRupg4GGvVGfh25FWaIXZkit206OSngsp7GAIiGIXOJJROMxEqFKJg iat-mode=1
+obfs4 37.218.245.14:38224 D9A82D2F9C2F65A18407B1D2B764F130847F8B5D cert=bjRaMrr1BRiAW8IE9U5z27fQaYgOhX1UCmOpg2pFpoMvo6ZgQMzLsaTzzQNTlm7hNcb+Sg iat-mode=0
+obfs4 85.31.186.98:443 011F2599C0E9B27EE74B353155E244813763C3E5 cert=ayq0XzCwhpdysn5o0EyDUbmSOx3X/oTEbzDMvczHOdBJKlvIdHHLJGkZARtT4dcBFArPPg iat-mode=0
 meek_lite 0.0.2.0:2 97700DFE9F483596DDA6264C4D7DF7641E1E39CE url=https://meek.azureedge.net/ front=ajax.aspnetcdn.com



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