buildEgressConfig
buildEgressConfig(
allowlist,opts):EgressConfig
Defined in: src/egress.ts:456
Generate ALL egress config artefacts from the allowlist. PURE — no I/O.
Parameters
Section titled “Parameters”allowlist
Section titled “allowlist”string[]
Deduped, sorted hostname list (from buildEgressAllowlist).
hostGateway?
Section titled “hostGateway?”{ ip: string; port: number; }
When set, opens exactly that host IP+port outbound (least-privilege agent→Shepherd reachability via the slirp host-loopback gateway).
hostGateway.ip
Section titled “hostGateway.ip”string
hostGateway.port
Section titled “hostGateway.port”number
minCacheTtl?
Section titled “minCacheTtl?”number
dnsmasq min-cache-ttl seconds (default 600).
nftSet?
Section titled “nftSet?”string
nft set identifier (default “inet#egress#allowed”).
resolver?
Section titled “resolver?”string
Upstream DNS resolver IP (default “10.0.2.3” = slirp4netns’s built-in).
tmpDir
Section titled “tmpDir”string
Per-agent tmp directory for dnsmasq log + override files.