Configuration
Apranik reads one JSON file. This page shows its whole shape; each top-level key has its own page.
Structure
json
{
"version": 1,
"min_core": "0.1.0",
"strict": true,
"log": {},
"inbounds": [],
"outbounds": [],
"datasets": [],
"dns": {},
"routing": {},
"stats": {},
"apis": []
}Fields
| Key | Format |
|---|---|
log | Log |
inbounds | Inbound |
outbounds | Outbound |
datasets | Dataset |
dns | DNS |
routing | Routing |
stats | Stats |
apis | API |
version
integerRequired
The format version. Only 1 exists, and it may still change.
min_core
string
The oldest Apranik version, as major.minor.patch, that can run this file. It is checked first, so an older core asks for an upgrade instead of listing unknown keys.
strict
booleanDefault: true
Refuse unknown keys, so a misspelled key is an error. Set false only to share one file with a newer core.
Conventions
- Defaults. A key left out takes its default. A written
0is refused, never read as "default" or "no limit". - Durations are quoted Go durations:
"300ms","10s","1h30m". - Secrets (passwords, UUIDs) never appear in logs, errors or warnings.
- Modules. A
typeintransport,protocol,sniffersordns.serversnames a module; itssettingsoverride only the keys they name. - Checking.
apranik check -config config.jsonreports every problem at once, each with its location, and runs nothing. Warnings, such as an inbound with no users on a public address, do not stop it.