Stats
What Apranik counts: traffic per inbound, outbound and user, failures by reason, routing rule hits and the resolver's work. Counting is on by default; this section narrows it or turns on the parts that cost extra. The numbers are read through an API. See Counters for what each one means.
Structure
{
"stats": {
"enabled": true,
"inbounds": ["socks-in"],
"outbounds": ["proxy"],
"dial_health": false,
"tracking": {
"enabled": true,
"udp_entry_idle_timeout": "1m",
"udp_max_entries_per_session": 1024
}
}
}Fields
enabled
booleanDefault: true
Count anything at all. false turns off every key below.
inbounds
list of tagsDefault: all
Count only these inbounds.
outbounds
list of tagsDefault: all
Count only these outbounds. Every authenticated user is always counted.
dial_health
booleanDefault: false
Time every dial of every outbound.
tracking.enabled
booleanDefault: on when apis is set
Keep the live list of open TCP connections and UDP destinations, so an API can list and close them and show who is online. About 350 bytes per entry.
tracking.udp_entry_idle_timeout
durationDefault: 1m
A UDP destination leaves the live list after this much silence either way.
tracking.udp_max_entries_per_session
integerDefault: 1024
The most destinations one UDP session lists; the one used longest ago goes first.