sing-box/docs/configuration/index.md

47 lines
897 B
Markdown
Raw Permalink Normal View History

2022-07-08 17:01:38 +08:00
# Introduction
sing-box uses JSON for configuration files.
### Structure
```json
{
"log": {},
"dns": {},
2023-02-21 20:20:17 +08:00
"ntp": {},
2022-08-31 13:21:29 +08:00
"inbounds": [],
"outbounds": [],
2022-07-20 07:36:06 +08:00
"route": {},
"experimental": {}
2022-07-08 17:01:38 +08:00
}
```
### Fields
2023-12-14 22:23:52 +08:00
| Key | Format |
|----------------|---------------------------------|
| `log` | [Log](./log/) |
| `dns` | [DNS](./dns/) |
| `ntp` | [NTP](./ntp/) |
| `inbounds` | [Inbound](./inbound/) |
| `outbounds` | [Outbound](./outbound/) |
| `route` | [Route](./route/) |
| `experimental` | [Experimental](./experimental/) |
2022-07-08 17:01:38 +08:00
### Check
```bash
2023-09-19 19:59:07 +08:00
sing-box check
2022-07-08 17:01:38 +08:00
```
### Format
```bash
2023-09-19 19:59:07 +08:00
sing-box format -w -c config.json -D config_directory
```
### Merge
```bash
sing-box merge output.json -c config.json -D config_directory
2022-07-08 17:01:38 +08:00
```