Add documentation for clash_api
This commit is contained in:
39
docs/configuration/experimental.md
Normal file
39
docs/configuration/experimental.md
Normal file
@@ -0,0 +1,39 @@
|
||||
### Structure
|
||||
|
||||
```json
|
||||
{
|
||||
"experimental": {
|
||||
"clash_api": {
|
||||
"external_controller": "127.0.0.1:9090",
|
||||
"external_ui": "folder",
|
||||
"secret": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Clash API Fields
|
||||
|
||||
!!! error ""
|
||||
|
||||
Clash API is not included by default, see [Installation](/#Installation).
|
||||
|
||||
!!! note ""
|
||||
|
||||
Traffic statistics and connection management will disable TCP splice in linux and reduce performance, use at your own risk.
|
||||
|
||||
#### external_controller
|
||||
|
||||
RESTful web API listening address. Disabled if empty.
|
||||
|
||||
#### external_ui
|
||||
|
||||
A relative path to the configuration directory or an absolute path to a
|
||||
directory in which you put some static web resource. Clash core will then
|
||||
serve it at `http://{{external-controller}}/ui`.
|
||||
|
||||
#### secret
|
||||
|
||||
Secret for the RESTful API (optional)
|
||||
Authenticate by spedifying HTTP header `Authorization: Bearer ${secret}`
|
||||
ALWAYS set a secret if RESTful API is listening on 0.0.0.0
|
||||
@@ -10,19 +10,21 @@ sing-box uses JSON for configuration files.
|
||||
"dns": {},
|
||||
"inbounds": {},
|
||||
"outbounds": {},
|
||||
"route": {}
|
||||
"route": {},
|
||||
"experimental": {}
|
||||
}
|
||||
```
|
||||
|
||||
### Fields
|
||||
|
||||
| Key | Format |
|
||||
|-------------|------------------------|
|
||||
| `log` | [Log](./log) |
|
||||
| `dns` | [DNS](./dns) |
|
||||
| `inbounds` | [Inbound](./inbound) |
|
||||
| `outbounds` | [Outbound](./outbound) |
|
||||
| `route` | [Route](./route) |
|
||||
| Key | Format |
|
||||
|----------------|--------------------------------|
|
||||
| `log` | [Log](./log) |
|
||||
| `dns` | [DNS](./dns) |
|
||||
| `inbounds` | [Inbound](./inbound) |
|
||||
| `outbounds` | [Outbound](./outbound) |
|
||||
| `route` | [Route](./route) |
|
||||
| `experimental` | [Experimental](./experimental) |
|
||||
|
||||
### Check
|
||||
|
||||
|
||||
@@ -9,9 +9,20 @@ The universal proxy platform.
|
||||
sing-box requires Golang 1.18 or a higher version.
|
||||
|
||||
```bash
|
||||
go install github.com/sagernet/sing-box/cmd/sing-box@latest
|
||||
go install -v github.com/sagernet/sing-box/cmd/sing-box@latest
|
||||
```
|
||||
|
||||
Install with options:
|
||||
|
||||
```bash
|
||||
go install -v -tags "with_clash_api,no_gvisor" github.com/sagernet/sing-box/cmd/sing-box@latest
|
||||
```
|
||||
|
||||
| Build Tag | Description |
|
||||
|------------------|-----------------------------------------------------------------------------------------|
|
||||
| `with_clash_api` | Build with clash api support, see [Experimental](./configuration/experimental). |
|
||||
| `no_gvisor` | Build without gVisor, which required by the [Tun](./configuration/inbound/tun) inbound. |
|
||||
|
||||
The binary is built under $GOPATH/bin
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user