feat/wip: better awg to outbounds config

This commit is contained in:
fufsob committed 2026-09-15 10:34:42 +00:00
1 parent a82417a2bd
commit 9c9658baa7
26 files changed
+805 -218

No files matched your search

+6 -3
View File
@@ -74,19 +74,22 @@ let
"proxy-suite: sshProxy.asOutbound requires proxy.enable = true"
)
(mkAssertion (
!cfg.warp.enable || cfg.warp.asOutbound || cfg.warp.asAmneziaWg
!cfg.warp.enable || cfg.warp.asOutbound != null || cfg.warp.asAmneziaWg
) "proxy-suite: warp.enable = true needs warp.asOutbound or warp.asAmneziaWg")
# One key, one session: the second peer on a WARP key takes the session over.
(mkAssertion (!(cfg.warp.enable && cfg.warp.asOutbound && cfg.warp.asAmneziaWg))
(mkAssertion (!(cfg.warp.enable && cfg.warp.asOutbound != null && cfg.warp.asAmneziaWg))
"proxy-suite: warp.asOutbound and warp.asAmneziaWg share one WARP key and would knock each other off; enable one"
)
# Daemon configs are readable by the service group; users must not share it.
(mkAssertion (cfg.userControl.group != derived.constants.serviceUser)
"proxy-suite: userControl.group must not be ${derived.constants.serviceUser}, the group that can read backend configs"
)
(requireEnabled derived.warpOutboundEnabled proxyEnabled
(requireEnabled (cfg.warp.enable && cfg.warp.asOutbound != null) proxyEnabled
"proxy-suite: warp.asOutbound requires proxy.enable = true"
)
(requireEnabled (
cfg.warp.enable && cfg.warp.asOutbound == "interface"
) cfg.amneziaWg.enable ''proxy-suite: warp.asOutbound = "interface" requires amneziaWg.enable = true'')
(requireEnabled (
cfg.warp.enable && cfg.warp.asAmneziaWg
) cfg.amneziaWg.enable "proxy-suite: warp.asAmneziaWg requires amneziaWg.enable = true")