Skip to content
Snippets Groups Projects
Verified Commit 0310a2c7 authored by shelikhoo's avatar shelikhoo
Browse files

Add WebTunnel Integration

This is a squashed commit that includes:
Replace cgo Condition in Go Config
Include WebTunnel README in Browser
Include WebTunnel into Tor Expert Bundle
Add WebTunnel to default torrc
Add WebTunnel project

Their original form is available at:
https://gitlab.torproject.org/shelikhoo/tor-browser-build-2/-/commits/dev-webtunnel-rebased-backup

See also: tpo/applications/tor-browser-build!595
parent a7d80ad3
Branches
Tags
1 merge request!595Adding Webtunnel Intergration to Tor Browser
......@@ -3,3 +3,6 @@ ClientTransportPlugin meek_lite,obfs2,obfs3,obfs4,scramblesuit exec ./TorBrowser
## snowflake configuration
ClientTransportPlugin snowflake exec ./TorBrowser/Tor/PluggableTransports/snowflake-client
## webtunnel configuration
ClientTransportPlugin webtunnel exec ./TorBrowser/Tor/PluggableTransports/webtunnel-client
......@@ -3,3 +3,6 @@ ClientTransportPlugin meek_lite,obfs2,obfs3,obfs4,scramblesuit exec PluggableTra
## snowflake configuration
ClientTransportPlugin snowflake exec PluggableTransports/snowflake-client
## webtunnel configuration
ClientTransportPlugin webtunnel exec PluggableTransports/webtunnel-client
......@@ -3,3 +3,6 @@ ClientTransportPlugin meek_lite,obfs2,obfs3,obfs4,scramblesuit exec TorBrowser\T
## snowflake configuration
ClientTransportPlugin snowflake exec TorBrowser\Tor\PluggableTransports\snowflake-client.exe
## webtunnel configuration
ClientTransportPlugin webtunnel exec TorBrowser\Tor\PluggableTransports\webtunnel-client.exe
......@@ -88,10 +88,14 @@ mv [% c('input_files_by_name/noscript') %] "$TBDIR/$EXTSPATH/{73a6fe31-595d-460b
rm -f aarch64/tor/pluggable_transports/bridges_list.*.txt
[% END -%]
# Snowflake's README is the only documentation shipped in tor-expert-bundle
# Snowflake's README is a documentation shipped in tor-expert-bundle
mkdir -p "$TBDIR/$DOCSPATH/snowflake" [% IF c("var/macos_universal") %]"$TBDIR_AARCH64/$DOCSPATH/snowflake"[% END %]
mv_tbdir tor/pluggable_transports/README.SNOWFLAKE.md "$DOCSPATH/snowflake/README.md"
# WebTunnel's README is a documentation shipped in tor-expert-bundle
mkdir -p "$TBDIR/$DOCSPATH/webtunnel" [% IF c("var/macos_universal") %]"$TBDIR_AARCH64/$DOCSPATH/webtunnel"[% END %]
mv_tbdir tor/pluggable_transports/README.WEBTUNNEL.md "$DOCSPATH/webtunnel/README.md"
# Move the PTs to where TB expects them
mkdir -p "$TBDIR/$TORBINPATH" [% IF c("var/macos_universal") %]"$TBDIR_AARCH64/$TORBINPATH"[% END %]
mv_tbdir tor/pluggable_transports "$TORBINPATH/PluggableTransports"
......
......
......@@ -26,7 +26,7 @@ var:
export CGO_LDFLAGS_ALLOW="-z|noexecstack"
export CGO_LDFLAGS="-z noexecstack"
[% END -%]
[% IF c("var/linux-i686") -%]
[% IF c("var/cgo") -%]
export CGO_ENABLED=1
[% END -%]
export GOTMPDIR=/var/tmp/build/go-tmp
......
......
......@@ -11,6 +11,7 @@ mkdir pluggable_transports && cd pluggable_transports
tar -xkf $rootdir/[% c('input_files_by_name/obfs4') %]
tar -xkf $rootdir/[% c('input_files_by_name/snowflake') %]
tar -xkf $rootdir/[% c('input_files_by_name/webtunnel') %]
# copy in bridge lines for each pluggable transport
mv $rootdir/bridges_list.obfs4.txt .
......
......
......@@ -13,6 +13,8 @@ input_files:
project: obfs4
- name: snowflake
project: snowflake
- project: webtunnel
name: webtunnel
- filename: bridges_list.obfs4.txt
- filename: bridges_list.meek-azure.txt
- filename: bridges_list.snowflake.txt
\ No newline at end of file
#!/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 -%]
tar -C /var/tmp/dist -xf [% c('input_files_by_name/goptlib') %]
mkdir -p /var/tmp/build
tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
cd /var/tmp/build/[% project %]-[% c('version') %]
mkdir -p "$GOPATH/src/gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/webtunnel.git"
ln -sf "$PWD" "$GOPATH/src/gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/webtunnel"
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 => '-czf ' _ dest_dir _ '/' _ c('filename'),
}) %]
# vim: filetype=yaml sw=2
version: '[% c("abbrev") %]'
git_url: https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/webtunnel.git
git_hash: 2ecf64381bad8a5db45c5871dcad7d12831dca69
filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'
container:
use_container: 1
input_files:
- project: container-image
- name: go
project: go
- name: goptlib
project: goptlib
- name: '[% c("var/compiler") %]'
project: '[% c("var/compiler") %]'
enable: '[% c("var/android") %]'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment