[tor-commits] [Git][tpo/applications/tor-browser-build][main] 2 commits: Bug 41361: Add support for conjure in android

Richard Pospesel (@richard) git at gitlab.torproject.org
Tue Jan 31 21:26:03 UTC 2023



Richard Pospesel pushed to branch main at The Tor Project / Applications / tor-browser-build


Commits:
64e56829 by Cecylia Bocovich at 2023-01-31T21:00:25+00:00
Bug 41361: Add support for conjure in android

- - - - -
9b208d20 by Cecylia Bocovich at 2023-01-31T21:00:25+00:00
Bug 41361: Use conjure-compatible version of tor-android-service

- - - - -


4 changed files:

- projects/tor-android-service/config
- + projects/tor-onion-proxy-library/0001-Bug-41361-Add-conjure-support.patch
- projects/tor-onion-proxy-library/build
- projects/tor-onion-proxy-library/config


Changes:

=====================================
projects/tor-android-service/config
=====================================
@@ -1,7 +1,7 @@
 # vim: filetype=yaml sw=2
 version: '[% c("abbrev") %]'
 filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %]'
-git_hash: f324999c1773a8d8c83c50106a2cac30be93aabf
+git_hash: 27924bc748044e987c188be854ff1471397cdb6a
 git_url: https://gitlab.torproject.org/tpo/applications/tor-android-service.git
 git_submodule: 1
 container:


