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

@@ -1,6 +1,7 @@
# inbounds.routing.blockPrivate (or, without it, this host's loopback), enforced here because
# the listener passes names unresolved.
# Just before the first direct rule (or last, for a direct final), so names that the
# Just before the first direct rule of the configuration (or last, for a direct final), and
# scoped to each runtime direct rule above that (insert_guard), so names that the
# proxy rules above take stay unresolved and none reaches a direct dial unchecked. Local
# mixed-in clients lose names that resolve private. Rules for other inbounds do not count:
# autoProxy's direct probe pin would put the guard first, resolving every name, .onion too.
@@ -11,11 +12,4 @@
{inbound: ["mixed-in"]@rejectMatch@, action: "reject"}]
+ (($ARGS.named.host_addresses // []) as $own
| if $own == [] or @hostPortsAllOpen@ then [] else [{inbound: ["mixed-in"], ip_cidr: $own@hostPortMatch@, action: "reject"}] end) as $guard
| (.route.rules
| map((.outbound? // "") == "direct" and ((.inbound? // ["mixed-in"]) | index(["mixed-in"])) != null)
| index(true)) as $first_direct
| if $first_direct != null then
.route.rules = .route.rules[:$first_direct] + $guard + .route.rules[$first_direct:]
elif (.route.final // "direct") == "direct" then
.route.rules += $guard
else . end
| insert_guard($guard)
@@ -20,7 +20,23 @@ $route_rules[0] as $route_rules | $probe_inbounds[0] as $probe_inbounds
| if $clear_dns_rules then
.dns.rules = .dns.rules[:@userDnsRuleCount@]
+ [.dns.rules[@userDnsRuleCount@:][] | select(.server? == "fakeip" or .domain_suffix? == ["onion"])]
else . end
else
# The DNS mirror composed with the route (routing-compose.jq), runtime rules' lookups
# among the configuration's: in place of the configuration's own, which follows the
# user's rules and the .onion ones.
(($ARGS.named.route_dns // [null])[0]) as $route_dns
| if $route_dns == null then . else
(.dns.rules // []) as $r
| ([$r[@userDnsRuleCount@:][] | .domain_suffix? == ["onion"]] | index(false)
// ($r[@userDnsRuleCount@:] | length)) as $onion
| (@userDnsRuleCount@ + $onion) as $at
| .dns.rules = $r[:$at] + $route_dns + $r[$at + ($ARGS.named.static_dns_count // 0):]
end
end
# The runtime rules' own rule sets, and geodata the configuration does not name.
| ([.route.rule_set[]?.tag]) as $have
| .route.rule_set = ((.route.rule_set // [])
+ [(($ARGS.named.user_rule_sets // [[]])[0])[] | select(.tag as $t | $have | index([$t]) | not)])
else . end
# autoProxy rules, after the route-mode replace so no mode drops them: pins first
# (they only match their own listener), learned rules last before final, so
@@ -14,7 +14,7 @@ def xray_rewrite_proxy_rule($single_tag):
def xray_preserved_rules:
[.routing.rules[]
| select((.ruleTag? // "") | . == "dns-hijack" or . == "dns-upstream-direct" or . == "dns-upstream-remote"
or . == "inbounds-private-guard" or . == "inbounds-host-guard")];
or . == "dns-remote-bridge" or . == "inbounds-private-guard" or . == "inbounds-host-guard")];
def xray_final_rule($tag; $single_tag):
if $tag == "proxy" and "@selectionMode@" == "urltest" then
{type:"field",network:"tcp,udp",ruleTag:"final-default"} + xray_proxy_rule_target($single_tag)
@@ -19,6 +19,38 @@
let
fillTemplate = import ../../lib/fill-template.nix;
# A guard for mixed-in's names goes just before the first direct rule that applies to
# mixed-in, or last for a direct final. A runtime routing rule (routing-convert.jq: its first
# rule set is user:<name>) does not count: one sending a name direct at the top would take the
# guard, and its lookup, above every proxy rule. Each such rule above the guard gets the guard
# to itself instead, only for what it matches.
insertGuardDefs = ''
| def runtime_rule: ((.rule_set? // [])[0] // "") | type == "string" and startswith("user:");
def direct_for_mixed: (.outbound? // "") == "direct"
and ((.inbound? // ["mixed-in"]) | index(["mixed-in"])) != null;
# An "and" takes the rule set as one more condition; anything else, "or" included, is
# wrapped whole.
def scoped($sets):
if .type? == "logical" and .mode? == "and" then .rules += [{rule_set: $sets}]
else {type: "logical", mode: "and",
rules: [del(.action, .strategy, .server), {rule_set: $sets}]}
+ ({action, strategy, server} | with_entries(select(.value != null)))
end;
def first_direct: .route.rules | map(direct_for_mixed and (runtime_rule | not)) | index(true);
def insert_guard($guard):
(first_direct // (.route.rules | length)) as $limit
| .route.rules = [.route.rules | to_entries[] | .key as $i | .value
| if $i < $limit and direct_for_mixed and runtime_rule
then (. as $rule | $guard[] | scoped($rule.rule_set)), .
else . end]
| first_direct as $first_direct
| if $first_direct != null then
.route.rules = .route.rules[:$first_direct] + $guard + .route.rules[$first_direct:]
elif (.route.final // "direct") == "direct" then
.route.rules += $guard
else . end;
.
'';
# XRay's port list: "80,1000-2000".
closedPorts = map (
r: if r.from == r.to then toString r.from else "${toString r.from}-${toString r.to}"
@@ -33,6 +65,7 @@ else
(fillTemplate ./backend-filter-sing-box.template.jq {
userDnsRuleCount = toString (builtins.length userDnsRules);
})
+ lib.optionalString (listenerExposed || proxyInboundsGuardPrivate) insertGuardDefs
# An outbound on such an interface resolves through it (awg-dns-<tag>), as a declared one
# does; only its server cannot be in the build-time config.
+ lib.optionalString (awgRuntimeDnsServer != null) ''
@@ -58,14 +91,7 @@ else
{type: "logical", mode: "and",
rules: [{inbound: ["mixed-in"], ip_cidr: ${builtins.toJSON proxyInboundsLoopback}}, $remote],
action: "reject"}] as $guard
| (.route.rules
| map((.outbound? // "") == "direct" and ((.inbound? // ["mixed-in"]) | index(["mixed-in"])) != null)
| index(true)) as $first_direct
| if $first_direct != null then
.route.rules = .route.rules[:$first_direct] + $guard + .route.rules[$first_direct:]
elif (.route.final // "direct") == "direct" then
.route.rules += $guard
else . end
| insert_guard($guard)
''
# No sniffing on mixed-in, where the inbounds' clients arrive: an SNI the rules send direct
# would take their connection direct to any address. Their names still route as names.
@@ -0,0 +1,24 @@
# The route for a mode, from the configuration's rule buckets (routeModeRulesFile) and the
# runtime rules' sections (routing-convert.jq): every section at its priority, a runtime one
# ahead of the configuration's at the same number, the common rules first. $mode drops what it
# leaves to the final outbound: all-proxy every direct list, all-bypass all but the blocks.
# Out: the route rules, the DNS mirror in the same order, and how long the configuration's
# own mirror is (the stretch of dns.rules this replaces).
def keep: if $mode == "all-proxy" then .cat != "direct"
elif $mode == "all-bypass" then .cat == "block" or .cat == "safety"
else true end;
.common as $common
| ([.custom[] | {prio: 100, cat: .category, rules: .entries, dns: (.dns // [])}]
+ [{prio: 200, cat: "proxy", rules: .proxyPrimary, dns: (.dns.proxyPrimary // [])},
{prio: 300, cat: "block", rules: .block, dns: []},
{prio: 400, cat: "direct", rules: .direct, dns: (.dns.direct // [])},
{prio: 400, cat: "safety", rules: .safetyDirect, dns: []},
{prio: 500, cat: "proxy", rules: .proxyGeo, dns: (.dns.proxyGeo // [])}]) as $static
# sort_by is stable: runtime sections, already in their order, first among equals.
| ($runtime[0] + $static | sort_by(.prio) | map(select(keep))) as $sections
| {
rules: ($common + ([$sections[].rules[]])),
dns: [$sections[].dns[]],
staticDnsCount: ([$static[].dns | length] | add // 0)
}
@@ -0,0 +1,67 @@
# The rendered runtime routing rules (routing-render.jq) as the backend's: one section each,
# at the rule's priority, for routing-compose.jq to sort among the configuration's.
# A rule the backend would refuse (an outbound that is gone, a rule set this configuration does
# not declare) is left out and said why, so it never fails the whole start.
#
# $backend: sing-box or xray. $tags (slurped): every outbound tag the config will have.
# $rule_sets: the declared routing.ruleSets. $missing_geo (slurped): geosite-X/geoip-X with no
# .srs. $dir: where the
# rendered rule sets are. $geosite_dir/$geoip_dir: sing-box's geodata. $urltest: pure XRay's
# urltest, which prefixes every outbound and balances "proxy".
def builtin: . == "proxy" or . == "direct" or . == "block";
def category: if . == "direct" then "direct" elif . == "block" then "block" else "proxy" end;
def backend_tag: if $backend == "xray" and $urltest and (builtin | not) then "proxy-suite-ob-" + . else . end;
def xray_target: if . == "proxy" and $urltest then {balancerTag: "proxy"} else {outboundTag: backend_tag} end;
def local_set($tag; $path; $format): {type: "local", format: $format, tag: $tag, path: $path};
def why:
if (.target | builtin | not) and ((.target | backend_tag) as $t | $tags[0] | index([$t]) | not) then
"no outbound or group named \(.target)"
elif $backend == "xray" and .ruleSets != [] then
"rule sets need the sing-box or hybrid backend"
elif (.ruleSets - $rule_sets) != [] then
"no rule set named \((.ruleSets - $rule_sets) | join(", ")) in routing.ruleSets"
elif ([.geosites[] | "geosite-" + .] + [.geoips[] | "geoip-" + .] | any(. as $g | $missing_geo[0] | index([$g]))) then
"no such geosite or geoip: \([.geosites[] | "geosite-" + .] + [.geoips[] | "geoip-" + .] | map(select(. as $g | $missing_geo[0] | index([$g]))) | join(", "))"
else null end;
[.[] | select(.disabled | not)] as $rules
| [$rules[] | why as $why | select($why != null) | {name, why: $why}] as $skipped
| [$rules[] | select(why == null)] as $ok
| {
skipped: $skipped,
sections: [$ok[] | . as $r | {
prio: .priority,
cat: (.target | category),
name: .name,
rules: (
if $backend == "xray" then
# XRay takes a ruleTag once.
({type: "field"} + (.target | xray_target)) as $base
| ([.domains[] | "domain:" + .] + [.geosites[] | "geosite:" + .]) as $domain
| (.ips + [.geoips[] | "geoip:" + .]) as $ip
| (if $domain != [] then [$base + {ruleTag: ("user:" + $r.name), domain: $domain}] else [] end)
+ (if $ip != [] then [$base + {ruleTag: ("user:" + $r.name + ":ip"), ip: $ip}] else [] end)
else
# Always, its own rule set first even while empty: matches added later reach sing-box
# by the file alone, no restart. The guards find a runtime rule by that first tag.
[{rule_set: (["user:" + .name] + [.geosites[] | "geosite-" + .] + [.geoips[] | "geoip-" + .]
+ [.ruleSets[] | "ruleset-" + .]),
outbound: .target}]
end),
# As the configuration's lookups follow its routing (rules/sing-box.nix): names only.
dns: (
if $backend == "xray" or .target == "block" then []
else [{rule_set: (["user-dns:" + .name] + [.geosites[] | "geosite-" + .]
+ [.ruleSets[] | "ruleset-" + . + "-dns"]),
server: (if .target == "direct" then "local" else "remote" end)}]
end)
}],
rule_sets: (
if $backend == "xray" then []
else
[$ok[] | local_set("user:" + .name; $dir + "/rs/" + .name + ".json"; "source"),
local_set("user-dns:" + .name; $dir + "/dns/" + .name + ".json"; "source")]
+ ([$ok[].geosites[]] | unique | map(local_set("geosite-" + .; $geosite_dir + "/geosite-" + . + ".srs"; "binary")))
+ ([$ok[].geoips[]] | unique | map(local_set("geoip-" + .; $geoip_dir + "/geoip-" + . + ".srs"; "binary")))
end)
}
@@ -0,0 +1,52 @@
# routing.d/rules.json, as userControl's group wrote it (slurped: one document, else none), to
# the rules root applies: each field checked, anything else dropped, a name once. Sorted in
# match order (priority, then name).
def strs: if type == "array" then [.[] | strings] else [] end;
def domain: ascii_downcase | ltrimstr(".") | select(test("^[a-z0-9_-]+(\\.[a-z0-9_-]+)*$") and length <= 253);
# Addresses as Go's netip parses them, which both backends do: one the backend refuses would
# fail its whole start. No leading zeros, no zone.
def v4: test("^(0|[1-9][0-9]{0,2})(\\.(0|[1-9][0-9]{0,2})){3}$") and all(split(".")[]; tonumber <= 255);
def v6_groups:
split("::") as $parts
| ($parts | length) as $n
| [$parts[] | select(. != "") | split(":")[]] as $groups
| $n <= 2 and ($groups | all(test("^[0-9a-f]{1,4}$")))
and (if $n == 2 then ($groups | length) <= 7 else ($groups | length) == 8 end);
# An IPv4 tail (::ffff:192.0.2.1) counts as two groups.
def v6:
test("^[0-9a-f:.]+$") and test(":")
and (if test("\\.") then
[match("^(.*:)([0-9.]+)$").captures[].string] as $m
| ($m | length) == 2 and ($m[1] | v4) and ($m[0] + "0:0" | v6_groups)
else v6_groups end);
def prefix($max): test("^(0|[1-9][0-9]{0,2})$") and tonumber <= $max;
# A bare address is its own /32 or /128.
def cidr:
ascii_downcase | split("/") as $s
| ($s | length) as $n
| if $n > 2 then empty
elif ($s[0] | v4) then (if $n == 1 then $s[0] + "/32" elif ($s[1] | prefix(32)) then . else empty end)
elif ($s[0] | v6) then (if $n == 1 then $s[0] + "/128" elif ($s[1] | prefix(128)) then . else empty end)
else empty end;
# geosite-NAME.srs, geosite:NAME: "geolocation-!cn" and "google@cn" among them, never a path.
def geo: select(test("^[A-Za-z0-9!@._-]{1,64}$") and (startswith(".") | not));
def tag: select(test("^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"));
(if length == 1 then .[0] else null end)
| [(.rules? // []) | if type == "array" then .[] else empty end
| objects
| select((.name | type) == "string" and (.name | test("^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$")))
| select((.target | type) == "string" and (.target | length) >= 1 and (.target | length) <= 128 and (.target | test("[[:cntrl:]]") | not))
| {
name,
target,
priority: (if (.priority | type) == "number" then (.priority | floor | if . < -1000000 then -1000000 elif . > 1000000 then 1000000 else . end) else 50 end),
disabled: (.disabled == true),
domains: ([.domains | strs[] | domain] | unique),
ips: ([.ips | strs[] | cidr] | unique),
geosites: ([.geosites | strs[] | geo] | unique),
geoips: ([.geoips | strs[] | geo] | unique),
ruleSets: ([.ruleSets | strs[] | tag] | unique)
}]
| reduce .[] as $r ([]; if any(.[]; .name == $r.name) then . else . + [$r] end)
| sort_by(.priority, .name)
@@ -0,0 +1,184 @@
# Routing rules added at runtime (`proxy-ctl proxy rules`): rendered from the routing scope's
# spool, then composed into each backend's route by the start scripts.
#
# routing.d/rules.json is the groups'; root renders it into routingRulesDir: rules.json
# checked (routing-render.jq), per rule rs/<name>.json (its domains and addresses) and
# dns/<name>.json (its domains alone) as sing-box source rule sets, and `structure`, what of
# them changes the config itself. A change to a rule's domains or addresses alone reaches a
# running sing-box through its rule set files, which it reloads; anything else, and any change
# on XRay, which has no rule sets, restarts the backends.
{ ctx }:
let
inherit (ctx)
lib
pkgs
cfg
jq
constants
pureXrayEnabled
;
inherit (constants) runtimeRoutingDir routingRulesDir;
coreutils = "${pkgs.coreutils}/bin";
renderJq = ./routing-render.jq;
convertJq = ./routing-convert.jq;
composeJq = ./routing-compose.jq;
# Where sing-box finds geodata the configuration does not name; also how a geosite or geoip
# gets checked before XRay is handed one (the two come from the same lists).
geositeDir = "${cfg.geodata.singBox.geosite}/share/sing-box/rule-set";
geoipDir = "${cfg.geodata.singBox.geoip}/share/sing-box/rule-set";
# Root, over a spool the groups write: read through no symlink, 4 MiB at most, and checked
# field by field. Under a lock: every backend's start script renders too. --sweep also
# removes the rule sets of rules that are gone, which apply does once the backends that
# watched them have restarted. The spool and output directories as arguments: for the checks.
render = pkgs.writeShellScript "proxy-suite-core" ''
set -euo pipefail
SWEEP=false
if [ "''${1:-}" = --sweep ]; then
SWEEP=true
shift
fi
SPOOL=''${1:-${lib.escapeShellArg runtimeRoutingDir}}
OUT=''${2:-${lib.escapeShellArg routingRulesDir}}
umask 022
${coreutils}/mkdir -p "$OUT/rs" "$OUT/dns"
${coreutils}/chmod 0755 "$OUT" "$OUT/rs" "$OUT/dns"
exec 9> "$OUT/.lock"
${pkgs.util-linux}/bin/flock 9
SRC='{}'
if [ -f "$SPOOL/rules.json" ] && [ ! -L "$SPOOL/rules.json" ]; then
SRC=$(${coreutils}/dd if="$SPOOL/rules.json" iflag=nofollow,nonblock,fullblock bs=4M count=1 status=none 2>/dev/null) || SRC='{}'
fi
# Slurped: an empty file, or several documents, is no rules rather than no output.
if ! RULES=$(${jq} -c -s -f ${renderJq} <<< "$SRC" 2>/dev/null); then
echo "proxy-suite: $SPOOL/rules.json is not valid JSON; no runtime routing rules apply" >&2
RULES='[]'
fi
# Renamed in, and only when it changed: sing-box reloads a rule set on every new file.
_put() {
cat > "$1.tmp"
${coreutils}/chmod 644 "$1.tmp"
if ${pkgs.diffutils}/bin/cmp -s "$1.tmp" "$1"; then
rm -f "$1.tmp"
else
mv -f "$1.tmp" "$1"
fi
}
printf '%s\n' "$RULES" | _put "$OUT/rules.json"
KEEP=" "
while IFS=$'\t' read -r NAME SET DNS; do
printf '%s\n' "$SET" | _put "$OUT/rs/$NAME.json"
printf '%s\n' "$DNS" | _put "$OUT/dns/$NAME.json"
KEEP="$KEEP$NAME.json "
done < <(${jq} -r '.[]
| [.name,
({version: 1, rules: ([if .domains != [] then {domain_suffix: .domains} else empty end]
+ [if .ips != [] then {ip_cidr: .ips} else empty end])} | tojson),
({version: 1, rules: [if .domains != [] then {domain_suffix: .domains} else empty end]} | tojson)]
| @tsv' <<< "$RULES")
if [ "$SWEEP" = true ]; then
for F in "$OUT"/rs/*.json "$OUT"/dns/*.json; do
[ -e "$F" ] || continue
case "$KEEP" in
*" ''${F##*/} "*) ;;
*) rm -f "$F" ;;
esac
done
fi
${jq} -c '${
if pureXrayEnabled then
"map(select(.disabled | not))"
else
"map(select(.disabled | not) | del(.domains, .ips))"
}' <<< "$RULES" | _put "$OUT/structure"
'';
# The backends whose config holds the rules, with their runtime directories.
consumers = [
{
unit = "proxy-suite-socks";
dir = "${constants.runtimeDir}/proxy-suite-socks";
}
{
unit = "proxy-suite-tun";
dir = "${constants.runtimeDir}/proxy-suite-tun";
}
{
unit = "proxy-suite-per-app-tun";
dir = "${constants.runtimeDir}/proxy-suite-per-app-tun";
}
];
# proxy-suite-routing-apply, after every `proxy rules` change: a backend restarts only when
# its config would change, the structure it started from (startBlock) no longer the one now.
apply = pkgs.writeShellScript "proxy-suite-core" ''
set -euo pipefail
${render}
${lib.concatMapStrings (c: ''
if ${constants.systemctl} is-active --quiet ${c.unit} \
&& ! ${pkgs.diffutils}/bin/cmp -s ${lib.escapeShellArg "${routingRulesDir}/structure"} ${lib.escapeShellArg "${c.dir}/routing-structure"}; then
${constants.systemctl} restart ${c.unit}
fi
'') consumers}
${render} --sweep
'';
# In a start script, after the outbounds: sets RUNTIME_SECTIONS_JSON (routing-compose.jq's
# $runtime) and USER_RULE_SETS_JSON, and writes $RUNTIME_DIR/routing-structure and
# routing-skipped.json, the rules left out and why (for proxy-ctl, which anyone may read).
startBlock = configFile: ''
RUNTIME_SECTIONS_JSON='[]'
USER_RULE_SETS_JSON='[]'
RUNTIME_ROUTING_SKIPPED='[]'
${render}
cp ${lib.escapeShellArg "${routingRulesDir}/structure"} "$RUNTIME_DIR/routing-structure"
chmod 644 "$RUNTIME_DIR/routing-structure"
RUNTIME_ROUTING_JSON=$(cat ${lib.escapeShellArg "${routingRulesDir}/rules.json"})
if ${jq} -e 'any(.[]; .disabled | not)' <<< "$RUNTIME_ROUTING_JSON" >/dev/null; then
MISSING_GEO_JSON=$(${jq} -r '[.[] | select(.disabled | not)
| (.geosites[] | "geosite-" + .), (.geoips[] | "geoip-" + .)] | unique[]' <<< "$RUNTIME_ROUTING_JSON" \
| while IFS= read -r GEO; do
case "$GEO" in
geosite-*) [ -e ${lib.escapeShellArg geositeDir}/"$GEO.srs" ] || printf '%s\n' "$GEO" ;;
*) [ -e ${lib.escapeShellArg geoipDir}/"$GEO.srs" ] || printf '%s\n' "$GEO" ;;
esac
done | ${jq} -R . | ${jq} -cs .)
# Slurped: a large subscription's tags outgrow one argument.
ROUTING_TAGS_JSON=$(${jq} -c --slurpfile obs <(printf '%s' "$OUTBOUNDS_JSON") \
--slurpfile groups <(printf '%s' "''${GROUP_TAGS_JSON:-[]}") \
'[($obs[0][]?, .outbounds[]?) | .tag? | strings] + $groups[0] | unique' ${configFile})
CONVERTED=$(${jq} -c \
--arg backend ${if pureXrayEnabled then "xray" else "sing-box"} \
--slurpfile tags <(printf '%s' "$ROUTING_TAGS_JSON") \
--argjson rule_sets ${lib.escapeShellArg (builtins.toJSON (map (rs: rs.name) ctx.ruleSets))} \
--slurpfile missing_geo <(printf '%s' "$MISSING_GEO_JSON") \
--arg dir ${lib.escapeShellArg routingRulesDir} \
--arg geosite_dir ${lib.escapeShellArg geositeDir} \
--arg geoip_dir ${lib.escapeShellArg geoipDir} \
--argjson urltest ${lib.boolToString (pureXrayEnabled && ctx.selectionMode == "urltest")} \
-f ${convertJq} <<< "$RUNTIME_ROUTING_JSON")
RUNTIME_SECTIONS_JSON=$(${jq} -c '.sections' <<< "$CONVERTED")
USER_RULE_SETS_JSON=$(${jq} -c '.rule_sets' <<< "$CONVERTED")
RUNTIME_ROUTING_SKIPPED=$(${jq} -c '.skipped' <<< "$CONVERTED")
${jq} -r '.[] | "proxy-suite: routing rule \(.name) left out: \(.why)"' <<< "$RUNTIME_ROUTING_SKIPPED" >&2
fi
printf '%s\n' "$RUNTIME_ROUTING_SKIPPED" > "$RUNTIME_DIR/routing-skipped.json.tmp"
chmod 644 "$RUNTIME_DIR/routing-skipped.json.tmp"
mv -f "$RUNTIME_DIR/routing-skipped.json.tmp" "$RUNTIME_DIR/routing-skipped.json"
'';
in
{
inherit
render
apply
startBlock
composeJq
geositeDir
geoipDir
;
}