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

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



Title: GitLab

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:

Changes:

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

  • projects/tor-onion-proxy-library/0001-Bug-41361-Add-conjure-support.patch
    1
    +From edf4337158df11da3b6ef6d30050e2441cfeafeb Mon Sep 17 00:00:00 2001
    
    2
    +From: Cecylia Bocovich <cohosh@xxxxxxxxxxxxxx>
    
    3
    +Date: Thu, 13 Oct 2022 10:20:59 -0400
    
    4
    +Subject: [PATCH] Bug 41361: Add conjure support
    
    5
    +
    
    6
    +---
    
    7
    + android/build.gradle                           |  3 +++
    
    8
    + .../thali/toronionproxy/TorConfigBuilder.java  | 18 ++++++++++++++----
    
    9
    + 2 files changed, 17 insertions(+), 4 deletions(-)
    
    10
    +
    
    11
    +diff --git a/android/build.gradle b/android/build.gradle
    
    12
    +index 2392731..b1aca0a 100644
    
    13
    +--- a/android/build.gradle
    
    14
    ++++ b/android/build.gradle
    
    15
    +@@ -96,6 +96,9 @@ task copyPluggableTransports(type: Copy) {
    
    16
    +     rename { filename ->
    
    17
    +         filename.replace 'snowflake-client', 'libSnowflake.so'
    
    18
    +     }
    
    19
    ++    rename { filename ->
    
    20
    ++        filename.replace 'conjure-client', 'libConjure.so'
    
    21
    ++    }
    
    22
    + }
    
    23
    + 
    
    24
    + gradle.projectsEvaluated {
    
    25
    +diff --git a/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java b/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java
    
    26
    +index cc10783..c7e20c0 100644
    
    27
    +--- a/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java
    
    28
    ++++ b/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java
    
    29
    +@@ -109,8 +109,8 @@ public final class TorConfigBuilder {
    
    30
    +         return this;
    
    31
    +     }
    
    32
    + 
    
    33
    +-    public TorConfigBuilder configurePluggableTransportsFromSettings(File pluggableTransportObfs, File pluggableTransportSnow) throws IOException {
    
    34
    +-        if (pluggableTransportObfs == null  || pluggableTransportSnow == null) {
    
    35
    ++    public TorConfigBuilder configurePluggableTransportsFromSettings(File pluggableTransportObfs, File pluggableTransportSnow, File pluggableTransportConjure) throws IOException {
    
    36
    ++        if (pluggableTransportObfs == null  || pluggableTransportSnow == null || pluggableTransportConjure == null) {
    
    37
    +             return this;
    
    38
    +         }
    
    39
    + 
    
    40
    +@@ -124,6 +124,11 @@ public final class TorConfigBuilder {
    
    41
    +                     .getCanonicalPath());
    
    42
    +         }
    
    43
    + 
    
    44
    ++        if (!pluggableTransportConjure.exists()) {
    
    45
    ++            throw new IOException("Conjure binary does not exist: " + pluggableTransportConjure
    
    46
    ++                    .getCanonicalPath());
    
    47
    ++        }
    
    48
    ++
    
    49
    +         if (!pluggableTransportObfs.canExecute()) {
    
    50
    +             throw new IOException("Obfs4proxy binary is not executable: " + pluggableTransportObfs
    
    51
    +                     .getCanonicalPath());
    
    52
    +@@ -134,8 +139,12 @@ public final class TorConfigBuilder {
    
    53
    +                     .getCanonicalPath());
    
    54
    +         }
    
    55
    + 
    
    56
    ++        if (!pluggableTransportConjure.canExecute()) {
    
    57
    ++            throw new IOException("Conjure binary is not executable: " + pluggableTransportConjure
    
    58
    ++                    .getCanonicalPath());
    
    59
    ++        }
    
    60
    + 
    
    61
    +-        transportPlugin(pluggableTransportObfs.getCanonicalPath(), pluggableTransportSnow.getCanonicalPath());
    
    62
    ++        transportPlugin(pluggableTransportObfs.getCanonicalPath(), pluggableTransportSnow.getCanonicalPath(), pluggableTransportConjure.getCanonicalPath());
    
    63
    +         return this;
    
    64
    +     }
    
    65
    + 
    
    66
    +@@ -502,9 +511,10 @@ public final class TorConfigBuilder {
    
    67
    +         return transPort(settings.transPort());
    
    68
    +     }
    
    69
    + 
    
    70
    +-    public TorConfigBuilder transportPlugin(String obfsPath, String snowPath) {
    
    71
    ++    public TorConfigBuilder transportPlugin(String obfsPath, String snowPath, String conjurePath) {
    
    72
    +         buffer.append("ClientTransportPlugin meek_lite,obfs3,obfs4 exec ").append(obfsPath).append('\n');
    
    73
    +         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");
    
    74
    ++        buffer.append("ClientTransportPlugin conjure exec ").append(conjurePath).append(" -registerURL https://registration.refraction.network/api\n");
    
    75
    +         return this;
    
    76
    +     }
    
    77
    + 
    
    78
    +-- 
    
    79
    +2.37.2
    
    80
    +

  • projects/tor-onion-proxy-library/build
    ... ... @@ -24,6 +24,7 @@ cd /var/tmp/build/[% project %]-[% c('version') %]
    24 24
     patch -p1 < $rootdir/gradle.patch
    
    25 25
     patch -p1 < $rootdir/0001-Bug-33931-Filter-bridges-in-stream-by-type.patch
    
    26 26
     patch -p1 < $rootdir/0001-Bug-30318-Add-snowflake-support.patch
    
    27
    +patch -p1 < $rootdir/0001-Bug-41361-Add-conjure-support.patch
    
    27 28
     
    
    28 29
     [% FOREACH arch = ['armv7', 'aarch64', 'x86', 'x86_64'] -%]
    
    29 30
       # Extract tor-expert-bundle
    
    ... ... @@ -38,12 +39,16 @@ patch -p1 < $rootdir/0001-Bug-30318-Add-snowflake-support.patch
    38 39
         cp $ptdir/obfs4proxy external/pluto/bin/armeabi/
    
    39 40
         cp $ptdir/snowflake-client external/pluto/bin/armeabi-v7a/
    
    40 41
         cp $ptdir/snowflake-client external/pluto/bin/armeabi/
    
    42
    +    cp $ptdir/conjure-client external/pluto/bin/armeabi-v7a/
    
    43
    +    cp $ptdir/conjure-client external/pluto/bin/armeabi/
    
    41 44
       [% ELSIF arch == "aarch64" -%]
    
    42 45
         cp $ptdir/obfs4proxy external/pluto/bin/arm64-v8a/
    
    43 46
         cp $ptdir/snowflake-client external/pluto/bin/arm64-v8a/
    
    47
    +    cp $ptdir/conjure-client external/pluto/bin/arm64-v8a/
    
    44 48
       [% ELSE -%]
    
    45 49
         cp $ptdir/obfs4proxy external/pluto/bin/[% arch %]/
    
    46 50
         cp $ptdir/snowflake-client external/pluto/bin/[% arch %]/
    
    51
    +    cp $ptdir/conjure-client external/pluto/bin/[% arch %]/
    
    47 52
       [% END -%]
    
    48 53
     [% END -%]
    
    49 54
     
    

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

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