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

[tor-commits] [Git][tpo/applications/tor-browser-build][main] Bug 40800: Add WebTunnel support for mobile



Title: GitLab

Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build

Commits:

  • c6423475
    by Shelikhoo at 2023-03-02T14:04:48+00:00
    Bug 40800: Add WebTunnel support for mobile
    
    This includes:
    
    add webtunnel support to tor-onion-proxy-library
    
    Add copy binary for webtunnel mobile
    
    update tor-android-service for webtunnel
    

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: 27924bc748044e987c188be854ff1471397cdb6a
    
    4
    +git_hash: 0438a9a4ce1548be08dd2df891a38987bb313d22
    
    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-40800-Add-WebTunnel-support.patch
    1
    +From 3a6f835e8089dd15f5cd6487b5cfbdfafe7422f8 Mon Sep 17 00:00:00 2001
    
    2
    +From: Shelikhoo <xiaokangwang@xxxxxxxxxxx>
    
    3
    +Date: Tue, 14 Feb 2023 16:59:59 +0000
    
    4
    +Subject: [PATCH] add WebTunnel Support
    
    5
    +
    
    6
    +---
    
    7
    + android/build.gradle                          |  3 +++
    
    8
    + .../thali/toronionproxy/TorConfigBuilder.java | 19 +++++++++++++++----
    
    9
    + 2 files changed, 18 insertions(+), 4 deletions(-)
    
    10
    +
    
    11
    +diff --git a/android/build.gradle b/android/build.gradle
    
    12
    +index e107e8e..acd92c1 100644
    
    13
    +--- a/android/build.gradle
    
    14
    ++++ b/android/build.gradle
    
    15
    +@@ -102,6 +102,9 @@ task copyPluggableTransports(type: Copy) {
    
    16
    +     rename { filename ->
    
    17
    +         filename.replace 'conjure-client', 'libConjure.so'
    
    18
    +     }
    
    19
    ++    rename { filename ->
    
    20
    ++        filename.replace 'webtunnel-client', 'libWebtunnel.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 b87993d..5e6d6c5 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, File pluggableTransportConjure) throws IOException {
    
    34
    +-        if (pluggableTransportObfs == null  || pluggableTransportSnow == null || pluggableTransportConjure == null) {
    
    35
    ++    public TorConfigBuilder configurePluggableTransportsFromSettings(File pluggableTransportObfs, File pluggableTransportSnow, File pluggableTransportConjure, File pluggableTransportWebtunnel) throws IOException {
    
    36
    ++        if (pluggableTransportObfs == null  || pluggableTransportSnow == null || pluggableTransportConjure == null || pluggableTransportWebtunnel == null) {
    
    37
    +             return this;
    
    38
    +         }
    
    39
    + 
    
    40
    +@@ -144,7 +144,17 @@ public final class TorConfigBuilder {
    
    41
    +                     .getCanonicalPath());
    
    42
    +         }
    
    43
    + 
    
    44
    +-        transportPlugin(pluggableTransportObfs.getCanonicalPath(), pluggableTransportSnow.getCanonicalPath(), pluggableTransportConjure.getCanonicalPath());
    
    45
    ++        if (!pluggableTransportWebtunnel.exists()) {
    
    46
    ++            throw new IOException("Webtunnel binary does not exist: " + pluggableTransportWebtunnel
    
    47
    ++                    .getCanonicalPath());
    
    48
    ++        }
    
    49
    ++
    
    50
    ++        if (!pluggableTransportWebtunnel.canExecute()) {
    
    51
    ++            throw new IOException("Webtunnel binary is not executable: " + pluggableTransportWebtunnel
    
    52
    ++                    .getCanonicalPath());
    
    53
    ++        }
    
    54
    ++
    
    55
    ++        transportPlugin(pluggableTransportObfs.getCanonicalPath(), pluggableTransportSnow.getCanonicalPath(), pluggableTransportConjure.getCanonicalPath(), pluggableTransportWebtunnel.getCanonicalPath());
    
    56
    +         return this;
    
    57
    +     }
    
    58
    + 
    
    59
    +@@ -511,10 +521,11 @@ public final class TorConfigBuilder {
    
    60
    +         return transPort(settings.transPort());
    
    61
    +     }
    
    62
    + 
    
    63
    +-    public TorConfigBuilder transportPlugin(String obfsPath, String snowPath, String conjurePath) {
    
    64
    ++    public TorConfigBuilder transportPlugin(String obfsPath, String snowPath, String conjurePath, String webtunnelPath) {
    
    65
    +         buffer.append("ClientTransportPlugin meek_lite,obfs3,obfs4 exec ").append(obfsPath).append('\n');
    
    66
    +         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");
    
    67
    +         buffer.append("ClientTransportPlugin conjure exec ").append(conjurePath).append(" -registerURL https://registration.refraction.network/api\n");
    
    68
    ++        buffer.append("ClientTransportPlugin webtunnel exec ").append(webtunnelPath).append('\n');
    
    69
    +         return this;
    
    70
    +     }
    
    71
    + 
    
    72
    +-- 
    
    73
    +2.34.1
    
    74
    +

  • projects/tor-onion-proxy-library/build
    ... ... @@ -25,6 +25,7 @@ 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 27
     patch -p1 < $rootdir/0001-Bug-41361-Add-conjure-support.patch
    
    28
    +patch -p1 < $rootdir/0001-Bug-40800-Add-WebTunnel-support.patch
    
    28 29
     
    
    29 30
     [% FOREACH arch = ['armv7', 'aarch64', 'x86', 'x86_64'] -%]
    
    30 31
       # Extract tor-expert-bundle
    
    ... ... @@ -41,14 +42,18 @@ patch -p1 < $rootdir/0001-Bug-41361-Add-conjure-support.patch
    41 42
         cp $ptdir/snowflake-client external/pluto/bin/armeabi/
    
    42 43
         cp $ptdir/conjure-client external/pluto/bin/armeabi-v7a/
    
    43 44
         cp $ptdir/conjure-client external/pluto/bin/armeabi/
    
    45
    +    cp $ptdir/webtunnel-client external/pluto/bin/armeabi-v7a/
    
    46
    +    cp $ptdir/webtunnel-client external/pluto/bin/armeabi/
    
    44 47
       [% ELSIF arch == "aarch64" -%]
    
    45 48
         cp $ptdir/obfs4proxy external/pluto/bin/arm64-v8a/
    
    46 49
         cp $ptdir/snowflake-client external/pluto/bin/arm64-v8a/
    
    47 50
         cp $ptdir/conjure-client external/pluto/bin/arm64-v8a/
    
    51
    +    cp $ptdir/webtunnel-client external/pluto/bin/arm64-v8a/
    
    48 52
       [% ELSE -%]
    
    49 53
         cp $ptdir/obfs4proxy external/pluto/bin/[% arch %]/
    
    50 54
         cp $ptdir/snowflake-client external/pluto/bin/[% arch %]/
    
    51 55
         cp $ptdir/conjure-client external/pluto/bin/[% arch %]/
    
    56
    +    cp $ptdir/webtunnel-client external/pluto/bin/[% arch %]/
    
    52 57
       [% END -%]
    
    53 58
     [% END -%]
    
    54 59
     
    

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

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