mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-26 18:41:31 +00:00
49 lines
969 B
Markdown
49 lines
969 B
Markdown
# Introduction
|
|
|
|
sing-box uses JSON for configuration files.
|
|
|
|
### Structure
|
|
|
|
```json
|
|
{
|
|
"log": {},
|
|
"dns": {},
|
|
"ntp": {},
|
|
"endpoints": [],
|
|
"inbounds": [],
|
|
"outbounds": [],
|
|
"route": {},
|
|
"experimental": {}
|
|
}
|
|
```
|
|
|
|
### Fields
|
|
|
|
| Key | Format |
|
|
|----------------|---------------------------------|
|
|
| `log` | [Log](./log/) |
|
|
| `dns` | [DNS](./dns/) |
|
|
| `ntp` | [NTP](./ntp/) |
|
|
| `endpoints` | [Endpoint](./endpoint/) |
|
|
| `inbounds` | [Inbound](./inbound/) |
|
|
| `outbounds` | [Outbound](./outbound/) |
|
|
| `route` | [Route](./route/) |
|
|
| `experimental` | [Experimental](./experimental/) |
|
|
|
|
### Check
|
|
|
|
```bash
|
|
sing-box check
|
|
```
|
|
|
|
### Format
|
|
|
|
```bash
|
|
sing-box format -w -c config.json -D config_directory
|
|
```
|
|
|
|
### Merge
|
|
|
|
```bash
|
|
sing-box merge output.json -c config.json -D config_directory
|
|
``` |