Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthew Finkel
tor-browser-build
Commits
4d577555
Commit
4d577555
authored
May 29, 2020
by
Matthew Finkel
Browse files
Bug 30318 - Integrate snowflake on Android
parent
853e75e9
Changes
4
Hide whitespace changes
Inline
Side-by-side
projects/tor-android-service/config
View file @
4d577555
# vim: filetype=yaml sw=2
version
:
'
[%
c("abbrev")
%]'
filename
:
'
[%
project
%]-[%
c("version")
%]-[%
c("var/build_id")
%]'
git_hash
:
e
d2e1479eeddede01b1d510ef79dc5ec798b39c0
git_hash
:
e
cc251d0a73f7e2034a271efd28036a0108b8688
git_url
:
https://git.torproject.org/tor-android-service.git
git_submodule
:
1
...
...
projects/tor-onion-proxy-library/0001-Bug-30318-Add-snowflake-support.patch
0 → 100644
View file @
4d577555
From e006e215b274b1b834e098b199ea2697bc11b0f1 Mon Sep 17 00:00:00 2001
From: Georg Koppen <gk@torproject.org>
Date: Sun, 10 May 2020 08:29:10 +0000
Subject: [PATCH] Bug 30318: Add snowflake support
diff --git a/android/build.gradle b/android/build.gradle
index a8d9bdc..2392731 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -93,6 +93,9 @@
task copyPluggableTransports(type: Copy) {
rename { filename ->
filename.replace 'obfs4proxy', 'libObfs4proxy.so'
}
+ rename { filename ->
+ filename.replace 'snowflake-client', 'libSnowflake.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 2405097..bcb6a37 100644
--- a/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java
+++ b/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java
@@ -109,22 +109,33 @@
public final class TorConfigBuilder {
return this;
}
- public TorConfigBuilder configurePluggableTransportsFromSettings(File pluggableTransportClient) throws IOException {
- if (pluggableTransportClient == null) {
+ public TorConfigBuilder configurePluggableTransportsFromSettings(File pluggableTransportObfs, File pluggableTransportSnow) throws IOException {
+ if (pluggableTransportObfs == null || pluggableTransportSnow == null) {
return this;
}
- if (!pluggableTransportClient.exists()) {
- throw new IOException("Bridge binary does not exist: " + pluggableTransportClient
+ if (!pluggableTransportObfs.exists()) {
+ throw new IOException("Obfs4proxy binary does not exist: " + pluggableTransportObfs
.getCanonicalPath());
}
- if (!pluggableTransportClient.canExecute()) {
- throw new IOException("Bridge binary is not executable: " + pluggableTransportClient
+ if (!pluggableTransportSnow.exists()) {
+ throw new IOException("Snowflake binary does not exist: " + pluggableTransportSnow
.getCanonicalPath());
}
- transportPlugin(pluggableTransportClient.getCanonicalPath());
+ if (!pluggableTransportObfs.canExecute()) {
+ throw new IOException("Obfs4proxy binary is not executable: " + pluggableTransportObfs
+ .getCanonicalPath());
+ }
+
+ if (!pluggableTransportSnow.canExecute()) {
+ throw new IOException("Snowflake binary is not executable: " + pluggableTransportSnow
+ .getCanonicalPath());
+ }
+
+
+ transportPlugin(pluggableTransportObfs.getCanonicalPath(), pluggableTransportSnow.getCanonicalPath());
return this;
}
@@ -491,8 +502,9 @@
public final class TorConfigBuilder {
return transPort(settings.transPort());
}
- public TorConfigBuilder transportPlugin(String clientPath) {
- buffer.append("ClientTransportPlugin meek_lite,obfs3,obfs4 exec ").append(clientPath).append('\n');
+ public TorConfigBuilder transportPlugin(String obfsPath, String snowPath) {
+ buffer.append("ClientTransportPlugin meek_lite,obfs3,obfs4 exec ").append(obfsPath).append('\n');
+ buffer.append("ClientTransportPlugin snowflake exec ").append(snowPath).append(" -url https://snowflake-broker.azureedge.net/ -front ajax.aspnetcdn.com -ice stun:stun.l.google.com:19302\n");
return this;
}
@@ -557,6 +569,9 @@
public final class TorConfigBuilder {
case 3:
reqBridgeType = "meek_lite";
break;
+ case 4:
+ reqBridgeType = "snowflake";
+ break;
default:
throw new IOException("Requested unknown transport type: " + bridgesType);
}
--
2.26.2
projects/tor-onion-proxy-library/build
View file @
4d577555
...
...
@@ -22,6 +22,7 @@ cd /var/tmp/build/[% project %]-[% c('version') %]
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
# Extract obfs4proxy from TorBrowser/Tor/PluggableTransports/obfs4proxy
tar
--
strip
-
components
=
4
-
xf
$
rootdir
/
[
%
c
(
'input_files_by_name/obfs4'
)
%
]
...
...
projects/tor-onion-proxy-library/config
View file @
4d577555
...
...
@@ -28,3 +28,4 @@ input_files:
exec
:
'
[%
INCLUDE
"fetch-gradle-dependencies"
%]'
-
filename
:
gradle.patch
-
filename
:
0001-Bug-33931-Filter-bridges-in-stream-by-type.patch
-
filename
:
0001-Bug-30318-Add-snowflake-support.patch
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment