[Git][tpo/applications/tor-browser-build][main] Add WebTunnel Integration

Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build Commits: 0310a2c7 by Shelikhoo at 2022-12-07T14:57:22+00:00 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-we... See also: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/merge_req... - - - - - 9 changed files: - projects/browser/Bundle-Data/PTConfigs/linux/torrc-defaults-appendix - projects/browser/Bundle-Data/PTConfigs/mac/torrc-defaults-appendix - projects/browser/Bundle-Data/PTConfigs/windows/torrc-defaults-appendix - projects/browser/build - projects/go/config - projects/tor-expert-bundle/build - projects/tor-expert-bundle/config - + projects/webtunnel/build - + projects/webtunnel/config Changes: ===================================== projects/browser/Bundle-Data/PTConfigs/linux/torrc-defaults-appendix ===================================== @@ -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 ===================================== projects/browser/Bundle-Data/PTConfigs/mac/torrc-defaults-appendix ===================================== @@ -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 ===================================== projects/browser/Bundle-Data/PTConfigs/windows/torrc-defaults-appendix ===================================== @@ -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 ===================================== projects/browser/build ===================================== @@ -88,9 +88,13 @@ 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 %] ===================================== projects/go/config ===================================== @@ -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 ===================================== projects/tor-expert-bundle/build ===================================== @@ -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 . ===================================== projects/tor-expert-bundle/config ===================================== @@ -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 + - filename: bridges_list.snowflake.txt \ No newline at end of file ===================================== projects/webtunnel/build ===================================== @@ -0,0 +1,34 @@ +#!/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'), + }) %] ===================================== projects/webtunnel/config ===================================== @@ -0,0 +1,17 @@ +# vim: filetype=yaml sw=2 +version: '[% c("abbrev") %]' +git_url: https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/webtu... +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") %]' View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/03... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/03... You're receiving this email because of your account on gitlab.torproject.org.
participants (1)
-
Pier Angelo Vendrame (@pierov)