summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2017-09-30 15:57:09 +0200
committerJoachim Fasting <joachifm@fastmail.fm>2017-10-03 02:42:48 +0200
commitf4f594e3597b2938fead465025fc1655295a47d6 (patch)
tree95e16c7e5a6bf0928592359c49ae908b0df71426
parentba689a2740d47636245451a34de50a2f59d890ba (diff)
downloadnixpkgs-f4f594e3597b2938fead465025fc1655295a47d6.tar
nixpkgs-f4f594e3597b2938fead465025fc1655295a47d6.tar.gz
nixpkgs-f4f594e3597b2938fead465025fc1655295a47d6.tar.bz2
nixpkgs-f4f594e3597b2938fead465025fc1655295a47d6.tar.lz
nixpkgs-f4f594e3597b2938fead465025fc1655295a47d6.tar.xz
nixpkgs-f4f594e3597b2938fead465025fc1655295a47d6.tar.zst
nixpkgs-f4f594e3597b2938fead465025fc1655295a47d6.zip
tor-browser-bundle: geoip support
-rw-r--r--pkgs/applications/networking/browsers/tor-browser-bundle/default.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix b/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix
index ddec26e9833..508ab6ec432 100644
--- a/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix
+++ b/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix
@@ -171,6 +171,19 @@ stdenv.mkDerivation rec {
       $bundleData/PTConfigs/bridge_prefs.js \
       >> defaults/pref/extension-overrides.js
 
+    # Configure geoip
+    #
+    # tor-launcher insists on resolving geoip data relative to torrc-defaults
+    # (and passes them directly on the tor command-line).
+    #
+    # Write the paths into torrc-defaults anyway, otherwise they'll be
+    # captured in the runtime torrc.
+    ln -s -t $TBDATA_PATH ${tor.geoip}/share/tor/geoip{,6}
+    cat >>$TBDATA_PATH/torrc-defaults <<EOF
+    GeoIPFile $TBDATA_IN_STORE/geoip
+    GeoIPv6File $TBDATA_IN_STORE/geoip6
+    EOF
+
     # Configure pluggable transports
     cat >>$TBDATA_PATH/torrc-defaults <<EOF
     ClientTransportPlugin obfs2,obfs3 exec ${obfsproxy}/bin/obfsproxy managed