diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2021-10-10 13:28:13 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2021-10-10 13:28:13 +0200 |
commit | 7dca6b5fb42d4e84c318985dc3d434398bff0c5b (patch) | |
tree | 06e89d2087c1be157e99c73e3e64337012c57285 | |
parent | 86b667559049081073e245f6ddefec8e84873a5f (diff) | |
download | nixos-7dca6b5fb42d4e84c318985dc3d434398bff0c5b.tar nixos-7dca6b5fb42d4e84c318985dc3d434398bff0c5b.tar.gz nixos-7dca6b5fb42d4e84c318985dc3d434398bff0c5b.tar.bz2 nixos-7dca6b5fb42d4e84c318985dc3d434398bff0c5b.tar.xz nixos-7dca6b5fb42d4e84c318985dc3d434398bff0c5b.zip |
yggdrasil-wg: ...
-rw-r--r-- | modules/yggdrasil-wg/default.nix | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/yggdrasil-wg/default.nix b/modules/yggdrasil-wg/default.nix index d81081b2..34c1f1e5 100644 --- a/modules/yggdrasil-wg/default.nix +++ b/modules/yggdrasil-wg/default.nix | |||
@@ -84,6 +84,7 @@ in { | |||
84 | }; | 84 | }; |
85 | 85 | ||
86 | systemd.services = listToAttrs (filter ({ value, ...}: value != null) (imap0 (ix: opts@{to, from, ...}: let other = if from == hostName then to else from; in nameValuePair "yggdrasil-udp2raw@${other}" (if opts ? "endpointHost" then { | 86 | systemd.services = listToAttrs (filter ({ value, ...}: value != null) (imap0 (ix: opts@{to, from, ...}: let other = if from == hostName then to else from; in nameValuePair "yggdrasil-udp2raw@${other}" (if opts ? "endpointHost" then { |
87 | path = with pkgs; [iptables]; | ||
87 | serviceConfig = { | 88 | serviceConfig = { |
88 | ExecStart = "${pkgs.udp2raw}/bin/udp2raw ${if from == hostName then "-c -l 127.0.0.1:${toString (udp2rawPort + ix)} -r ${opts.endpointHost}:${toString (udp2rawPort + ix)}" else "-s -l 0.0.0.0:${toString (udp2rawPort + ix)} -r 127.0.0.1:${toString listenPort}"} -k tmpkey --auth-mode hmac_sha1 --raw-mode faketcp -a"; | 89 | ExecStart = "${pkgs.udp2raw}/bin/udp2raw ${if from == hostName then "-c -l 127.0.0.1:${toString (udp2rawPort + ix)} -r ${opts.endpointHost}:${toString (udp2rawPort + ix)}" else "-s -l 0.0.0.0:${toString (udp2rawPort + ix)} -r 127.0.0.1:${toString listenPort}"} -k tmpkey --auth-mode hmac_sha1 --raw-mode faketcp -a"; |
89 | }; | 90 | }; |