From 02eb997d3e068753920b3e78d6f48889f77bda54 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 3 Oct 2015 19:40:00 +0200 Subject: lass 2 configs: add privoxy configs lass 2: retiolum_privoxy -> privoxy-retiolum --- lass/2configs/privoxy-retiolum.nix | 21 +++++++++++++++++++++ lass/2configs/privoxy.nix | 15 +++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 lass/2configs/privoxy-retiolum.nix create mode 100644 lass/2configs/privoxy.nix (limited to 'lass/2configs') diff --git a/lass/2configs/privoxy-retiolum.nix b/lass/2configs/privoxy-retiolum.nix new file mode 100644 index 000000000..3a3641ad8 --- /dev/null +++ b/lass/2configs/privoxy-retiolum.nix @@ -0,0 +1,21 @@ +{ config, lib, ... }: + +let + r_ip = (head config.krebs.build.host.nets.retiolum.addrs4); + inherit (lib) head; + +in { + imports = [ + ./privoxy.nix + ]; + + services.privoxy.listenAddress = "${r_ip}:8118"; + + krebs.iptables = { + tables = { + filter.INPUT.rules = [ + { predicate = "-i retiolum -p tcp --dport 8118"; target = "ACCEPT"; } + ]; + }; + }; +} diff --git a/lass/2configs/privoxy.nix b/lass/2configs/privoxy.nix new file mode 100644 index 000000000..bf5f6e206 --- /dev/null +++ b/lass/2configs/privoxy.nix @@ -0,0 +1,15 @@ +{ config, ... }: + +{ + services.privoxy = { + enable = true; + extraConfig = '' + #use polipo + forward / localhost:8123 + + #route .onion through tor + forward-socks4a .onion localhost:9050 + ''; + }; + services.polipo.enable = true; +} -- cgit v1.2.3