tor cleanup
This commit is contained in:
parent
28aa41ddf8
commit
c9b26002c0
|
@ -2,6 +2,10 @@
|
|||
services.tor = {
|
||||
settings = {
|
||||
Nickname = "DXV7520";
|
||||
ORPort = [
|
||||
{ addr = "91.210.59.57"; port = 443; }
|
||||
{ addr = "[2a0d:3e83:1:b284::1]"; port = 443; }
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -8,30 +8,15 @@
|
|||
};
|
||||
settings = {
|
||||
ContactInfo = "admin@caspervk.net";
|
||||
ControlPort = 9051; # for nyx
|
||||
DirPort = 80;
|
||||
ORPort =
|
||||
# TOR requires each IPv6 address to be configured explicity
|
||||
let
|
||||
interfaces = builtins.attrValues config.networking.interfaces;
|
||||
ipv6Addresses = pkgs.lib.lists.flatten (map (interface: interface.ipv6.addresses) interfaces);
|
||||
ipv6Ports = map
|
||||
(a: {
|
||||
addr = "[${a.address}]";
|
||||
port = 443;
|
||||
})
|
||||
ipv6Addresses;
|
||||
in
|
||||
[
|
||||
443
|
||||
] ++ ipv6Ports;
|
||||
ControlPort = 9051;
|
||||
DirPortFrontPage = builtins.toFile "tor-exit-notice.html" (builtins.readFile ./tor-exit-notice.html);
|
||||
ExitRelay = true;
|
||||
IPv6Exit = true;
|
||||
ExitPolicy = [
|
||||
"reject *:25"
|
||||
"accept *:*"
|
||||
];
|
||||
IPv6Exit = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -41,7 +26,7 @@
|
|||
|
||||
environment.persistence."/nix/persist" = {
|
||||
directories = [
|
||||
{ directory = "/var/lib/tor/keys"; user = "tor"; group = "tor"; mode = "0700"; }
|
||||
{ directory = "/var/lib/tor"; user = "tor"; group = "tor"; mode = "0700"; }
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue