[tbb-commits] [Git][tpo/applications/tor-browser-build][main] Bug 41111: Use Lyrebird to provide WebTunnel PT Client

richard (@richard) git at gitlab.torproject.org
Mon Apr 22 21:35:46 UTC 2024



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


Commits:
991ebf57 by Richard Pospesel at 2024-04-22T19:24:31+00:00
Bug 41111: Use Lyrebird to provide WebTunnel PT Client

- - - - -


13 changed files:

- Makefile
- projects/browser/build
- projects/lyrebird/config
- projects/tor-android-service/config
- projects/tor-expert-bundle/build
- projects/tor-expert-bundle/config
- projects/tor-expert-bundle/pt_config.json
- − projects/tor-onion-proxy-library/0001-Bug-40800-Add-WebTunnel-support.patch
- + projects/tor-onion-proxy-library/0001-Bug-41111-Use-Lyrebird-to-provide-WebTunnel-PT-Client.patch
- projects/tor-onion-proxy-library/build
- projects/tor-onion-proxy-library/config
- − projects/webtunnel/build
- − projects/webtunnel/config


Changes:

=====================================
Makefile
=====================================
@@ -643,9 +643,6 @@ go_vendor-snowflake: submodule-update
 go_vendor-conjure: submodule-update
 	$(rbm) build conjure --step go_vendor --target alpha --target torbrowser-linux-x86_64
 
-go_vendor-webtunnel: submodule-update
-	$(rbm) build webtunnel --step go_vendor --target alpha --target torbrowser-linux-x86_64
-
 go_vendor-lyrebird: submodule-update
 	$(rbm) build lyrebird --step go_vendor --target alpha --target torbrowser-linux-x86_64
 


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


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


=====================================
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: 0438a9a4ce1548be08dd2df891a38987bb313d22
+git_hash: 27924bc748044e987c188be854ff1471397cdb6a
 git_url: https://gitlab.torproject.org/tpo/applications/tor-android-service.git
 git_submodule: 1
 container:


=====================================
projects/tor-expert-bundle/build
=====================================
@@ -15,7 +15,6 @@ mkdir pluggable_transports && cd pluggable_transports
 
 tar -xkf $rootdir/[% c('input_files_by_name/lyrebird') %]
 tar -xkf $rootdir/[% c('input_files_by_name/snowflake') %]
-tar -xkf $rootdir/[% c('input_files_by_name/webtunnel') %]
 tar -xkf $rootdir/[% c('input_files_by_name/conjure') %]
 
 # add per-platform pt extension
@@ -35,7 +34,6 @@ cd $distdir
   cp -a tor/pluggable_transports/conjure-client aar/jni/[% c('arch') %]/libConjure.so
   cp -a tor/pluggable_transports/lyrebird aar/jni/[% c('arch') %]/Lyrebird.so
   cp -a tor/pluggable_transports/snowflake-client aar/jni/[% c('arch') %]/libSnowflake.so
