feat: awg inbounds

This commit is contained in:
FUFSoB committed 2026-09-17 15:19:30 +05:00
1 parent 3b568bb54e
commit ffc7816289
31 files changed
+2876 -133

No files matched your search

+45 -19
View File
@@ -40,25 +40,51 @@ let
proxyInboundsSpec = {
serverAddress = derived.proxyInboundsCfg.serverAddress;
shareLinks = derived.proxyInboundsCfg.shareLinks;
listeners = map (ib: {
inherit (ib) tag;
inherit (ib.listener)
type
port
sharePort
users
flow
method
serverPassword
serverPasswordFile
transport
tls
reality
xrayJson
jsonFile
;
listen = ib.listener.address;
}) derived.proxyInbounds;
listeners = map (
ib:
{
inherit (ib) tag;
inherit (ib.listener)
type
port
sharePort
users
flow
method
serverPassword
serverPasswordFile
transport
tls
reality
xrayJson
jsonFile
;
listen = ib.listener.address;
}
# Only on AmneziaWG listeners: the defaults of the others need not type-check.
// lib.optionalAttrs (ib.listener.type == "amneziawg") {
amneziaWg =
let
runtime = lib.findFirst (awg: awg.tag == ib.tag) null derived.proxyInboundsAwg;
in
{
inherit (ib.listener.amneziaWg)
mode
interfaceName
subnet
subnet6
privateKeyFile
obfuscation
dns
mtu
persistentKeepalive
clientAllowedIPs
;
inherit (runtime) internalPort internalListen stateFile;
fwmark = cfg.proxy.tproxy.proxyMark;
};
}
) derived.proxyInbounds;
};
selectedTemplates = if derived.pureXrayEnabled then xrayTemplates else singBoxTemplates;