=====================================
projects/tor-onion-proxy-library/0001-Bug-41361-Add-conjure-support.patch
=====================================
@@ -0,0 +1,80 @@
+From edf4337158df11da3b6ef6d30050e2441cfeafeb Mon Sep 17 00:00:00 2001
+From: Cecylia Bocovich <cohosh at torproject.org>
+Date: Thu, 13 Oct 2022 10:20:59 -0400
+Subject: [PATCH] Bug 41361: Add conjure support
+
+---
+ android/build.gradle                           |  3 +++
+ .../thali/toronionproxy/TorConfigBuilder.java  | 18 ++++++++++++++----
+ 2 files changed, 17 insertions(+), 4 deletions(-)
+
+diff --git a/android/build.gradle b/android/build.gradle
+index 2392731..b1aca0a 100644
+--- a/android/build.gradle
++++ b/android/build.gradle
+@@ -96,6 +96,9 @@ task copyPluggableTransports(type: Copy) {
+     rename { filename ->
+         filename.replace 'snowflake-client', 'libSnowflake.so'
+     }
++    rename { filename ->
++        filename.replace 'conjure-client', 'libConjure.so'
++    }
+ }
+ 
+ gradle.projectsEvaluated {
+diff --git a/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java b/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java
+index cc10783..c7e20c0 100644
+--- a/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java
++++ b/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java
+@@ -109,8 +109,8 @@ public final class TorConfigBuilder {
+         return this;
+     }
+ 
+-    public TorConfigBuilder configurePluggableTransportsFromSettings(File pluggableTransportObfs, File pluggableTransportSnow) throws IOException {
+-        if (pluggableTransportObfs == null  || pluggableTransportSnow == null) {
++    public TorConfigBuilder configurePluggableTransportsFromSettings(File pluggableTransportObfs, File pluggableTransportSnow, File pluggableTransportConjure) throws IOException {
++        if (pluggableTransportObfs == null  || pluggableTransportSnow == null || pluggableTransportConjure == null) {
+             return this;
+         }
+ 
+@@ -124,6 +124,11 @@ public final class TorConfigBuilder {
+                     .getCanonicalPath());
+         }
+ 
++        if (!pluggableTransportConjure.exists()) {
++            throw new IOException("Conjure binary does not exist: " + pluggableTransportConjure
++                    .getCanonicalPath());
++        }
++
+         if (!pluggableTransportObfs.canExecute()) {
+             throw new IOException("Obfs4proxy binary is not executable: " + pluggableTransportObfs
+                     .getCanonicalPath());
+@@ -134,8 +139,12 @@ public final class TorConfigBuilder {
+                     .getCanonicalPath());
+         }
+ 
++        if (!pluggableTransportConjure.canExecute()) {
++            throw new IOException("Conjure binary is not executable: " + pluggableTransportConjure
++                    .getCanonicalPath());
++        }
+ 
+-        transportPlugin(pluggableTransportObfs.getCanonicalPath(), pluggableTransportSnow.getCanonicalPath());
++        transportPlugin(pluggableTransportObfs.getCanonicalPath(), pluggableTransportSnow.getCanonicalPath(), pluggableTransportConjure.getCanonicalPath());
+         return this;
+     }
+ 
+@@ -502,9 +511,10 @@ public final class TorConfigBuilder {
+         return transPort(settings.transPort());
+     }
+ 
+-    public TorConfigBuilder transportPlugin(String obfsPath, String snowPath) {
++    public TorConfigBuilder transportPlugin(String obfsPath, String snowPath, String conjurePath) {
+         buffer.append("ClientTransportPlugin meek_lite,obfs3,obfs4 exec ").append(obfsPath).append('\n');
+         buffer.append("ClientTransportPlugin snowflake exec ").append(snowPath).append(" -url https://snowflake-broker.torproject.net.global.prod.fastly.net/ -front cdn.sstatic.net -ice stun:stun.l.google.com:19302,stun:stun.voip.blackberry.com:3478,stun:stun.altar.com.pl:3478,stun:stun.antisip.com:3478,stun:stun.bluesip.net:3478,stun:stun.dus.net:3478,stun:stun.epygi.com:3478,stun:stun.sonetel.com:3478,stun:stun.sonetel.net:3478,stun:stun.stunprotocol.org:3478,stun:stun.uls.co.za:3478,stun:stun.voipgate.com:3478,stun:stun.voys.nl:3478\n");
++        buffer.append("ClientTransportPlugin conjure exec ").append(conjurePath).append(" -registerURL https://registration.refraction.network/api\n");
+         return this;
+     }
+ 
+-- 
+2.37.2
+


=====================================
projects/tor-onion-proxy-library/build
=====================================
@@ -24,6 +24,7 @@ cd /var/tmp/build/[% project %]-[% c('version') %]
 patch -p1 < $rootdir/gradle.patch
 patch -p1 < $rootdir/0001-Bug-33931-Filter-bridges-in-stream-by-type.patch
 patch -p1 < $rootdir/0001-Bug-30318-Add-snowflake-support.patch
+patch -p1 < $rootdir/0001-Bug-41361-Add-conjure-support.patch
 
 [% FOREACH arch = ['armv7', 'aarch64', 'x86', 'x86_64'] -%]
   # Extract tor-expert-bundle
@@ -38,12 +39,16 @@ patch -p1 < $rootdir/0001-Bug-30318-Add-snowflake-support.patch
     cp $ptdir/obfs4proxy external/pluto/bin/armeabi/
     cp $ptdir/snowflake-client external/pluto/bin/armeabi-v7a/
     cp $ptdir/snowflake-client external/pluto/bin/armeabi/
+    cp $ptdir/conjure-client external/pluto/bin/armeabi-v7a/
+    cp $ptdir/conjure-client external/pluto/bin/armeabi/
   [% ELSIF arch == "aarch64" -%]
     cp $ptdir/obfs4proxy external/pluto/bin/arm64-v8a/
     cp $ptdir/snowflake-client external/pluto/bin/arm64-v8a/
+    cp $ptdir/conjure-client external/pluto/bin/arm64-v8a/
   [% ELSE -%]
     cp $ptdir/obfs4proxy external/pluto/bin/[% arch %]/
     cp $ptdir/snowflake-client external/pluto/bin/[% arch %]/
+    cp $ptdir/conjure-client external/pluto/bin/[% arch %]/
   [% END -%]
 [% END -%]
 


=====================================
projects/tor-onion-proxy-library/config
=====================================
@@ -40,3 +40,4 @@ input_files:
   - filename: gradle.patch
   - filename: 0001-Bug-33931-Filter-bridges-in-stream-by-type.patch
   - filename: 0001-Bug-30318-Add-snowflake-support.patch
+  - filename: 0001-Bug-41361-Add-conjure-support.patch



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/compare/d5a12bf8998dc254d5583fd44816b5c61e92598c...9b208d2007c363e1cc451b3851ceae9134628159

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/compare/d5a12bf8998dc254d5583fd44816b5c61e92598c...9b208d2007c363e1cc451b3851ceae9134628159
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-commits/attachments/20230131/0b8c1bbf/attachment-0001.htm>


More information about the tor-commits mailing list