nixos tor: use obfs4proxy, make transport list customizable

This commit is contained in:
Will Dietz 2019-04-29 22:56:47 -05:00
parent 63a13cce7c
commit f24f72e60b

View File

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