-  cp -a tor/pluggable_transports/webtunnel-client aar/jni/[% c('arch') %]/libWebtunnel.so
 
   cp -a data/* aar/assets/common/
 


=====================================
projects/tor-expert-bundle/config
=====================================
@@ -18,8 +18,6 @@ input_files:
     project: lyrebird
   - name: snowflake
     project: snowflake
-  - project: webtunnel
-    name: webtunnel
   - name: conjure
     project: conjure
   - filename: pt_config.json


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


=====================================
projects/tor-onion-proxy-library/0001-Bug-40800-Add-WebTunnel-support.patch deleted
=====================================
@@ -1,74 +0,0 @@
-From 3a6f835e8089dd15f5cd6487b5cfbdfafe7422f8 Mon Sep 17 00:00:00 2001
-From: Shelikhoo <xiaokangwang at outlook.com>
-Date: Tue, 14 Feb 2023 16:59:59 +0000
-Subject: [PATCH] add WebTunnel Support
-
----
- android/build.gradle                          |  3 +++
- .../thali/toronionproxy/TorConfigBuilder.java | 19 +++++++++++++++----
- 2 files changed, 18 insertions(+), 4 deletions(-)
-
-diff --git a/android/build.gradle b/android/build.gradle
-index e107e8e..acd92c1 100644
---- a/android/build.gradle
-+++ b/android/build.gradle
-@@ -102,6 +102,9 @@ task copyPluggableTransports(type: Copy) {
-     rename { filename ->
-         filename.replace 'conjure-client', 'libConjure.so'
-     }
-+    rename { filename ->
-+        filename.replace 'webtunnel-client', 'libWebtunnel.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 b87993d..5e6d6c5 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, File pluggableTransportConjure) throws IOException {
--        if (pluggableTransportObfs == null  || pluggableTransportSnow == null || pluggableTransportConjure == null) {
-+    public TorConfigBuilder configurePluggableTransportsFromSettings(File pluggableTransportObfs, File pluggableTransportSnow, File pluggableTransportConjure, File pluggableTransportWebtunnel) throws IOException {
-+        if (pluggableTransportObfs == null  || pluggableTransportSnow == null || pluggableTransportConjure == null || pluggableTransportWebtunnel == null) {
-             return this;
-         }
- 
-@@ -144,7 +144,17 @@ public final class TorConfigBuilder {
-                     .getCanonicalPath());
-         }
- 
--        transportPlugin(pluggableTransportObfs.getCanonicalPath(), pluggableTransportSnow.getCanonicalPath(), pluggableTransportConjure.getCanonicalPath());
-+        if (!pluggableTransportWebtunnel.exists()) {
-+            throw new IOException("Webtunnel binary does not exist: " + pluggableTransportWebtunnel
-+                    .getCanonicalPath());
-+        }
-+
-+        if (!pluggableTransportWebtunnel.canExecute()) {
-+            throw new IOException("Webtunnel binary is not executable: " + pluggableTransportWebtunnel
-+                    .getCanonicalPath());
-+        }
-+
-+        transportPlugin(pluggableTransportObfs.getCanonicalPath(), pluggableTransportSnow.getCanonicalPath(), pluggableTransportConjure.getCanonicalPath(), pluggableTransportWebtunnel.getCanonicalPath());
-         return this;
-     }
- 
-@@ -511,10 +521,11 @@ public final class TorConfigBuilder {
-         return transPort(settings.transPort());
-     }
- 
--    public TorConfigBuilder transportPlugin(String obfsPath, String snowPath, String conjurePath) {
-+    public TorConfigBuilder transportPlugin(String obfsPath, String snowPath, String conjurePath, String webtunnelPath) {
-         buffer.append("ClientTransportPlugin meek_lite,obfs3,obfs4 exec ").append(obfsPath).append('\n');
-         buffer.append("ClientTransportPlugin snowflake exec ").append(snowPath).append('\n');
-         buffer.append("ClientTransportPlugin conjure exec ").append(conjurePath).append(" -registerURL https://registration.refraction.network/api\n");
-+        buffer.append("ClientTransportPlugin webtunnel exec ").append(webtunnelPath).append('\n');
-         return this;
-     }
- 
--- 
-2.34.1
-


=====================================
projects/tor-onion-proxy-library/0001-Bug-41111-Use-Lyrebird-to-provide-WebTunnel-PT-Client.patch
=====================================
@@ -0,0 +1,19 @@
+From 4aa1038fd0d3acc212579fbd94566e062dd187e6 Mon Sep 17 00:00:00 2001
+From: Richard Pospesel <richard at torproject.org>
+Date: Mon, 22 Apr 2024 17:38:49 +0000
+Subject: [PATCH] add WebTunnel Support
+
+--- 
+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 8a439f8..77e6f35 100644
+--- a/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java
++++ b/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java
+@@ -512,7 +512,7 @@ public final class TorConfigBuilder {
+     }
+ 
+     public TorConfigBuilder transportPlugin(String obfsPath, String snowPath, String conjurePath) {
+-        buffer.append("ClientTransportPlugin meek_lite,obfs3,obfs4 exec ").append(obfsPath).append('\n');
++        buffer.append("ClientTransportPlugin meek_lite,obfs3,obfs4,webtunnel exec ").append(obfsPath).append('\n');
+         buffer.append("ClientTransportPlugin snowflake exec ").append(snowPath).append('\n');
+         buffer.append("ClientTransportPlugin conjure exec ").append(conjurePath).append(" -registerURL https://registration.refraction.network/api\n");
+         return this;


=====================================
projects/tor-onion-proxy-library/build
=====================================
@@ -37,7 +37,7 @@ 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
-patch -p1 < $rootdir/0001-Bug-40800-Add-WebTunnel-support.patch
+patch -p1 < $rootdir/0001-Bug-41111-Use-Lyrebird-to-provide-WebTunnel-PT-Client.patch
 
 [% FOREACH arch = ['armv7', 'aarch64', 'x86', 'x86_64'] -%]
   # Extract tor-expert-bundle
@@ -54,18 +54,14 @@ patch -p1 < $rootdir/0001-Bug-40800-Add-WebTunnel-support.patch
     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/
-    cp $ptdir/webtunnel-client external/pluto/bin/armeabi-v7a/
-    cp $ptdir/webtunnel-client external/pluto/bin/armeabi/
   [% ELSIF arch == "aarch64" -%]
     cp $ptdir/lyrebird external/pluto/bin/arm64-v8a/obfs4proxy
     cp $ptdir/snowflake-client external/pluto/bin/arm64-v8a/
     cp $ptdir/conjure-client external/pluto/bin/arm64-v8a/
-    cp $ptdir/webtunnel-client external/pluto/bin/arm64-v8a/
   [% ELSE -%]
     cp $ptdir/lyrebird external/pluto/bin/[% arch %]/obfs4proxy
     cp $ptdir/snowflake-client external/pluto/bin/[% arch %]/
     cp $ptdir/conjure-client external/pluto/bin/[% arch %]/
-    cp $ptdir/webtunnel-client external/pluto/bin/[% arch %]/
   [% END -%]
 [% END -%]
 


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


=====================================
projects/webtunnel/build deleted
=====================================
@@ -1,31 +0,0 @@
-#!/bin/bash
-[% c("var/set_default_env") -%]
-[% pc('go', 'var/setup', { go_tarfile => c('input_files_by_name/go') }) %]
-distdir=/var/tmp/dist/[% project %]
-mkdir -p $distdir
-
-[% IF c("var/android") -%]
-  [% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
-  # We need to explicitly set CGO_ENABLED with Go 1.13.x as the Android build
-  # breaks otherwise.
-  export CGO_ENABLED=1
-[% END -%]
-
-mkdir -p /var/tmp/build
-tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.[% c('compress_tar') %]
-cd /var/tmp/build/[% project %]-[% c('version') %]
-
-tar -xf $rootdir/[% c('input_files_by_name/go_vendor') %]
-
-cd main/client
-go build -ldflags '-s'
-cp -a client[% IF c("var/windows") %].exe[% END %] $distdir/webtunnel-client[% IF c("var/windows") %].exe[% END %]
-
-cd /var/tmp/build/[% project %]-[% c('version') %]
-cp -a README.md $distdir/README.WEBTUNNEL.md
-
-cd $distdir
-[% c('tar', {
-        tar_src => [ '.' ],
-        tar_args => '-caf ' _ dest_dir _ '/' _ c('filename'),
-    }) %]


=====================================
projects/webtunnel/config deleted
=====================================
@@ -1,24 +0,0 @@
-# vim: filetype=yaml sw=2
-version: '[% c("abbrev") %]'
-git_url: https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/webtunnel.git
-git_hash: 38eb55054a5c3c072acc1d8f9a9afa36e3a5c9b7
-container:
-  use_container: 1
-
-steps:
-  build:
-    filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.[% c("compress_tar") %]'
-    input_files:
-      - project: container-image
-      - name: go
-        project: go
-      - name: '[% c("var/compiler") %]'
-        project: '[% c("var/compiler") %]'
-        enable: '[% c("var/android") %]'
-      - name: go_vendor
-        pkg_type: go_vendor
-        project: webtunnel
-        norec:
-          sha256sum: e3b5a9b3c3939aafa5389246f3a7a7e78d70fe623bed495f99c39cc37bbbe645
-        target_replace:
-          '^torbrowser-(?!testbuild).*': 'torbrowser-linux-x86_64'



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/991ebf5726572540949ae820bd9d4ce4185a8f70

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/991ebf5726572540949ae820bd9d4ce4185a8f70
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/tbb-commits/attachments/20240422/df2ed2a7/attachment-0001.htm>


More information about the tbb-commits mailing list