sing-box/docs/configuration/index.md

47 lines
897 B
Markdown
Raw Normal View History

2022-07-08 09:01:38 +00:00
# Introduction
sing-box uses JSON for configuration files.
### Structure
```json
{
"log": {},
"dns": {},
2023-02-21 12:20:17 +00:00
"ntp": {},
2022-08-31 05:21:29 +00:00
"inbounds": [],
"outbounds": [],
2022-07-19 23:36:06 +00:00
"route": {},
"experimental": {}
2022-07-08 09:01:38 +00:00
}
```
### Fields
2023-12-14 14:23:52 +00: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 09:01:38 +00:00
### Check
```bash
2023-09-19 11:59:07 +00:00
sing-box check
2022-07-08 09:01:38 +00:00
```
### Format
```bash
2023-09-19 11:59:07 +00: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 09:01:38 +00:00
```