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",
|
2023-05-09 09:58:59 +00:00
|
|
|
"external_ui": "",
|
2023-04-09 04:39:26 +00:00
|
|
|
"external_ui_download_url": "",
|
|
|
|
"external_ui_download_detour": "",
|
2022-09-10 14:42:20 +00:00
|
|
|
"secret": "",
|
2023-05-09 09:58:59 +00:00
|
|
|
"default_mode": "",
|
2022-09-10 14:42:20 +00:00
|
|
|
"store_selected": false,
|
2023-05-09 09:58:59 +00:00
|
|
|
"cache_file": "",
|
|
|
|
"cache_id": ""
|
2022-10-01 03:48:46 +00:00
|
|
|
},
|
|
|
|
"v2ray_api": {
|
|
|
|
"listen": "127.0.0.1:8080",
|
|
|
|
"stats": {
|
|
|
|
"enabled": true,
|
|
|
|
"inbounds": [
|
|
|
|
"socks-in"
|
|
|
|
],
|
|
|
|
"outbounds": [
|
|
|
|
"proxy",
|
|
|
|
"direct"
|
2023-02-08 08:50:15 +00:00
|
|
|
],
|
|
|
|
"users": [
|
|
|
|
"sekai"
|
2022-10-01 03:48:46 +00:00
|
|
|
]
|
|
|
|
}
|
2022-07-19 23:36:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2022-10-01 03:48:46 +00:00
|
|
|
!!! note ""
|
|
|
|
|
|
|
|
Traffic statistics and connection management can degrade performance.
|
|
|
|
|
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
|
|
|
|
|
|
|
#### 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
|
2022-08-24 08:23:21 +00:00
|
|
|
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`.
|
|
|
|
|
2023-04-09 04:39:26 +00:00
|
|
|
#### external_ui_download_url
|
|
|
|
|
|
|
|
ZIP download URL for the external UI, will be used if the specified `external_ui` directory is empty.
|
|
|
|
|
|
|
|
`https://github.com/MetaCubeX/Yacd-meta/archive/gh-pages.zip` will be used if empty.
|
|
|
|
|
|
|
|
#### external_ui_download_detour
|
|
|
|
|
|
|
|
The tag of the outbound to download the external UI.
|
|
|
|
|
|
|
|
Default outbound will be used if empty.
|
|
|
|
|
2022-07-19 23:36:06 +00:00
|
|
|
#### 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
|
|
|
|
|
2022-10-01 03:48:46 +00:00
|
|
|
Cache file path, `cache.db` will be used if empty.
|
|
|
|
|
2023-05-09 09:58:59 +00:00
|
|
|
#### cache_id
|
|
|
|
|
|
|
|
Cache ID.
|
|
|
|
|
|
|
|
If not empty, `store_selected` will use a separate store keyed by it.
|
|
|
|
|
2022-10-01 03:48:46 +00:00
|
|
|
### V2Ray API Fields
|
|
|
|
|
|
|
|
!!! error ""
|
|
|
|
|
|
|
|
V2Ray API is not included by default, see [Installation](/#installation).
|
|
|
|
|
|
|
|
#### listen
|
|
|
|
|
|
|
|
gRPC API listening address. V2Ray API will be disabled if empty.
|
|
|
|
|
|
|
|
#### stats
|
|
|
|
|
|
|
|
Traffic statistics service settings.
|
|
|
|
|
|
|
|
#### stats.enabled
|
|
|
|
|
|
|
|
Enable statistics service.
|
|
|
|
|
|
|
|
#### stats.inbounds
|
|
|
|
|
|
|
|
Inbound list to count traffic.
|
|
|
|
|
|
|
|
#### stats.outbounds
|
|
|
|
|
|
|
|
Outbound list to count traffic.
|
2023-02-08 08:50:15 +00:00
|
|
|
|
|
|
|
#### stats.users
|
|
|
|
|
|
|
|
User list to count traffic.
|