nixos/localsend: allow udp port

This commit is contained in:
Guanran Wang 2024-08-09 23:16:30 +08:00
parent 9ac4777d98
commit 0b097987fe
No known key found for this signature in database
GPG Key ID: 91F97D9ED12639CF
2 changed files with 2 additions and 0 deletions

View File

@ -24,6 +24,7 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ]; environment.systemPackages = [ cfg.package ];
networking.firewall.allowedTCPPorts = lib.optionals cfg.openFirewall [ firewallPort ]; networking.firewall.allowedTCPPorts = lib.optionals cfg.openFirewall [ firewallPort ];
networking.firewall.allowedUDPPorts = lib.optionals cfg.openFirewall [ firewallPort ];
}; };
meta.maintainers = with lib.maintainers; [ pandapip1 ]; meta.maintainers = with lib.maintainers; [ pandapip1 ];

View File

@ -16,6 +16,7 @@ import ./make-test-python.nix (
machine.wait_for_open_port(53317) machine.wait_for_open_port(53317)
machine.wait_for_window("LocalSend", 10) machine.wait_for_window("LocalSend", 10)
machine.succeed("netstat --listening --program --tcp | grep -P 'tcp.*53317.*localsend'") machine.succeed("netstat --listening --program --tcp | grep -P 'tcp.*53317.*localsend'")
machine.succeed("netstat --listening --program --udp | grep -P 'udp.*53317.*localsend'")
''; '';
} }
) )