Back to Sing Box

引言

docs/configuration/index.zh.md

1.13.111.0 KB
Original Source

引言

sing-box 使用 JSON 作为配置文件格式。

结构

json
{
  "log": {},
  "dns": {},
  "ntp": {},
  "certificate": {},
  "endpoints": [],
  "inbounds": [],
  "outbounds": [],
  "route": {},
  "services": [],
  "experimental": {}
}

字段

KeyFormat
log日志
dnsDNS
ntpNTP
certificate证书
endpoints端点
inbounds入站
outbounds出站
route路由
services服务
experimental实验性

检查

bash
sing-box check

格式化

bash
sing-box format -w -c config.json -D config_directory

合并

bash
sing-box merge output.json -c config.json -D config_directory