diff --git a/nix-system-configs/modules/system/traefik.nix b/nix-system-configs/modules/system/traefik.nix index 36abf3f..ae660ae 100644 --- a/nix-system-configs/modules/system/traefik.nix +++ b/nix-system-configs/modules/system/traefik.nix @@ -67,6 +67,16 @@ ]; }; }; + # TeamSpeak entry points + teamspeak-voice = { + address = ":9987/udp"; + }; + teamspeak-squery = { + address = ":10022/tcp"; + }; + teamspeak-data = { + address = ":30033/tcp"; + }; }; log = { level = "INFO"; @@ -124,6 +134,49 @@ ]; }; }; + + # TCP routing for TeamSpeak + tcp.routers = { + teamspeak-squery = { + rule = "HostSNI(`*`)"; + service = "teamspeak-squery"; + entryPoints = ["teamspeak-squery"]; + }; + teamspeak-data = { + rule = "HostSNI(`*`)"; + service = "teamspeak-data"; + entryPoints = ["teamspeak-data"]; + }; + }; + + tcp.services = { + teamspeak-squery.loadBalancer = { + servers = [ + {address = "10.1.1.249:10022";} + ]; + }; + teamspeak-data.loadBalancer = { + servers = [ + {address = "10.1.1.249:30033";} + ]; + }; + }; + + # UDP routing for TeamSpeak voice + udp.routers = { + teamspeak-voice = { + entryPoints = ["teamspeak-voice"]; + service = "teamspeak-voice"; + }; + }; + + udp.services = { + teamspeak-voice.loadBalancer = { + servers = [ + {address = "10.1.1.249:9987";} + ]; + }; + }; }; }; @@ -147,9 +200,9 @@ wants = ["acme-finished-prg-radio.org.target"]; }; - networking.firewall.allowedTCPPorts = [80 443]; - networking.firewall.allowedUDPPorts = [80 443]; + networking.firewall.allowedTCPPorts = [80 443 10022 30033]; + networking.firewall.allowedUDPPorts = [80 443 9987]; system.stateVersion = "25.11"; }; -} +} \ No newline at end of file