Skip to content

Commit

Permalink
torbrowser: support obfs and fte transports
Browse files Browse the repository at this point in the history
meek still broken, but then, sending all your traffic to Amazon seems like
something you'd do only if everything else fails.
  • Loading branch information
joachifm committed Mar 27, 2017
1 parent 6c116b8 commit 6911ae7
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions pkgs/applications/networking/browsers/torbrowser/default.nix
Expand Up @@ -34,6 +34,9 @@
, gst-ffmpeg
, gmp
, ffmpeg

# Pluggable transport dependencies
, python27
}:

with stdenv.lib;
Expand Down Expand Up @@ -74,6 +77,9 @@ let
gst-ffmpeg
];

# Library search path for the fte transport
fteLibPath = makeLibraryPath [ stdenv.cc.cc gmp ];

# Upstream source
version = "6.5.1";

Expand Down Expand Up @@ -129,6 +135,24 @@ stdenv.mkDerivation rec {
# and torLibPath for accuracy, but this is more convenient ...
libPath=${libPath}:$TBB_IN_STORE:$TBB_IN_STORE/TorBrowser/Tor
# Fixup paths to pluggable transports.
sed -i TorBrowser/Data/Tor/torrc-defaults \
-e "s,./TorBrowser,$TBB_IN_STORE/TorBrowser,g"
# Fixup obfs transport. Work around patchelf failing to set
# interpreter for pre-compiled Go binaries by invoking the interpreter
# directly.
sed -i TorBrowser/Data/Tor/torrc-defaults \
-e "s|\(ClientTransportPlugin obfs2,obfs3,obfs4,scramblesuit\) exec|\1 exec $interp|" \
# Fixup fte transport
#
# Note: the script adds its dirname to search path automatically
sed -i TorBrowser/Tor/PluggableTransports/fteproxy.bin \
-e "s,/usr/bin/env python,${python27.interpreter},"
patchelf --set-rpath "${fteLibPath}" TorBrowser/Tor/PluggableTransports/fte/cDFA.so
# Prepare for autoconfig.
#
# See https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment
Expand Down

0 comments on commit 6911ae7

Please sign in to comment.