sing-box/docs/configuration/experimental/index.md

62 lines
1.4 KiB
Markdown
Raw Normal View History

2022-08-25 13:08:29 +00:00
# Experimental
2022-07-19 23:36:06 +00:00
### Structure
```json
{
"experimental": {
"clash_api": {
"external_controller": "127.0.0.1:9090",
"external_ui": "folder",
2022-09-10 14:42:20 +00:00
"secret": "",
"default_mode": "rule",
"store_selected": false,
"cache_file": "cache.db"
2022-07-19 23:36:06 +00:00
}
}
}
```
### Clash API Fields
!!! error ""
2022-08-23 15:15:56 +00:00
Clash API is not included by default, see [Installation](/#installation).
2022-07-19 23:36:06 +00:00
!!! note ""
Traffic statistics and connection management will disable TCP splice in linux and reduce performance, use at your own risk.
#### external_controller
2022-09-10 14:42:20 +00:00
RESTful web API listening address. Clash API will be disabled if empty.
2022-07-19 23:36:06 +00:00
#### external_ui
A relative path to the configuration directory or an absolute path to a
directory in which you put some static web resource. sing-box will then
2022-07-19 23:36:06 +00:00
serve it at `http://{{external-controller}}/ui`.
#### secret
Secret for the RESTful API (optional)
Authenticate by spedifying HTTP header `Authorization: Bearer ${secret}`
2022-09-10 14:42:20 +00:00
ALWAYS set a secret if RESTful API is listening on 0.0.0.0
#### default_mode
Default mode in clash, `rule` will be used if empty.
This setting has no direct effect, but can be used in routing and DNS rules via the `clash_mode` rule item.
#### store_selected
!!! note ""
The tag must be set for target outbounds.
Store selected outbound for the `Selector` outbound in cache file.
#### cache_file
Cache file path, `cache.db` will be used if empty.