github.com/inazumav/sing-box@v0.0.0-20230926072359-ab51429a14f1/docs/configuration/index.zh.md (about)

     1  # 引言
     2  
     3  sing-box 使用 JSON 作为配置文件格式。
     4  
     5  ### 结构
     6  
     7  ```json
     8  {
     9    "log": {},
    10    "dns": {},
    11    "inbounds": [],
    12    "outbounds": [],
    13    "route": {},
    14    "experimental": {}
    15  }
    16  ```
    17  
    18  ### 字段
    19  
    20  | Key            | Format                |
    21  |----------------|-----------------------|
    22  | `log`          | [日志](./log)           |
    23  | `dns`          | [DNS](./dns)          |
    24  | `inbounds`     | [入站](./inbound)       |
    25  | `outbounds`    | [出站](./outbound)      |
    26  | `route`        | [路由](./route)         |
    27  | `experimental` | [实验性](./experimental) |
    28  
    29  ### 检查
    30  
    31  ```bash
    32  $ sing-box check
    33  ```
    34  
    35  ### 格式化
    36  
    37  ```bash
    38  $ sing-box format -w
    39  ```