diff --git a/nixos/modules/services/security/tor.nix b/nixos/modules/services/security/tor.nix
index 61b751bb518b..6f4852c3ba1a 100644
--- a/nixos/modules/services/security/tor.nix
+++ b/nixos/modules/services/security/tor.nix
@@ -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
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.
@@ -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";
diff --git a/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix b/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix
index 2c6940e037cd..834be5cd3020 100644
--- a/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix
+++ b/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix
@@ -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 <