Opened 4 years ago

Closed 10 months ago

#19569 closed enhancement (invalid)

DataChannel-only libwebrtc

Reported by: arlolra Owned by: arlolra
Priority: Medium Milestone:
Component: Circumvention/Snowflake Version:
Severity: Normal Keywords:
Cc: dcf, serene Actual Points:
Parent ID: #19001 Points:
Reviewer: Sponsor:



This is my first working patch,

It applies against f33698296719f956497d2dbff81b5080864a8804, which was HEAD of branch-heads/52 when I started, and the current build of go-webrtc (see

To use it,

gclient sync -r f33698296719f956497d2dbff81b5080864a8804
cd src/
git am the.patch
GYP_DEFINES="include_tests=0 include_examples=0" python webrtc/build/gyp_webrtc webrtc/api/api.gyp
ninja -C out/Release

Then do the usual concatenating stuff. It's important to note here that the patch ifdefs in a few headers, so be sure to update those or you'll get some segfaults.

All the go-webrtc / snowflake tests passed, and I was able to bootstrap a tor client with it.

I was also able to make this change to go-webrtc/webrtc-darwin-amd64.pc,

-       -framework AppKit \
-       -framework CoreAudio \
-       -framework AudioToolbox
+       -framework AppKit

This trimmed the build by about 10MB, and I assume with a little more work can be improved.

Child Tickets

Attachments (1)

0001-DataChannel-only-libwebrtc.patch (48.7 KB) - added by arlolra 4 years ago.

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by arlolra

comment:1 Changed 4 years ago by arlolra

Attached is a patch to dcf's snowflake fork of tor-browser-bundle from #19001 that applies my libwebrtc patch, linked to above.

Some bundles built with it can be found here:

It reduces the size (on Linux) of snowflake-client from

15746976 Jan  1  2000 snowflake-client


 9717904 Jan  1  2000 snowflake-client

so, not insignificant. However, the tarred bundles only go from

75344292 Aug  6 16:49 tor-browser-linux32-6.5a1_en-US.tar.xz
73896836 Aug  6 17:17 tor-browser-linux64-6.5a1_en-US.tar.xz


73548680 Aug 13 23:49 tor-browser-linux32-6.5a1_en-US.tar.xz
72283512 Aug 13 23:49 tor-browser-linux64-6.5a1_en-US.tar.xz

comment:2 Changed 2 years ago by arma

So it saves over 6 megabytes on the executable, but when compressed, that savings turns into more like 1-2 megabytes?

Sounds like there's a lot of redundancy in the binary.

Does cutting out the other parts of libwebrtc give us savings in some other step, like disk usage or time in the build process? Or is the only question about size of shipped packages / binary?

comment:3 Changed 10 months ago by arlolra

Resolution: invalid
Status: newclosed

No longer necessary after #28942

Note: See TracTickets for help on using tickets.