add socks proxy in ks

This commit is contained in:
Antoine Vaure 2025-10-07 19:42:34 +02:00 committed by ant
parent ad97f8329a
commit ce3aadf4f0
2 changed files with 27 additions and 0 deletions

26
os/3proxy.nix Normal file
View 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 ];
}

View file

@ -8,6 +8,7 @@ in {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../common.nix ../common.nix
../3proxy.nix
inputs.simple-nixos-mailserver.nixosModule inputs.simple-nixos-mailserver.nixosModule
]; ];