-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1108800
commit 26adcd0
Showing
50 changed files
with
765 additions
and
386 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
icon: material/new-box | ||
--- | ||
|
||
!!! question "自 sing-box 1.8.0 起" | ||
|
||
### 结构 | ||
|
||
```json | ||
{ | ||
"enabled": true, | ||
"path": "", | ||
"cache_id": "", | ||
"store_fakeip": false | ||
} | ||
``` | ||
|
||
### 字段 | ||
|
||
#### enabled | ||
|
||
启用缓存文件。 | ||
|
||
#### path | ||
|
||
缓存文件路径,默认使用`cache.db`。 | ||
|
||
#### cache_id | ||
|
||
缓存文件中的标识符。 | ||
|
||
如果不为空,配置特定的数据将使用由其键控的单独存储。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
--- | ||
icon: material/alert-decagram | ||
--- | ||
|
||
!!! quote "sing-box 1.8.0 中的更改" | ||
|
||
:material-delete-alert: [store_mode](#store_mode) | ||
:material-delete-alert: [store_selected](#store_selected) | ||
:material-delete-alert: [store_fakeip](#store_fakeip) | ||
:material-delete-alert: [cache_file](#cache_file) | ||
:material-delete-alert: [cache_id](#cache_id) | ||
|
||
### 结构 | ||
|
||
```json | ||
{ | ||
"external_controller": "127.0.0.1:9090", | ||
"external_ui": "", | ||
"external_ui_download_url": "", | ||
"external_ui_download_detour": "", | ||
"secret": "", | ||
"default_mode": "", | ||
|
||
// Deprecated | ||
|
||
"store_mode": false, | ||
"store_selected": false, | ||
"store_fakeip": false, | ||
"cache_file": "", | ||
"cache_id": "" | ||
} | ||
``` | ||
|
||
### Fields | ||
|
||
#### external_controller | ||
|
||
RESTful web API 监听地址。如果为空,则禁用 Clash API。 | ||
|
||
#### external_ui | ||
|
||
到静态网页资源目录的相对路径或绝对路径。sing-box 会在 `http://{{external-controller}}/ui` 下提供它。 | ||
|
||
#### external_ui_download_url | ||
|
||
静态网页资源的 ZIP 下载 URL,如果指定的 `external_ui` 目录为空,将使用。 | ||
|
||
默认使用 `https://github.com/MetaCubeX/Yacd-meta/archive/gh-pages.zip`。 | ||
|
||
#### external_ui_download_detour | ||
|
||
用于下载静态网页资源的出站的标签。 | ||
|
||
如果为空,将使用默认出站。 | ||
|
||
#### secret | ||
|
||
RESTful API 的密钥(可选) | ||
通过指定 HTTP 标头 `Authorization: Bearer ${secret}` 进行身份验证 | ||
如果 RESTful API 正在监听 0.0.0.0,请始终设置一个密钥。 | ||
|
||
#### default_mode | ||
|
||
Clash 中的默认模式,默认使用 `Rule`。 | ||
|
||
此设置没有直接影响,但可以通过 `clash_mode` 规则项在路由和 DNS 规则中使用。 | ||
|
||
#### store_mode | ||
|
||
!!! failure "已在 sing-box 1.8.0 废弃" | ||
|
||
`store_mode` 已在 Clash API 中废弃,且默认启用当 `cache_file.enabled`。 | ||
|
||
将 Clash 模式存储在缓存文件中。 | ||
|
||
#### store_selected | ||
|
||
!!! failure "已在 sing-box 1.8.0 废弃" | ||
|
||
`store_selected` 已在 Clash API 中废弃,且默认启用当 `cache_file.enabled`。 | ||
|
||
!!! note "" | ||
|
||
必须为目标出站设置标签。 | ||
|
||
将 `Selector` 中出站的选定的目标出站存储在缓存文件中。 | ||
|
||
#### store_fakeip | ||
|
||
!!! failure "已在 sing-box 1.8.0 废弃" | ||
|
||
`store_selected` 已在 Clash API 中废弃,且已迁移到 `cache_file.store_fakeip`。 | ||
|
||
将 fakeip 存储在缓存文件中。 | ||
|
||
#### cache_file | ||
|
||
!!! failure "已在 sing-box 1.8.0 废弃" | ||
|
||
`cache_file` 已在 Clash API 中废弃,且已迁移到 `cache_file.enabled` 和 `cache_file.path`。 | ||
|
||
缓存文件路径,默认使用`cache.db`。 | ||
|
||
#### cache_id | ||
|
||
!!! failure "已在 sing-box 1.8.0 废弃" | ||
|
||
`cache_id` 已在 Clash API 中废弃,且已迁移到 `cache_file.cache_id`。 | ||
|
||
缓存 ID。 | ||
|
||
如果不为空,配置特定的数据将使用由其键控的单独存储。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
icon: material/alert-decagram | ||
--- | ||
|
||
# 实验性 | ||
|
||
!!! quote "sing-box 1.8.0 中的更改" | ||
|
||
:material-plus: [cache_file](#cache_file) | ||
:material-alert-decagram: [clash_api](#clash_api) | ||
|
||
### 结构 | ||
|
||
```json | ||
{ | ||
"experimental": { | ||
"cache_file": {}, | ||
"clash_api": {}, | ||
"v2ray_api": {} | ||
} | ||
} | ||
``` | ||
|
||
### 字段 | ||
|
||
| 键 | 格式 | | ||
|--------------|--------------------------| | ||
| `cache_file` | [缓存文件](./cache-file) | | ||
| `clash_api` | [Clash API](./clash-api) | | ||
| `v2ray_api` | [V2Ray API](./v2ray-api) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
!!! quote "" | ||
|
||
默认安装不包含 V2Ray API,参阅 [安装](/zh/installation/build-from-source/#_5)。 | ||
|
||
### 结构 | ||
|
||
```json | ||
{ | ||
"listen": "127.0.0.1:8080", | ||
"stats": { | ||
"enabled": true, | ||
"inbounds": [ | ||
"socks-in" | ||
], | ||
"outbounds": [ | ||
"proxy", | ||
"direct" | ||
], | ||
"users": [ | ||
"sekai" | ||
] | ||
} | ||
} | ||
``` | ||
|
||
### 字段 | ||
|
||
#### listen | ||
|
||
gRPC API 监听地址。如果为空,则禁用 V2Ray API。 | ||
|
||
#### stats | ||
|
||
流量统计服务设置。 | ||
|
||
#### stats.enabled | ||
|
||
启用统计服务。 | ||
|
||
#### stats.inbounds | ||
|
||
统计流量的入站列表。 | ||
|
||
#### stats.outbounds | ||
|
||
统计流量的出站列表。 | ||
|
||
#### stats.users | ||
|
||
统计流量的用户列表。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.