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

@@ -37,12 +37,21 @@ let
mkDnsConfig =
{
localDetour ? null,
useOutboundRoutingMark ? false,
}:
{
servers = [
(mkDnsServer "remote" proxyCfg.dns.remote "proxy")
(mkDnsServer "local" proxyCfg.dns.local localDetour)
];
]
++ map (
ob:
mkDnsServer (constants.awgDnsServerTag ob.tag) proxyCfg.dns.remote null
// {
bind_interface = ob.interface;
}
// lib.optionalAttrs useOutboundRoutingMark { routing_mark = globalTproxy.proxyMark; }
) derived.awgInterfaceOutbounds;
rules =
lib.optional (builtins.elem "google" proxyCfg.routing.proxy.geosites) {
rule_set = [ "geosite-google" ];
@@ -93,6 +102,7 @@ let
dns = mkDnsConfig {
localDetour = if forceLocalDnsViaProxy then "proxy" else null;
inherit useOutboundRoutingMark;
};
inbounds =