[tbb-commits] [Git][tpo/applications/tor-browser-build][main] Bug 40800: Add WebTunnel support for mobile
Pier Angelo Vendrame (@pierov)
git at gitlab.torproject.org
Fri Mar 3 16:46:29 UTC 2023
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:
- projects/tor-android-service/config
- + projects/tor-onion-proxy-library/0001-Bug-40800-Add-WebTunnel-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: 27924bc748044e987c188be854ff1471397cdb6a
+git_hash: 0438a9a4ce1548be08dd2df891a38987bb313d22
git_url: https://gitlab.torproject.org/tpo/applications/tor-android-service.git
git_submodule: 1
container:
=====================================
projects/tor-onion-proxy-library/0001-Bug-40800-Add-WebTunnel-support.patch
=====================================
@@ -0,0 +1,74 @@
+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(" -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");
++ buffer.append("ClientTransportPlugin webtunnel exec ").append(webtunnelPath).append('\n');
+ return this;
+ }
+
+--
+2.34.1
+
=====================================
projects/tor-onion-proxy-library/build
=====================================
@@ -25,6 +25,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
[% FOREACH arch = ['armv7', 'aarch64', 'x86', 'x86_64'] -%]
# Extract tor-expert-bundle
@@ -41,14 +42,18 @@ patch -p1 < $rootdir/0001-Bug-41361-Add-conjure-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/obfs4proxy external/pluto/bin/arm64-v8a/
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/obfs4proxy external/pluto/bin/[% arch %]/
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,3 +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
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/c642347541658a50cb688f797f138b266ce35872
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/c642347541658a50cb688f797f138b266ce35872
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/20230303/51c3e127/attachment-0001.htm>
More information about the tbb-commits
mailing list