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

118 lines
1.5 KiB
Markdown
Raw Normal View History

---
status: new
---
!!! quote "Changes in sing-box 1.10.0"
:material-plus: `type: inline`
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
=== "Inline"
!!! question "Since sing-box 1.10.0"
```json
{
"type": "inline", // optional
"tag": "",
"rules": []
}
```
=== "Local File"
```json
{
"type": "local",
"tag": "",
"format": "source", // or binary
"path": ""
}
```
=== "Remote File"
!!! info ""
Remote rule-set will be cached if `experimental.cache_file.enabled`.
```json
{
"type": "remote",
"tag": "",
"format": "source", // or binary
"url": "",
"download_detour": "", // optional
"update_interval": "" // optional
}
```
2023-12-01 05:24:18 +00:00
### 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
### Inline Fields
!!! question "Since sing-box 1.10.0"
#### rules
==Required==
2024-11-11 11:33:40 +00:00
List of [Headless Rule](../headless-rule/).
### Local or Remote Fields
2023-12-01 05:24:18 +00:00
#### format
==Required==
Format of rule-set file, `source` or `binary`.
2023-12-01 05:24:18 +00:00
### Local Fields
#### path
==Required==
!!! note ""
Will be automatically reloaded if file modified since sing-box 1.10.0.
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.