Update documentation

This commit is contained in:
世界
2023-12-03 14:53:22 +08:00
parent deba59c140
commit 0f965cf1f4
50 changed files with 768 additions and 388 deletions

View File

@@ -183,7 +183,7 @@ DNS 查询类型。值可以为整数或者类型名称字符串。
!!! failure "已在 sing-box 1.8.0 废弃"
Geosite 已废弃且可能在不久的将来移除,参阅 [迁移指南](/migration/#migrate-geosite-to-rule-sets)。
Geosite 已废弃且可能在不久的将来移除,参阅 [迁移指南](/zh/migration/#geosite)。
匹配 Geosite。
@@ -191,7 +191,7 @@ DNS 查询类型。值可以为整数或者类型名称字符串。
!!! failure "已在 sing-box 1.8.0 废弃"
GeoIp 已废弃且可能在不久的将来移除,参阅 [迁移指南](/migration/#migrate-geoip-to-rule-sets)。
GeoIP 已废弃且可能在不久的将来移除,参阅 [迁移指南](/zh/migration/#geoip)。
匹配源 GeoIP。

View File

@@ -45,20 +45,12 @@ The address of the dns server.
!!! warning ""
To ensure that system DNS is in effect, rather than Go's built-in default resolver, enable CGO at compile time.
!!! warning ""
QUIC and HTTP3 transport is not included by default, see [Installation](./#installation).
To ensure that Android system DNS is in effect, rather than Go's built-in default resolver, enable CGO at compile time.
!!! info ""
the RCode transport is often used to block queries. Use with rules and the `disable_cache` rule option.
!!! warning ""
DHCP transport is not included by default, see [Installation](./#installation).
| RCode | Description |
|-------------------|-----------------------|
| `success` | `No error` |

View File

@@ -45,20 +45,12 @@ DNS 服务器的地址。
!!! warning ""
为了确保系统 DNS 生效,而不是 Go 的内置默认解析器,请在编译时启用 CGO。
!!! warning ""
默认安装不包含 QUIC 和 HTTP3 传输层,请参阅 [安装](/zh/#_2)。
为了确保 Android 系统 DNS 生效,而不是 Go 的内置默认解析器,请在编译时启用 CGO。
!!! info ""
RCode 传输层传输层常用于屏蔽请求. 与 DNS 规则和 `disable_cache` 规则选项一起使用。
!!! warning ""
默认安装不包含 DHCP 传输层,请参阅 [安装](/zh/#_2)。
| RCode | 描述 |
|-------------------|----------|
| `success` | `无错误` |

View File

@@ -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
缓存文件中的标识符。
如果不为空,配置特定的数据将使用由其键控的单独存储。

View File

@@ -10,11 +10,6 @@ icon: material/alert-decagram
:material-delete-alert: [cache_file](#cache_file)
:material-delete-alert: [cache_id](#cache_id)
!!! quote ""
Clash API is not included by default, see [Installation](./#installation).
### Structure
```json
@@ -48,8 +43,6 @@ A relative path to the configuration directory or an absolute path to a
directory in which you put some static web resource. sing-box will then
serve it at `http://{{external-controller}}/ui`.
#### external_ui_download_url
ZIP download URL for the external UI, will be used if the specified `external_ui` directory is empty.
@@ -118,4 +111,4 @@ Cache file path, `cache.db` will be used if empty.
Identifier in cache file.
If not empty, configuration specified data will use a separate store keyed by it.
If not empty, configuration specified data will use a separate store keyed by it.

View File

@@ -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。
如果不为空,配置特定的数据将使用由其键控的单独存储。

View File

@@ -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/) |

View File

@@ -1,8 +1,8 @@
### Structure
!!! quote ""
V2Ray API is not included by default, see [Installation](./#installation).
V2Ray API is not included by default, see [Installation](/installation/build-from-source/#build-tags).
### Structure
```json
{

View File

@@ -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
统计流量的用户列表。

View File

@@ -29,10 +29,6 @@
}
```
!!! warning ""
QUIC, which is required by hysteria is not included by default, see [Installation](./#installation).
### Listen Fields
See [Listen Fields](/configuration/shared/listen/) for details.

View File

@@ -29,10 +29,6 @@
}
```
!!! warning ""
默认安装不包含被 Hysteria 依赖的 QUIC参阅 [安装](/zh/#_2)。
### 监听字段
参阅 [监听字段](/zh/configuration/shared/listen/)。

View File

@@ -26,10 +26,6 @@
}
```
!!! warning ""
QUIC, which is required by Hysteria2 is not included by default, see [Installation](./#installation).
!!! warning "Difference from official Hysteria2"
The official program supports an authentication method called **userpass**,

View File

@@ -26,10 +26,6 @@
}
```
!!! warning ""
默认安装不包含被 Hysteria2 依赖的 QUIC参阅 [安装](/zh/#_2)。
!!! warning "与官方 Hysteria2 的区别"
官方程序支持一种名为 **userpass** 的验证方式,

View File

@@ -18,10 +18,6 @@
}
```
!!! warning ""
HTTP3 transport is not included by default, see [Installation](./#installation).
### Listen Fields
See [Listen Fields](/configuration/shared/listen/) for details.

View File

@@ -18,10 +18,6 @@
}
```
!!! warning ""
默认安装不包含 HTTP3 传输层, 参阅 [安装](/zh/#_2)。
### 监听字段
参阅 [监听字段](/zh/configuration/shared/listen/)。

View File

@@ -22,10 +22,6 @@
}
```
!!! warning ""
QUIC, which is required by TUIC is not included by default, see [Installation](./#installation).
### Listen Fields
See [Listen Fields](/configuration/shared/listen/) for details.

View File

@@ -22,10 +22,6 @@
}
```
!!! warning ""
默认安装不包含被 TUI 依赖的 QUIC参阅 [安装](/zh/#_2)。
### 监听字段
参阅 [监听字段](/zh/configuration/shared/listen/)。

View File

@@ -172,7 +172,7 @@ TCP/IP stack.
!!! warning ""
gVisor and LWIP stacks is not included by default, see [Installation](./#installation).
LWIP stacks is not included by default, see [Installation](/installation/build-from-source/#build-tags).
#### include_interface

View File

@@ -168,7 +168,7 @@ TCP/IP 栈。
!!! warning ""
默认安装不包含 gVisor 和 LWIP 栈,参阅 [安装](/zh/#_2)。
默认安装不包含 LWIP 栈,参阅 [安装](/zh/installation/build-from-source/#_5)。
#### include_interface

View File

@@ -24,10 +24,6 @@
}
```
!!! warning ""
QUIC, which is required by hysteria is not included by default, see [Installation](./#installation).
### Fields
#### server

View File

@@ -24,10 +24,6 @@
}
```
!!! warning ""
默认安装不包含被 Hysteria 依赖的 QUIC参阅 [安装](/zh/#_2)。
### 字段
#### server

View File

@@ -22,10 +22,6 @@
}
```
!!! warning ""
QUIC, which is required by Hysteria2 is not included by default, see [Installation](./#installation).
!!! warning "Difference from official Hysteria2"
The official Hysteria2 supports an authentication method called **userpass**,

View File

@@ -22,10 +22,6 @@
}
```
!!! warning ""
默认安装不包含被 Hysteria2 依赖的 QUIC参阅 [安装](/zh/#_2)。
!!! warning "与官方 Hysteria2 的区别"
官方程序支持一种名为 **userpass** 的验证方式,

View File

@@ -15,8 +15,8 @@
### Fields
| Type | Format |
|----------------|---------------------------------|
| Type | Format |
|----------------|--------------------------------|
| `direct` | [Direct](./direct/) |
| `block` | [Block](./block/) |
| `socks` | [SOCKS](./socks/) |
@@ -26,7 +26,6 @@
| `trojan` | [Trojan](./trojan/) |
| `wireguard` | [Wireguard](./wireguard/) |
| `hysteria` | [Hysteria](./hysteria/) |
| `shadowsocksr` | [ShadowsocksR](./shadowsocksr/) |
| `vless` | [VLESS](./vless/) |
| `shadowtls` | [ShadowTLS](./shadowtls/) |
| `tuic` | [TUIC](./tuic/) |

View File

@@ -15,8 +15,8 @@
### 字段
| 类型 | 格式 |
|----------------|---------------------------------|
| 类型 | 格式 |
|----------------|--------------------------------|
| `direct` | [Direct](./direct/) |
| `block` | [Block](./block/) |
| `socks` | [SOCKS](./socks/) |
@@ -26,7 +26,6 @@
| `trojan` | [Trojan](./trojan/) |
| `wireguard` | [Wireguard](./wireguard/) |
| `hysteria` | [Hysteria](./hysteria/) |
| `shadowsocksr` | [ShadowsocksR](./shadowsocksr/) |
| `vless` | [VLESS](./vless/) |
| `shadowtls` | [ShadowTLS](./shadowtls/) |
| `tuic` | [TUIC](./tuic/) |

View File

@@ -1,106 +0,0 @@
### Structure
```json
{
"type": "shadowsocksr",
"tag": "ssr-out",
"server": "127.0.0.1",
"server_port": 1080,
"method": "aes-128-cfb",
"password": "8JCsPssfgS8tiRwiMlhARg==",
"obfs": "plain",
"obfs_param": "",
"protocol": "origin",
"protocol_param": "",
"network": "udp",
... // Dial Fields
}
```
!!! warning ""
The ShadowsocksR protocol is obsolete and unmaintained. This outbound is provided for compatibility only.
!!! warning ""
ShadowsocksR is not included by default, see [Installation](./#installation).
### Fields
#### server
==Required==
The server address.
#### server_port
==Required==
The server port.
#### method
==Required==
Encryption methods:
* `aes-128-ctr`
* `aes-192-ctr`
* `aes-256-ctr`
* `aes-128-cfb`
* `aes-192-cfb`
* `aes-256-cfb`
* `rc4-md5`
* `chacha20-ietf`
* `xchacha20`
#### password
==Required==
The shadowsocks password.
#### obfs
The ShadowsocksR obfuscate.
* plain
* http_simple
* http_post
* random_head
* tls1.2_ticket_auth
#### obfs_param
The ShadowsocksR obfuscate parameter.
#### protocol
The ShadowsocksR protocol.
* origin
* verify_sha1
* auth_sha1_v4
* auth_aes128_md5
* auth_aes128_sha1
* auth_chain_a
* auth_chain_b
#### protocol_param
The ShadowsocksR protocol parameter.
#### network
Enabled network
One of `tcp` `udp`.
Both is enabled by default.
### Dial Fields
See [Dial Fields](/configuration/shared/dial/) for details.

View File

@@ -1,106 +0,0 @@
### 结构
```json
{
"type": "shadowsocksr",
"tag": "ssr-out",
"server": "127.0.0.1",
"server_port": 1080,
"method": "aes-128-cfb",
"password": "8JCsPssfgS8tiRwiMlhARg==",
"obfs": "plain",
"obfs_param": "",
"protocol": "origin",
"protocol_param": "",
"network": "udp",
... // 拨号字段
}
```
!!! warning ""
ShadowsocksR 协议已过时且无人维护。 提供此出站仅出于兼容性目的。
!!! warning ""
默认安装不包含被 ShadowsocksR参阅 [安装](/zh/#_2)。
### 字段
#### server
==必填==
服务器地址。
#### server_port
==必填==
服务器端口。
#### method
==必填==
加密方法:
* `aes-128-ctr`
* `aes-192-ctr`
* `aes-256-ctr`
* `aes-128-cfb`
* `aes-192-cfb`
* `aes-256-cfb`
* `rc4-md5`
* `chacha20-ietf`
* `xchacha20`
#### password
==必填==
Shadowsocks 密码。
#### obfs
ShadowsocksR 混淆。
* plain
* http_simple
* http_post
* random_head
* tls1.2_ticket_auth
#### obfs_param
ShadowsocksR 混淆参数。
#### protocol
ShadowsocksR 协议。
* origin
* verify_sha1
* auth_sha1_v4
* auth_aes128_md5
* auth_aes128_sha1
* auth_chain_a
* auth_chain_b
#### protocol_param
ShadowsocksR 协议参数。
#### network
启用的网络协议
`tcp``udp`
默认所有。
### 拨号字段
参阅 [拨号字段](/zh/configuration/shared/dial/)。

View File

@@ -18,7 +18,7 @@
!!! info ""
Embedded tor is not included by default, see [Installation](./#installation).
Embedded Tor is not included by default, see [Installation](/installation/build-from-source/#build-tags).
### Fields

View File

@@ -18,7 +18,7 @@
!!! info ""
默认安装不包含嵌入式 Tor, 参阅 [安装](/zh/#_2)。
默认安装不包含嵌入式 Tor, 参阅 [安装](/zh/installation/build-from-source/#_5)。
### 字段

View File

@@ -21,10 +21,6 @@
}
```
!!! warning ""
QUIC, which is required by TUIC is not included by default, see [Installation](./#installation).
### Fields
#### server

View File

@@ -21,10 +21,6 @@
}
```
!!! warning ""
默认安装不包含被 TUI 依赖的 QUIC参阅 [安装](/zh/#_2)。
### 字段
#### server

View File

@@ -36,14 +36,6 @@
}
```
!!! warning ""
WireGuard is not included by default, see [Installation](./#installation).
!!! warning ""
gVisor, which is required by the unprivileged WireGuard is not included by default, see [Installation](./#installation).
### Fields
#### server

View File

@@ -24,14 +24,6 @@
}
```
!!! warning ""
默认安装不包含 WireGuard, 参阅 [安装](/zh/#_2)。
!!! warning ""
默认安装不包含被非特权 WireGuard 需要的 gVisor, 参阅 [安装](/zh/#_2)。
### 字段
#### server

View File

@@ -0,0 +1,41 @@
---
icon: material/delete-clock
---
!!! failure "已在 sing-box 1.8.0 废弃"
GeoIP 已废弃且可能在不久的将来移除,参阅 [迁移指南](/zh/migration/#geoip)。
### 结构
```json
{
"route": {
"geoip": {
"path": "",
"download_url": "",
"download_detour": ""
}
}
}
```
### 字段
#### path
指定 GeoIP 资源的路径。
默认 `geoip.db`
#### download_url
指定 GeoIP 资源的下载链接。
默认为 `https://github.com/SagerNet/sing-geoip/releases/latest/download/geoip.db`
#### download_detour
用于下载 GeoIP 资源的出站的标签。
如果为空,将使用默认出站。

View File

@@ -0,0 +1,41 @@
---
icon: material/delete-clock
---
!!! failure "已在 sing-box 1.8.0 废弃"
Geosite 已废弃且可能在不久的将来移除,参阅 [迁移指南](/zh/migration/#geosite)。
### 结构
```json
{
"route": {
"geosite": {
"path": "",
"download_url": "",
"download_detour": ""
}
}
}
```
### 字段
#### path
指定 GeoSite 资源的路径。
默认 `geosite.db`
#### download_url
指定 GeoSite 资源的下载链接。
默认为 `https://github.com/SagerNet/sing-geosite/releases/latest/download/geosite.db`
#### download_detour
用于下载 GeoSite 资源的出站的标签。
如果为空,将使用默认出站。

View File

@@ -182,7 +182,7 @@ icon: material/alert-decagram
!!! failure "已在 sing-box 1.8.0 废弃"
Geosite 已废弃且可能在不久的将来移除,参阅 [迁移指南](/migration/#migrate-geosite-to-rule-sets)。
Geosite 已废弃且可能在不久的将来移除,参阅 [迁移指南](/zh/migration/#geosite)。
匹配 Geosite。
@@ -190,7 +190,7 @@ icon: material/alert-decagram
!!! failure "已在 sing-box 1.8.0 废弃"
GeoIp 已废弃且可能在不久的将来移除,参阅 [迁移指南](/migration/#migrate-geoip-to-rule-sets)。
GeoIP 已废弃且可能在不久的将来移除,参阅 [迁移指南](/zh/migration/#geoip)。
匹配源 GeoIP。
@@ -198,7 +198,7 @@ icon: material/alert-decagram
!!! failure "已在 sing-box 1.8.0 废弃"
GeoIp 已废弃且可能在不久的将来移除,参阅 [迁移指南](/migration/#migrate-geoip-to-rule-sets)。
GeoIP 已废弃且可能在不久的将来移除,参阅 [迁移指南](/zh/migration/#geoip)。
匹配 GeoIP。

View File

@@ -199,10 +199,6 @@ The path to the server private key, in PEM format.
==Client only==
!!! warning ""
uTLS is not included by default, see [Installation](./#installation).
!!! note ""
uTLS is poorly maintained and the effect may be unproven, use at your own risk.
@@ -226,10 +222,6 @@ Chrome fingerprint will be used if empty.
### ECH Fields
!!! warning ""
ECH is not included by default, see [Installation](./#installation).
ECH (Encrypted Client Hello) is a TLS extension that allows a client to encrypt the first part of its ClientHello
message.
@@ -278,10 +270,6 @@ If empty, load from DNS will be attempted.
### ACME Fields
!!! warning ""
ACME is not included by default, see [Installation](./#installation).
#### domain
List of domain.
@@ -357,14 +345,6 @@ See [DNS01 Challenge Fields](/configuration/shared/dns01_challenge/) for details
### Reality Fields
!!! warning ""
reality server is not included by default, see [Installation](./#installation).
!!! warning ""
uTLS, which is required by reality client is not included by default, see [Installation](./#installation).
#### handshake
==Server only==

View File

@@ -193,10 +193,6 @@ TLS 版本值:
==仅客户端==
!!! warning ""
默认安装不包含 uTLS, 参阅 [安装](/zh/#_2)。
!!! note ""
uTLS 维护不善且其效果可能未经证实,使用风险自负。
@@ -220,14 +216,9 @@ uTLS 是 "crypto/tls" 的一个分支,它提供了 ClientHello 指纹识别阻
## ECH 字段
!!! warning ""
默认安装不包含 ECH, 参阅 [安装](/zh/#_2)。
ECH (Encrypted Client Hello) 是一个 TLS 扩展,它允许客户端加密其 ClientHello 的第一部分
信息。
ECH 配置和密钥可以通过 `sing-box generate ech-keypair [--pq-signature-schemes-enabled]` 生成。
#### pq_signature_schemes_enabled
@@ -273,10 +264,6 @@ ECH PEM 配置路径
### ACME 字段
!!! warning ""
默认安装不包含 ACME参阅 [安装](/zh/#_2)。
#### domain
一组域名。
@@ -348,14 +335,6 @@ ACME DNS01 验证字段。如果配置,将禁用其他验证方法。
### Reality 字段
!!! warning ""
默认安装不包含 reality 服务器,参阅 [安装](/zh/#_2)。
!!! warning ""
默认安装不包含被 reality 客户端需要的 uTLS, 参阅 [安装](/zh/#_2)。
#### handshake
==仅服务器==

View File

@@ -142,10 +142,6 @@ It needs to be consistent with the server.
}
```
!!! warning ""
QUIC is not included by default, see [Installation](./#installation).
!!! warning "Difference from v2ray-core"
No additional encryption support:
@@ -155,7 +151,7 @@ It needs to be consistent with the server.
!!! note ""
standard gRPC has good compatibility but poor performance and is not included by default, see [Installation](./#installation).
standard gRPC has good compatibility but poor performance and is not included by default, see [Installation](/installation/build-from-source/#build-tags).
```json
{

View File

@@ -135,10 +135,6 @@ HTTP 请求的额外标头
}
```
!!! warning ""
默认安装不包含 QUIC, 参阅 [安装](/zh/#_2)。
!!! warning "与 v2ray-core 的区别"
没有额外的加密支持:
@@ -148,7 +144,7 @@ HTTP 请求的额外标头
!!! note ""
默认安装不包含标准 gRPC (兼容性好,但性能较差), 参阅 [安装](/zh/#_2)。
默认安装不包含标准 gRPC (兼容性好,但性能较差), 参阅 [安装](/zh/installation/build-from-source/#_5)。
```json
{