Configuration
sing-box uses JSON for configuration files.
Structure
json
{
"log": {},
"dns": {},
"ntp": {},
"endpoints": [],
"inbounds": [],
"outbounds": [],
"route": {},
"experimental": {}
}
Fields
Key | Format |
---|---|
log | Log |
dns | DNS |
ntp | NTP |
endpoints | Endpoint |
inbounds | Inbound |
outbounds | Outbound |
route | Route |
experimental | Experimental |
Check
bash
sing-box check
Format
bash
sing-box format -w -c config.json -D config_directory
Merge
bash
sing-box merge output.json -c config.json -D config_directory