docs/configuration/index.zh.md
sing-box 使用 JSON 作为配置文件格式。
{
"$schema": "https://sing-box.sagernet.org/schema.json",
"log": {},
"dns": {},
"ntp": {},
"certificate": {},
"certificate_providers": [],
"http_clients": [],
"network_namespaces": [],
"endpoints": [],
"inbounds": [],
"outbounds": [],
"route": {},
"services": [],
"experimental": {}
}
| Key | Format |
|---|---|
$schema | JSON Schema |
log | 日志 |
dns | DNS |
ntp | NTP |
certificate | 证书 |
certificate_providers | 证书提供者 |
http_clients | HTTP 客户端 |
network_namespaces | 网络命名空间 |
endpoints | 端点 |
inbounds | 入站 |
outbounds | 出站 |
route | 路由 |
services | 服务 |
experimental | 实验性 |
sing-box check
sing-box format -w -c config.json -D config_directory
sing-box merge output.json -c config.json -D config_directory