github.com/inazumav/sing-box@v0.0.0-20230926072359-ab51429a14f1/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": "", 11 "external_ui_download_url": "", 12 "external_ui_download_detour": "", 13 "secret": "", 14 "default_mode": "", 15 "store_mode": false, 16 "store_selected": false, 17 "store_fakeip": false, 18 "cache_file": "", 19 "cache_id": "" 20 }, 21 "v2ray_api": { 22 "listen": "127.0.0.1:8080", 23 "stats": { 24 "enabled": true, 25 "inbounds": [ 26 "socks-in" 27 ], 28 "outbounds": [ 29 "proxy", 30 "direct" 31 ], 32 "users": [ 33 "sekai" 34 ] 35 } 36 } 37 } 38 } 39 ``` 40 41 !!! note "" 42 43 Traffic statistics and connection management can degrade performance. 44 45 ### Clash API Fields 46 47 !!! error "" 48 49 Clash API is not included by default, see [Installation](/#installation). 50 51 #### external_controller 52 53 RESTful web API listening address. Clash API will be disabled if empty. 54 55 #### external_ui 56 57 A relative path to the configuration directory or an absolute path to a 58 directory in which you put some static web resource. sing-box will then 59 serve it at `http://{{external-controller}}/ui`. 60 61 #### external_ui_download_url 62 63 ZIP download URL for the external UI, will be used if the specified `external_ui` directory is empty. 64 65 `https://github.com/MetaCubeX/Yacd-meta/archive/gh-pages.zip` will be used if empty. 66 67 #### external_ui_download_detour 68 69 The tag of the outbound to download the external UI. 70 71 Default outbound will be used if empty. 72 73 #### secret 74 75 Secret for the RESTful API (optional) 76 Authenticate by spedifying HTTP header `Authorization: Bearer ${secret}` 77 ALWAYS set a secret if RESTful API is listening on 0.0.0.0 78 79 #### default_mode 80 81 Default mode in clash, `rule` will be used if empty. 82 83 This setting has no direct effect, but can be used in routing and DNS rules via the `clash_mode` rule item. 84 85 #### store_mode 86 87 Store Clash mode in cache file. 88 89 #### store_selected 90 91 !!! note "" 92 93 The tag must be set for target outbounds. 94 95 Store selected outbound for the `Selector` outbound in cache file. 96 97 #### store_fakeip 98 99 Store fakeip in cache file. 100 101 #### cache_file 102 103 Cache file path, `cache.db` will be used if empty. 104 105 #### cache_id 106 107 Cache ID. 108 109 If not empty, `store_selected` will use a separate store keyed by it. 110 111 ### V2Ray API Fields 112 113 !!! error "" 114 115 V2Ray API is not included by default, see [Installation](/#installation). 116 117 #### listen 118 119 gRPC API listening address. V2Ray API will be disabled if empty. 120 121 #### stats 122 123 Traffic statistics service settings. 124 125 #### stats.enabled 126 127 Enable statistics service. 128 129 #### stats.inbounds 130 131 Inbound list to count traffic. 132 133 #### stats.outbounds 134 135 Outbound list to count traffic. 136 137 #### stats.users 138 139 User list to count traffic.