Merge pull request #60575 from dtzWill/feature/obfs4proxy

obfs4: init at 0.0.10, use in tor-browser-bundle's, tor service
This commit is contained in:
Joachim F 2019-05-03 09:48:02 +00:00 committed by GitHub
commit 5ad1e9f0bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 7 deletions

View File

@ -81,7 +81,7 @@ let
${optionalString (elem cfg.relay.role ["bridge" "private-bridge"]) ''
BridgeRelay 1
ServerTransportPlugin obfs2,obfs3 exec ${pkgs.pythonPackages.obfsproxy}/bin/obfsproxy managed
ServerTransportPlugin ${concatStringsSep "," cfg.relay.bridgeTransports} exec ${obfs4}/bin/obfs4proxy managed
ExtORPort auto
${optionalString (cfg.relay.role == "private-bridge") ''
ExtraInfoStatistics 0
@ -355,7 +355,7 @@ in
<para>
Regular bridge. Works like a regular relay, but
doesn't list you in the public relay directory and
hides your Tor node behind obfsproxy.
hides your Tor node behind obfs4proxy.
</para>
<para>
@ -424,6 +424,13 @@ in
'';
};
bridgeTransports = mkOption {
type = types.listOf types.str;
default = ["obfs4"];
example = ["obfs2" "obfs3" "obfs4" "scramblesuit"];
description = "List of pluggable transports";
};
nickname = mkOption {
type = types.str;
default = "anonymous";

View File

@ -34,7 +34,7 @@
, rsync
# Pluggable transports
, obfsproxy
, obfs4
# Customization
, extraPrefs ? ""
@ -171,9 +171,9 @@ stdenv.mkDerivation rec {
EOF
# Configure pluggable transports
cat >>$TBDATA_PATH/torrc-defaults <<EOF
ClientTransportPlugin obfs2,obfs3 exec ${obfsproxy}/bin/obfsproxy managed
EOF
substituteInPlace $TBDATA_PATH/torrc-defaults \
--replace "./TorBrowser/Tor/PluggableTransports/obfs4proxy" \
"${obfs4}/bin/obfs4proxy"
# Hard-code path to TBB fonts; xref: FONTCONFIG_FILE in the wrapper below
sed $bundleData/$bundlePlatform/Data/fontconfig/fonts.conf \

View File

@ -0,0 +1,21 @@
{ lib, fetchgit, buildGoModule }:
buildGoModule rec {
pname = "obfs4";
version = "0.0.10";
src = fetchgit {
url = meta.repositories.git;
rev = "refs/tags/${pname}proxy-${version}";
sha256 = "05aqmw8x8s0yqyqmdj5zcsq06gsbcmrlcd52gaqm20m1pg9503ad";
};
modSha256 = "150kg22kznrdj5icjxk3qd70g7wpq8zd2zklw1y2fgvrggw8zvyv";
meta = with lib; {
description = "A pluggable transport proxy";
homepage = https://www.torproject.org/projects/obfsproxy;
repositories.git = https://git.torproject.org/pluggable-transports/obfs4.git;
maintainers = with maintainers; [ phreedom thoughtpolice ];
};
}

View File

@ -4787,6 +4787,8 @@ in
obexd = callPackage ../tools/bluetooth/obexd { };
obfs4 = callPackage ../tools/networking/obfs4 { };
oci-image-tool = callPackage ../tools/misc/oci-image-tool { };
ocproxy = callPackage ../tools/networking/ocproxy { };
@ -6097,7 +6099,6 @@ in
tor-browser-bundle = callPackage ../applications/networking/browsers/tor-browser-bundle {
stdenv = stdenvNoCC;
tor-browser-unwrapped = firefoxPackages.tor-browser;
inherit (python27Packages) obfsproxy;
};
touchegg = callPackage ../tools/inputmethods/touchegg { };