github.com/sagernet/sing-box@v1.2.7/docs/configuration/experimental/index.md (about) 1 # Experimental 2 3 ### Structure 4 5 ```json 6 { 7 "experimental": { 8 "clash_api": { 9 "external_controller": "127.0.0.1:9090", 10 "external_ui": "folder", 11 "secret": "", 12 "default_mode": "rule", 13 "store_selected": false, 14 "cache_file": "cache.db" 15 }, 16 "v2ray_api": { 17 "listen": "127.0.0.1:8080", 18 "stats": { 19 "enabled": true, 20 "inbounds": [ 21 "socks-in" 22 ], 23 "outbounds": [ 24 "proxy", 25 "direct" 26 ], 27 "users": [ 28 "sekai" 29 ] 30 } 31 } 32 } 33 } 34 ``` 35 36 !!! note "" 37 38 Traffic statistics and connection management can degrade performance. 39 40 ### Clash API Fields 41 42 !!! error "" 43 44 Clash API is not included by default, see [Installation](/#installation). 45 46 #### external_controller 47 48 RESTful web API listening address. Clash API will be disabled if empty. 49 50 #### external_ui 51 52 A relative path to the configuration directory or an absolute path to a 53 directory in which you put some static web resource. sing-box will then 54 serve it at `http://{{external-controller}}/ui`. 55 56 #### secret 57 58 Secret for the RESTful API (optional) 59 Authenticate by spedifying HTTP header `Authorization: Bearer ${secret}` 60 ALWAYS set a secret if RESTful API is listening on 0.0.0.0 61 62 #### default_mode 63 64 Default mode in clash, `rule` will be used if empty. 65 66 This setting has no direct effect, but can be used in routing and DNS rules via the `clash_mode` rule item. 67 68 #### store_selected 69 70 !!! note "" 71 72 The tag must be set for target outbounds. 73 74 Store selected outbound for the `Selector` outbound in cache file. 75 76 #### cache_file 77 78 Cache file path, `cache.db` will be used if empty. 79 80 ### V2Ray API Fields 81 82 !!! error "" 83 84 V2Ray API is not included by default, see [Installation](/#installation). 85 86 #### listen 87 88 gRPC API listening address. V2Ray API will be disabled if empty. 89 90 #### stats 91 92 Traffic statistics service settings. 93 94 #### stats.enabled 95 96 Enable statistics service. 97 98 #### stats.inbounds 99 100 Inbound list to count traffic. 101 102 #### stats.outbounds 103 104 Outbound list to count traffic. 105 106 #### stats.users 107 108 User list to count traffic.