Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • T Team
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 43
    • Issues 43
    • List
    • Boards
    • Service Desk
    • Milestones
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Anti-censorship
  • Team
  • Wiki
  • Tor Browser Integration Guide for New Pluggable Transports

Tor Browser Integration Guide for New Pluggable Transports · Changes

Page history
Update Tor Browser Integration Guide for New Pluggable Transports authored Oct 14, 2022 by Cecylia Bocovich's avatar Cecylia Bocovich
Hide whitespace changes
Inline Side-by-side
Tor-Browser-Integration-Guide-for-New-Pluggable-Transports.md
View page @ 23037ec5
......@@ -45,8 +45,61 @@ input_files:
```
#### Writitng the `build` script
#### Writing the `build` script
Most of the build script can be copied from an additional project and modified to change the name of the target PT.
```bash
#!/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 -%]
```
Each dependency listed in the `input_files` part of the `config` above needs to be extracted into the right place. Which projects these are will depend on the PT:
```bash
tar -C /var/tmp/dist -xf [% c('input_files_by_name/goptlib') %]
tar -C /var/tmp/dist -xf [% c('input_files_by_name/go-dep-1') %]
tar -C /var/tmp/dist -xf [% c('input_files_by_name/go-dep-2') %]
```
```bash
mkdir -p /var/tmp/build
tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
cd /var/tmp/build/[% project %]-[% c('version') %]
```
Make a directly in the `$GOPATH` for the PT source code:
```bash
mkdir -p "$GOPATH/src/[domain name and path for the PT git repository]"
```
```bash
cd client
go build -ldflags '-s'
```
Copy the compiled client binary to the right filename, depending on the platform.
```bash
cp -a client[% IF c("var/windows") %].exe[% END %] $distdir/newpt-client[% IF c("var/windows") %].exe[% END %]
```
If there is a README, copy it.
```bash
cd ..
cp -a README.md $distdir/README.NEWPT.md
cd $distdir
[% c('tar', {
tar_src => [ '.' ],
tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
}) %]
```
After the project has been defined, it can be tested and debugged by building just the project directly:
```
......
Clone repository
  • AChildsGardenOfPluggableTransports
  • Anti censorship reading group
  • Baby Name Book
  • Censorship Events
  • Default Bridges
  • Onbasca Survival Guide
  • OnionSproutsBot Survival Guide
  • Previous Roadmaps
  • Processes
    • Emergencies
    • Miscellaneous
    • Monthly team report
    • Supporting NGOs with private bridges
  • Research ideas
  • Roadmaps
    • Core Tor Roadmap
View All Pages