From 4f3ff236a489c67d0543cfcfb60b82bd33931730 Mon Sep 17 00:00:00 2001 From: uku Date: Sat, 4 Jan 2025 16:13:42 +0100 Subject: [PATCH] feat(utils): add mkFrpPassthrough --- global/utils.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/global/utils.nix b/global/utils.nix index 4981e97..d89af09 100644 --- a/global/utils.nix +++ b/global/utils.nix @@ -84,4 +84,16 @@ systemd.services."${backend}-mc-${name}".serviceConfig.TimeoutSec = "300"; }; + + mkFrpPassthrough = name: port: { + services.frp.settings.proxies = [ + { + inherit name; + type = "tcp"; + localIp = "localhost"; + localPort = port; + remotePort = port; + } + ]; + }; }