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

Commits:

13 changed files:

Changes:

  • Makefile
    ... ... @@ -643,9 +643,6 @@ go_vendor-snowflake: submodule-update
    643 643
     go_vendor-conjure: submodule-update
    
    644 644
     	$(rbm) build conjure --step go_vendor --target alpha --target torbrowser-linux-x86_64
    
    645 645
     
    
    646
    -go_vendor-webtunnel: submodule-update
    
    647
    -	$(rbm) build webtunnel --step go_vendor --target alpha --target torbrowser-linux-x86_64
    
    648
    -
    
    649 646
     go_vendor-lyrebird: submodule-update
    
    650 647
     	$(rbm) build lyrebird --step go_vendor --target alpha --target torbrowser-linux-x86_64
    
    651 648
     
    

  • projects/browser/build
    ... ... @@ -109,11 +109,8 @@ mv [% c('input_files_by_name/noscript') %] "$TBDIR/$EXTSPATH/{73a6fe31-595d-460b
    109 109
     
    
    110 110
       # Move READMEs from tor-expert-bundle to the doc dir
    
    111 111
       mkdir -p "$TBDIR/$DOCSPATH/snowflake" [% IF c("var/macos_universal") %]"$TBDIR_AARCH64/$DOCSPATH/snowflake"[% END %]
    
    112
    -
    
    113
    -  mkdir -p "$TBDIR/$DOCSPATH/webtunnel" [% IF c("var/macos_universal") %]"$TBDIR_AARCH64/$DOCSPATH/webtunnel"[% END %]
    
    114 112
       mkdir -p "$TBDIR/$DOCSPATH/conjure" [% IF c("var/macos_universal") %]"$TBDIR_AARCH64/$DOCSPATH/conjure"[% END %]
    
    115 113
       mv_tbdir tor/pluggable_transports/README.SNOWFLAKE.md "$DOCSPATH/snowflake/README.md"
    
    116
    -  mv_tbdir tor/pluggable_transports/README.WEBTUNNEL.md "$DOCSPATH/webtunnel/README.md"
    
    117 114
       mv_tbdir tor/pluggable_transports/README.CONJURE.md "$DOCSPATH/conjure/README.md"
    
    118 115
     
    
    119 116
       # Move the PTs to where TB expects them
    

  • projects/lyrebird/config
    1 1
     # vim: filetype=yaml sw=2
    
    2
    -version: 0.1.0
    
    2
    +version: 0.2.0
    
    3 3
     git_url: https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird.git
    
    4 4
     git_hash: 'lyrebird-[% c("version") %]'
    
    5 5
     tag_gpg_id: 1
    
    ... ... @@ -9,7 +9,7 @@ container:
    9 9
       use_container: 1
    
    10 10
     
    
    11 11
     var:
    
    12
    -  go_vendor_sha256sum: d95d1fa8ce3904b76395b20ef169e8ef2b039fa485764b74739bb6290631537d
    
    12
    +  go_vendor_sha256sum: dc6b2671250f4ffd0caff3ef020bd60f99207f519f6f5f1be47243677a13c695
    
    13 13
     
    
    14 14
     targets:
    
    15 15
       nightly:
    

  • 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: 0438a9a4ce1548be08dd2df891a38987bb313d22
    
    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-expert-bundle/build
    ... ... @@ -15,7 +15,6 @@ mkdir pluggable_transports && cd pluggable_transports
    15 15
     
    
    16 16
     tar -xkf $rootdir/[% c('input_files_by_name/lyrebird') %]
    
    17 17
     tar -xkf $rootdir/[% c('input_files_by_name/snowflake') %]
    
    18
    -tar -xkf $rootdir/[% c('input_files_by_name/webtunnel') %]
    
    19 18
     tar -xkf $rootdir/[% c('input_files_by_name/conjure') %]
    
    20 19
     
    
    21 20
     # add per-platform pt extension
    
    ... ... @@ -35,7 +34,6 @@ cd $distdir
    35 34
       cp -a tor/pluggable_transports/conjure-client aar/jni/[% c('arch') %]/libConjure.so
    
    36 35
       cp -a tor/pluggable_transports/lyrebird aar/jni/[% c('arch') %]/Lyrebird.so
    
    37 36
       cp -a tor/pluggable_transports/snowflake-client aar/jni/[% c('arch') %]/libSnowflake.so
    
    38
    -  cp -a tor/pluggable_transports/webtunnel-client aar/jni/[% c('arch') %]/libWebtunnel.so
    
    39 37
     
    
    40 38
       cp -a data/* aar/assets/common/
    
    41 39
     
    

  • projects/tor-expert-bundle/config
    ... ... @@ -18,8 +18,6 @@ input_files:
    18 18
         project: lyrebird
    
    19 19
       - name: snowflake
    
    20 20
         project: snowflake
    
    21
    -  - project: webtunnel
    
    22
    -    name: webtunnel
    
    23 21
       - name: conjure
    
    24 22
         project: conjure
    
    25 23
       - filename: pt_config.json
    

  • projects/tor-expert-bundle/pt_config.json
    1 1
     {
    
    2 2
       "recommendedDefault" : "obfs4",
    
    3 3
       "pluggableTransports" : {
    
    4
    -    "lyrebird" : "ClientTransportPlugin meek_lite,obfs2,obfs3,obfs4,scramblesuit exec ${pt_path}lyrebird${pt_extension}",
    
    4
    +    "lyrebird" : "ClientTransportPlugin meek_lite,obfs2,obfs3,obfs4,scramblesuit,webtunnel exec ${pt_path}lyrebird${pt_extension}",
    
    5 5
         "snowflake" : "ClientTransportPlugin snowflake exec ${pt_path}snowflake-client${pt_extension}",
    
    6
    -    "webtunnel" : "ClientTransportPlugin webtunnel exec ${pt_path}webtunnel-client${pt_extension}",
    
    7 6
         "conjure" : "ClientTransportPlugin conjure exec ${pt_path}conjure-client${pt_extension} -registerURL https://registration.refraction.network/api"
    
    8 7
       },
    
    9 8
       "bridges" : {
    

  • projects/tor-onion-proxy-library/0001-Bug-40800-Add-WebTunnel-support.patch deleted
    1
    -From 3a6f835e8089dd15f5cd6487b5cfbdfafe7422f8 Mon Sep 17 00:00:00 2001
    
    2
    -From: Shelikhoo <xiaokangwang@outlook.com>
    
    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('\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/0001-Bug-41111-Use-Lyrebird-to-provide-WebTunnel-PT-Client.patch
    1
    +From 4aa1038fd0d3acc212579fbd94566e062dd187e6 Mon Sep 17 00:00:00 2001
    
    2
    +From: Richard Pospesel <richard@torproject.org>
    
    3
    +Date: Mon, 22 Apr 2024 17:38:49 +0000
    
    4
    +Subject: [PATCH] add WebTunnel Support
    
    5
    +
    
    6
    +--- 
    
    7
    +diff --git a/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java b/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java
    
    8
    +index 8a439f8..77e6f35 100644
    
    9
    +--- a/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java
    
    10
    ++++ b/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java
    
    11
    +@@ -512,7 +512,7 @@ public final class TorConfigBuilder {
    
    12
    +     }
    
    13
    + 
    
    14
    +     public TorConfigBuilder transportPlugin(String obfsPath, String snowPath, String conjurePath) {
    
    15
    +-        buffer.append("ClientTransportPlugin meek_lite,obfs3,obfs4 exec ").append(obfsPath).append('\n');
    
    16
    ++        buffer.append("ClientTransportPlugin meek_lite,obfs3,obfs4,webtunnel exec ").append(obfsPath).append('\n');
    
    17
    +         buffer.append("ClientTransportPlugin snowflake exec ").append(snowPath).append('\n');
    
    18
    +         buffer.append("ClientTransportPlugin conjure exec ").append(conjurePath).append(" -registerURL https://registration.refraction.network/api\n");
    
    19
    +         return this;

  • projects/tor-onion-proxy-library/build
    ... ... @@ -37,7 +37,7 @@ patch -p1 < $rootdir/gradle.patch
    37 37
     patch -p1 < $rootdir/0001-Bug-33931-Filter-bridges-in-stream-by-type.patch
    
    38 38
     patch -p1 < $rootdir/0001-Bug-30318-Add-snowflake-support.patch
    
    39 39
     patch -p1 < $rootdir/0001-Bug-41361-Add-conjure-support.patch
    
    40
    -patch -p1 < $rootdir/0001-Bug-40800-Add-WebTunnel-support.patch
    
    40
    +patch -p1 < $rootdir/0001-Bug-41111-Use-Lyrebird-to-provide-WebTunnel-PT-Client.patch
    
    41 41
     
    
    42 42
     [% FOREACH arch = ['armv7', 'aarch64', 'x86', 'x86_64'] -%]
    
    43 43
       # Extract tor-expert-bundle
    
    ... ... @@ -54,18 +54,14 @@ patch -p1 < $rootdir/0001-Bug-40800-Add-WebTunnel-support.patch
    54 54
         cp $ptdir/snowflake-client external/pluto/bin/armeabi/
    
    55 55
         cp $ptdir/conjure-client external/pluto/bin/armeabi-v7a/
    
    56 56
         cp $ptdir/conjure-client external/pluto/bin/armeabi/
    
    57
    -    cp $ptdir/webtunnel-client external/pluto/bin/armeabi-v7a/
    
    58
    -    cp $ptdir/webtunnel-client external/pluto/bin/armeabi/
    
    59 57
       [% ELSIF arch == "aarch64" -%]
    
    60 58
         cp $ptdir/lyrebird external/pluto/bin/arm64-v8a/obfs4proxy
    
    61 59
         cp $ptdir/snowflake-client external/pluto/bin/arm64-v8a/
    
    62 60
         cp $ptdir/conjure-client external/pluto/bin/arm64-v8a/
    
    63
    -    cp $ptdir/webtunnel-client external/pluto/bin/arm64-v8a/
    
    64 61
       [% ELSE -%]
    
    65 62
         cp $ptdir/lyrebird external/pluto/bin/[% arch %]/obfs4proxy
    
    66 63
         cp $ptdir/snowflake-client external/pluto/bin/[% arch %]/
    
    67 64
         cp $ptdir/conjure-client external/pluto/bin/[% arch %]/
    
    68
    -    cp $ptdir/webtunnel-client external/pluto/bin/[% arch %]/
    
    69 65
       [% END -%]
    
    70 66
     [% END -%]
    
    71 67
     
    

  • projects/tor-onion-proxy-library/config
    ... ... @@ -41,4 +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
    44
    +  - filename: 0001-Bug-41111-Use-Lyrebird-to-provide-WebTunnel-PT-Client.patch

  • projects/webtunnel/build deleted
    1
    -#!/bin/bash
    
    2
    -[% c("var/set_default_env") -%]
    
    3
    -[% pc('go', 'var/setup', { go_tarfile => c('input_files_by_name/go') }) %]
    
    4
    -distdir=/var/tmp/dist/[% project %]
    
    5
    -mkdir -p $distdir
    
    6
    -
    
    7
    -[% IF c("var/android") -%]
    
    8
    -  [% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
    
    9
    -  # We need to explicitly set CGO_ENABLED with Go 1.13.x as the Android build
    
    10
    -  # breaks otherwise.
    
    11
    -  export CGO_ENABLED=1
    
    12
    -[% END -%]
    
    13
    -
    
    14
    -mkdir -p /var/tmp/build
    
    15
    -tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.[% c('compress_tar') %]
    
    16
    -cd /var/tmp/build/[% project %]-[% c('version') %]
    
    17
    -
    
    18
    -tar -xf $rootdir/[% c('input_files_by_name/go_vendor') %]
    
    19
    -
    
    20
    -cd main/client
    
    21
    -go build -ldflags '-s'
    
    22
    -cp -a client[% IF c("var/windows") %].exe[% END %] $distdir/webtunnel-client[% IF c("var/windows") %].exe[% END %]
    
    23
    -
    
    24
    -cd /var/tmp/build/[% project %]-[% c('version') %]
    
    25
    -cp -a README.md $distdir/README.WEBTUNNEL.md
    
    26
    -
    
    27
    -cd $distdir
    
    28
    -[% c('tar', {
    
    29
    -        tar_src => [ '.' ],
    
    30
    -        tar_args => '-caf ' _ dest_dir _ '/' _ c('filename'),
    
    31
    -    }) %]

  • projects/webtunnel/config deleted
    1
    -# vim: filetype=yaml sw=2
    
    2
    -version: '[% c("abbrev") %]'
    
    3
    -git_url: https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/webtunnel.git
    
    4
    -git_hash: 38eb55054a5c3c072acc1d8f9a9afa36e3a5c9b7
    
    5
    -container:
    
    6
    -  use_container: 1
    
    7
    -
    
    8
    -steps:
    
    9
    -  build:
    
    10
    -    filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.[% c("compress_tar") %]'
    
    11
    -    input_files:
    
    12
    -      - project: container-image
    
    13
    -      - name: go
    
    14
    -        project: go
    
    15
    -      - name: '[% c("var/compiler") %]'
    
    16
    -        project: '[% c("var/compiler") %]'
    
    17
    -        enable: '[% c("var/android") %]'
    
    18
    -      - name: go_vendor
    
    19
    -        pkg_type: go_vendor
    
    20
    -        project: webtunnel
    
    21
    -        norec:
    
    22
    -          sha256sum: e3b5a9b3c3939aafa5389246f3a7a7e78d70fe623bed495f99c39cc37bbbe645
    
    23
    -        target_replace:
    
    24
    -          '^torbrowser-(?!testbuild).*': 'torbrowser-linux-x86_64'