Files
sing-box-extended-mirror/docs/configuration/index.zh.md
T

53 lines
1.0 KiB
Markdown
Raw Normal View History

2022-08-24 16:23:21 +08:00
# 引言
2022-08-25 09:45:22 +08:00
sing-box 使用 JSON 作为配置文件格式。
2022-08-24 16:23:21 +08:00
### 结构
```json
{
"log": {},
"dns": {},
2025-02-10 14:33:41 +08:00
"ntp": {},
2025-02-20 17:39:39 +08:00
"certificate": {},
2024-11-21 18:10:41 +08:00
"endpoints": [],
2022-08-31 13:21:29 +08:00
"inbounds": [],
"outbounds": [],
2022-08-24 16:23:21 +08:00
"route": {},
2025-03-29 17:24:34 +08:00
"services": [],
2022-08-24 16:23:21 +08:00
"experimental": {}
}
```
### 字段
2023-12-14 22:23:52 +08:00
| Key | Format |
|----------------|------------------------|
| `log` | [日志](./log/) |
| `dns` | [DNS](./dns/) |
2025-02-10 14:33:41 +08:00
| `ntp` | [NTP](./ntp/) |
2025-02-20 17:39:39 +08:00
| `certificate` | [证书](./certificate/) |
2024-11-21 18:10:41 +08:00
| `endpoints` | [端点](./endpoint/) |
2023-12-14 22:23:52 +08:00
| `inbounds` | [入站](./inbound/) |
| `outbounds` | [出站](./outbound/) |
| `route` | [路由](./route/) |
2025-03-29 17:24:34 +08:00
| `services` | [服务](./service/) |
2023-12-14 22:23:52 +08:00
| `experimental` | [实验性](./experimental/) |
2022-08-24 16:23:21 +08:00
### 检查
```bash
2023-09-19 19:59:07 +08:00
sing-box check
2022-08-24 16:23:21 +08:00
```
### 格式化
```bash
2023-09-19 19:59:07 +08:00
sing-box format -w -c config.json -D config_directory
```
### 合并
```bash
sing-box merge output.json -c config.json -D config_directory
2022-08-24 16:23:21 +08:00
```