sing-box/docs/configuration/rule-set/index.md

94 lines
966 B
Markdown
Raw Normal View History

2024-06-25 16:45:10 +00:00
# rule-set
2023-12-01 05:24:18 +00:00
!!! question "Since sing-box 1.8.0"
### Structure
```json
{
"type": "",
"tag": "",
"format": "",
... // Typed Fields
}
```
#### Local Structure
```json
{
"type": "local",
...
"path": ""
}
```
#### Remote Structure
!!! info ""
Remote rule-set will be cached if `experimental.cache_file.enabled`.
```json
{
"type": "remote",
...,
"url": "",
"download_detour": "",
"update_interval": ""
}
```
### Fields
#### type
==Required==
2024-06-25 16:45:10 +00:00
Type of rule-set, `local` or `remote`.
2023-12-01 05:24:18 +00:00
#### tag
==Required==
2024-06-25 16:45:10 +00:00
Tag of rule-set.
2023-12-01 05:24:18 +00:00
#### format
==Required==
2024-06-25 16:45:10 +00:00
Format of rule-set, `source` or `binary`.
2023-12-01 05:24:18 +00:00
### Local Fields
#### path
==Required==
2024-06-25 16:45:10 +00:00
File path of rule-set.
2023-12-01 05:24:18 +00:00
### Remote Fields
#### url
==Required==
2024-06-25 16:45:10 +00:00
Download URL of rule-set.
2023-12-01 05:24:18 +00:00
#### download_detour
Tag of the outbound to download rule-set.
Default outbound will be used if empty.
#### update_interval
2024-06-25 16:45:10 +00:00
Update interval of rule-set.
2023-12-01 05:24:18 +00:00
`1d` will be used if empty.