feat: runtime routing

This commit is contained in:
fufsob committed 2026-10-10 16:33:24 +00:00
1 parent d70bcb317f
commit 584c8ba0a0
34 files changed
+1926 -112

No files matched your search

+8
View File
@@ -30,6 +30,7 @@ let
perAppViaRuntime
proxySuiteScriptsDir
ruleSets
routeModeRulesFile
pkgs
;
inherit (ctx.scripts)
@@ -93,6 +94,13 @@ in
PROXYCHAINS_CONFIG = toString proxychainsConfigFile;
PROXYCHAINS_QUIET_ARG = lib.removeSuffix " " proxychainsQuietArg;
ROUTE_MODE_STATE_FILE = routeModeStateFile;
# The configuration's routing in sections, each at its priority ("sections"), and the
# rules `proxy rules` adds: its spool, and what root rendered of it.
ROUTING_RULES_FILE = toString routeModeRulesFile;
RUNTIME_ROUTING_DIR = constants.runtimeRoutingDir;
ROUTING_RULES_DIR = constants.routingRulesDir;
GEODATA_GEOSITE_DIR = "${cfg.geodata.singBox.geosite}/share/sing-box/rule-set";
GEODATA_GEOIP_DIR = "${cfg.geodata.singBox.geoip}/share/sing-box/rule-set";
DEFAULT_ROUTE_MODE = if proxyCfg.routing.default == "proxy" then "blacklist" else "whitelist";
AWG_PROFILES_FILE = toString amneziaWgProfileNamesFile;
# The WARP devices behind outbounds, each with the unit that carries it.