This commit is contained in:
parent
2bb91dff9b
commit
572d2f09ae
2 changed files with 27 additions and 0 deletions
26
os/3proxy.nix
Normal file
26
os/3proxy.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
services._3proxy = {
|
||||
enable = true;
|
||||
services = [
|
||||
{
|
||||
type = "socks";
|
||||
auth = [ "strong" ];
|
||||
acl = [ {
|
||||
rule = "allow";
|
||||
users = [ "user1" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
usersFile = "/etc/3proxy.passwd";
|
||||
};
|
||||
|
||||
environment.etc = {
|
||||
"3proxy.passwd".text = ''
|
||||
user1:CR:$1$TqAb0wvc$e.O2GhdhXaMYSxNdNBmzh/
|
||||
'';
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 1080 ];
|
||||
networking.firewall.allowedUDPPorts = [ 1080 ];
|
||||
}
|
||||
|
|
@ -8,6 +8,7 @@ in {
|
|||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../common.nix
|
||||
../3proxy.nix
|
||||
inputs.simple-nixos-mailserver.nixosModule
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue