Update documentation

This commit is contained in:
世界 2023-12-03 14:53:22 +08:00
parent f1e3a59db3
commit 25810b50c1
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
50 changed files with 768 additions and 388 deletions

View file

@ -2,7 +2,6 @@
icon: material/alert-decagram icon: material/alert-decagram
--- ---
# ChangeLog
#### 1.7.8 #### 1.7.8

View file

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

View file

@ -45,20 +45,12 @@ The address of the dns server.
!!! warning "" !!! warning ""
To ensure that system DNS is in effect, rather than Go's built-in default resolver, enable CGO at compile time. To ensure that Android 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).
!!! info "" !!! info ""
the RCode transport is often used to block queries. Use with rules and the `disable_cache` rule option. 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 | | RCode | Description |
|-------------------|-----------------------| |-------------------|-----------------------|
| `success` | `No error` | | `success` | `No error` |

View file

@ -45,20 +45,12 @@ DNS 服务器的地址。
!!! warning "" !!! warning ""
为了确保系统 DNS 生效,而不是 Go 的内置默认解析器,请在编译时启用 CGO。 为了确保 Android 系统 DNS 生效,而不是 Go 的内置默认解析器,请在编译时启用 CGO。
!!! warning ""
默认安装不包含 QUIC 和 HTTP3 传输层,请参阅 [安装](/zh/#_2)。
!!! info "" !!! info ""
RCode 传输层传输层常用于屏蔽请求. 与 DNS 规则和 `disable_cache` 规则选项一起使用。 RCode 传输层传输层常用于屏蔽请求. 与 DNS 规则和 `disable_cache` 规则选项一起使用。
!!! warning ""
默认安装不包含 DHCP 传输层,请参阅 [安装](/zh/#_2)。
| RCode | 描述 | | RCode | 描述 |
|-------------------|----------| |-------------------|----------|
| `success` | `无错误` | | `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_file](#cache_file)
:material-delete-alert: [cache_id](#cache_id) :material-delete-alert: [cache_id](#cache_id)
!!! quote ""
Clash API is not included by default, see [Installation](./#installation).
### Structure ### Structure
```json ```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 directory in which you put some static web resource. sing-box will then
serve it at `http://{{external-controller}}/ui`. serve it at `http://{{external-controller}}/ui`.
#### external_ui_download_url #### external_ui_download_url
ZIP download URL for the external UI, will be used if the specified `external_ui` directory is empty. ZIP download URL for the external UI, will be used if the specified `external_ui` directory is empty.

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 "" !!! 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 ```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 ### Listen Fields
See [Listen Fields](/configuration/shared/listen/) for details. See [Listen Fields](/configuration/shared/listen/) for details.

View file

@ -29,10 +29,6 @@
} }
``` ```
!!! warning ""
默认安装不包含被 Hysteria 依赖的 QUIC参阅 [安装](/zh/#_2)。
### 监听字段 ### 监听字段
参阅 [监听字段](/zh/configuration/shared/listen/)。 参阅 [监听字段](/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" !!! warning "Difference from official Hysteria2"
The official program supports an authentication method called **userpass**, The official program supports an authentication method called **userpass**,

View file

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

View file

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

View file

@ -18,10 +18,6 @@
} }
``` ```
!!! warning ""
默认安装不包含 HTTP3 传输层, 参阅 [安装](/zh/#_2)。
### 监听字段 ### 监听字段
参阅 [监听字段](/zh/configuration/shared/listen/)。 参阅 [监听字段](/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 ### Listen Fields
See [Listen Fields](/configuration/shared/listen/) for details. See [Listen Fields](/configuration/shared/listen/) for details.

View file

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

View file

@ -172,7 +172,7 @@ TCP/IP stack.
!!! warning "" !!! 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 #### include_interface

View file

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

View file

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

View file

@ -24,10 +24,6 @@
} }
``` ```
!!! warning ""
默认安装不包含被 Hysteria 依赖的 QUIC参阅 [安装](/zh/#_2)。
### 字段 ### 字段
#### server #### 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" !!! warning "Difference from official Hysteria2"
The official Hysteria2 supports an authentication method called **userpass**, The official Hysteria2 supports an authentication method called **userpass**,

View file

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

View file

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

View file

@ -16,7 +16,7 @@
### 字段 ### 字段
| 类型 | 格式 | | 类型 | 格式 |
|----------------|---------------------------------| |----------------|--------------------------------|
| `direct` | [Direct](./direct/) | | `direct` | [Direct](./direct/) |
| `block` | [Block](./block/) | | `block` | [Block](./block/) |
| `socks` | [SOCKS](./socks/) | | `socks` | [SOCKS](./socks/) |
@ -26,7 +26,6 @@
| `trojan` | [Trojan](./trojan/) | | `trojan` | [Trojan](./trojan/) |
| `wireguard` | [Wireguard](./wireguard/) | | `wireguard` | [Wireguard](./wireguard/) |
| `hysteria` | [Hysteria](./hysteria/) | | `hysteria` | [Hysteria](./hysteria/) |
| `shadowsocksr` | [ShadowsocksR](./shadowsocksr/) |
| `vless` | [VLESS](./vless/) | | `vless` | [VLESS](./vless/) |
| `shadowtls` | [ShadowTLS](./shadowtls/) | | `shadowtls` | [ShadowTLS](./shadowtls/) |
| `tuic` | [TUIC](./tuic/) | | `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 "" !!! 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 ### Fields

View file

@ -18,7 +18,7 @@
!!! info "" !!! 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 ### Fields
#### server #### server

View file

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

View file

@ -24,14 +24,6 @@
} }
``` ```
!!! warning ""
默认安装不包含 WireGuard, 参阅 [安装](/zh/#_2)。
!!! warning ""
默认安装不包含被非特权 WireGuard 需要的 gVisor, 参阅 [安装](/zh/#_2)。
### 字段 ### 字段
#### server #### 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 废弃" !!! failure "已在 sing-box 1.8.0 废弃"
Geosite 已废弃且可能在不久的将来移除,参阅 [迁移指南](/migration/#migrate-geosite-to-rule-sets)。 Geosite 已废弃且可能在不久的将来移除,参阅 [迁移指南](/zh/migration/#geosite)。
匹配 Geosite。 匹配 Geosite。
@ -190,7 +190,7 @@ icon: material/alert-decagram
!!! failure "已在 sing-box 1.8.0 废弃" !!! failure "已在 sing-box 1.8.0 废弃"
GeoIp 已废弃且可能在不久的将来移除,参阅 [迁移指南](/migration/#migrate-geoip-to-rule-sets)。 GeoIP 已废弃且可能在不久的将来移除,参阅 [迁移指南](/zh/migration/#geoip)。
匹配源 GeoIP。 匹配源 GeoIP。
@ -198,7 +198,7 @@ icon: material/alert-decagram
!!! failure "已在 sing-box 1.8.0 废弃" !!! failure "已在 sing-box 1.8.0 废弃"
GeoIp 已废弃且可能在不久的将来移除,参阅 [迁移指南](/migration/#migrate-geoip-to-rule-sets)。 GeoIP 已废弃且可能在不久的将来移除,参阅 [迁移指南](/zh/migration/#geoip)。
匹配 GeoIP。 匹配 GeoIP。

View file

@ -198,10 +198,6 @@ The path to the server private key, in PEM format.
==Client only== ==Client only==
!!! warning ""
uTLS is not included by default, see [Installation](./#installation).
!!! note "" !!! note ""
uTLS is poorly maintained and the effect may be unproven, use at your own risk. uTLS is poorly maintained and the effect may be unproven, use at your own risk.
@ -225,10 +221,6 @@ Chrome fingerprint will be used if empty.
### ECH Fields ### 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 ECH (Encrypted Client Hello) is a TLS extension that allows a client to encrypt the first part of its ClientHello
message. message.
@ -277,10 +269,6 @@ If empty, load from DNS will be attempted.
### ACME Fields ### ACME Fields
!!! warning ""
ACME is not included by default, see [Installation](./#installation).
#### domain #### domain
List of domain. List of domain.
@ -356,14 +344,6 @@ See [DNS01 Challenge Fields](/configuration/shared/dns01_challenge/) for details
### Reality Fields ### 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 #### handshake
==Server only== ==Server only==

View file

@ -190,10 +190,6 @@ TLS 版本值:
==仅客户端== ==仅客户端==
!!! warning ""
默认安装不包含 uTLS, 参阅 [安装](/zh/#_2)。
!!! note "" !!! note ""
uTLS 维护不善且其效果可能未经证实,使用风险自负。 uTLS 维护不善且其效果可能未经证实,使用风险自负。
@ -217,14 +213,9 @@ uTLS 是 "crypto/tls" 的一个分支,它提供了 ClientHello 指纹识别阻
## ECH 字段 ## ECH 字段
!!! warning ""
默认安装不包含 ECH, 参阅 [安装](/zh/#_2)。
ECH (Encrypted Client Hello) 是一个 TLS 扩展,它允许客户端加密其 ClientHello 的第一部分 ECH (Encrypted Client Hello) 是一个 TLS 扩展,它允许客户端加密其 ClientHello 的第一部分
信息。 信息。
ECH 配置和密钥可以通过 `sing-box generate ech-keypair [--pq-signature-schemes-enabled]` 生成。 ECH 配置和密钥可以通过 `sing-box generate ech-keypair [--pq-signature-schemes-enabled]` 生成。
#### pq_signature_schemes_enabled #### pq_signature_schemes_enabled
@ -270,10 +261,6 @@ ECH PEM 配置路径
### ACME 字段 ### ACME 字段
!!! warning ""
默认安装不包含 ACME参阅 [安装](/zh/#_2)。
#### domain #### domain
一组域名。 一组域名。
@ -345,14 +332,6 @@ ACME DNS01 验证字段。如果配置,将禁用其他验证方法。
### Reality 字段 ### Reality 字段
!!! warning ""
默认安装不包含 reality 服务器,参阅 [安装](/zh/#_2)。
!!! warning ""
默认安装不包含被 reality 客户端需要的 uTLS, 参阅 [安装](/zh/#_2)。
#### handshake #### 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" !!! warning "Difference from v2ray-core"
No additional encryption support: No additional encryption support:
@ -155,7 +151,7 @@ It needs to be consistent with the server.
!!! note "" !!! 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 ```json
{ {

View file

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

View file

@ -4,7 +4,37 @@ icon: material/delete-alert
# Deprecated Feature List # Deprecated Feature List
### 1.6.0 ## 1.8.0
#### Cache file and related features in Clash API
`cache_file` and related features in Clash API is migrated to independent `cache_file` options,
check [Migration](/migration/#migrate-cache-file-from-clash-api-to-independent-options).
#### GeoIP
GeoIP is deprecated and may be removed in the future.
The maxmind GeoIP National Database, as an IP classification database,
is not entirely suitable for traffic bypassing,
and all existing implementations suffer from high memory usage and difficult management.
sing-box 1.8.0 introduces [Rule Set](/configuration/rule_set/), which can completely replace GeoIP,
check [Migration](/migration/#migrate-geoip-to-rule-sets).
#### Geosite
Geosite is deprecated and may be removed in the future.
Geosite, the `domain-list-community` project maintained by V2Ray as an early traffic bypassing solution,
suffers from a number of problems, including lack of maintenance, inaccurate rules, and difficult management.
sing-box 1.8.0 introduces [Rule Set](/configuration/rule_set/), which can completely replace Geosite,
check [Migration](/migration/#migrate-geosite-to-rule-sets).
Geosite即由 V2Ray 维护的 domain-list-community 项目,作为早期流量绕过解决方案,存在着大量问题,包括缺少维护、规则不准确、管理困难。
## 1.6.0
The following features will be marked deprecated in 1.5.0 and removed entirely in 1.6.0. The following features will be marked deprecated in 1.5.0 and removed entirely in 1.6.0.

View file

@ -4,7 +4,34 @@ icon: material/delete-alert
# 废弃功能列表 # 废弃功能列表
### 1.6.0 ## 1.8.0
#### Clash API 中的 Cache file 及相关功能
Clash API 中的 `cache_file` 及相关功能已废弃且已迁移到独立的 `cache_file` 设置,
参阅 [迁移指南](/zh/migration/#clash-api)。
#### GeoIP
GeoIP 已废弃且可能在不久的将来移除。
maxmind GeoIP 国家数据库作为 IP 分类数据库,不完全适合流量绕过,
且现有的实现均存在内存使用大与管理困难的问题。
sing-box 1.8.0 引入了[规则集](/configuration/rule_set/)
可以完全替代 GeoIP 参阅 [迁移指南](/zh/migration/#geoip)。
#### Geosite
Geosite 已废弃且可能在不久的将来移除。
Geosite即由 V2Ray 维护的 domain-list-community 项目,作为早期流量绕过解决方案,
存在着包括缺少维护、规则不准确和管理困难内的大量问题。
sing-box 1.8.0 引入了[规则集](/configuration/rule_set/)
可以完全替代 Geosite参阅 [迁移指南](/zh/migration/#geosite)。
## 1.6.0
下列功能已在 1.5.0 中标记为已弃用,并在 1.6.0 中完全删除。 下列功能已在 1.5.0 中标记为已弃用,并在 1.6.0 中完全删除。

View file

@ -23,7 +23,7 @@ You can download and install Go from: https://go.dev/doc/install, latest version
make make
``` ```
Or build and install binary to `GOBIN`: Or build and install binary to `$GOBIN`:
```bash ```bash
make install make install

View file

@ -0,0 +1,63 @@
---
icon: material/file-code
---
# 从源代码构建
## :material-graph: 要求
sing-box 1.4.0 前:
* Go 1.18.5 - 1.20.x
从 sing-box 1.4.0:
* Go 1.18.5 - ~
* Go 1.20.0 - ~ 如果启用构建标记 `with_quic`
您可以从 https://go.dev/doc/install 下载并安装 Go推荐使用最新版本。
## :material-fast-forward: 快速开始
```bash
make
```
或者构建二进制文件并将其安装到 `$GOBIN`
```bash
make install
```
## :material-cog: 自定义构建
```bash
TAGS="tag_a tag_b" make
```
or
```bash
go build -tags "tag_a tag_b" ./cmd/sing-box
```
## :material-folder-settings: 构建标记
| 构建标记 | 默认启动 | 说明 |
|------------------------------------|------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `with_quic` | ✔ | Build with QUIC support, see [QUIC and HTTP3 DNS transports](/configuration/dns/server/), [Naive inbound](/configuration/inbound/naive/), [Hysteria Inbound](/configuration/inbound/hysteria/), [Hysteria Outbound](/configuration/outbound/hysteria/) and [V2Ray Transport#QUIC](/configuration/shared/v2ray-transport#quic). |
| `with_grpc` | ✖️ | Build with standard gRPC support, see [V2Ray Transport#gRPC](/configuration/shared/v2ray-transport#grpc). |
| `with_dhcp` | ✔ | Build with DHCP support, see [DHCP DNS transport](/configuration/dns/server/). |
| `with_wireguard` | ✔ | Build with WireGuard support, see [WireGuard outbound](/configuration/outbound/wireguard/). |
| `with_ech` | ✔ | Build with TLS ECH extension support for TLS outbound, see [TLS](/configuration/shared/tls#ech). |
| `with_utls` | ✔ | Build with [uTLS](https://github.com/refraction-networking/utls) support for TLS outbound, see [TLS](/configuration/shared/tls#utls). |
| `with_reality_server` | ✔ | Build with reality TLS server support, see [TLS](/configuration/shared/tls/). |
| `with_acme` | ✔ | Build with ACME TLS certificate issuer support, see [TLS](/configuration/shared/tls/). |
| `with_clash_api` | ✔ | Build with Clash API support, see [Experimental](/configuration/experimental#clash-api-fields). |
| `with_v2ray_api` | ✖️ | Build with V2Ray API support, see [Experimental](/configuration/experimental#v2ray-api-fields). |
| `with_gvisor` | ✔ | Build with gVisor support, see [Tun inbound](/configuration/inbound/tun#stack) and [WireGuard outbound](/configuration/outbound/wireguard#system_interface). |
| `with_embedded_tor` (CGO required) | ✖️ | Build with embedded Tor support, see [Tor outbound](/configuration/outbound/tor/). |
| `with_lwip` (CGO required) | ✖️ | Build with LWIP Tun stack support, see [Tun inbound](/configuration/inbound/tun#stack). |
除非您确实知道您正在启用什么,否则不建议更改默认构建标签列表。

View file

@ -0,0 +1,31 @@
---
icon: material/docker
---
# Docker
## :material-console: 命令
```bash
docker run -d \
-v /etc/sing-box:/etc/sing-box/ \
--name=sing-box \
--restart=always \
ghcr.io/sagernet/sing-box \
-D /var/lib/sing-box \
-C /etc/sing-box/ run
```
## :material-box-shadow: Compose
```yaml
version: "3.8"
services:
sing-box:
image: ghcr.io/sagernet/sing-box
container_name: sing-box
restart: always
volumes:
- /etc/sing-box:/etc/sing-box/
command: -D /var/lib/sing-box -C /etc/sing-box/ run
```

View file

@ -0,0 +1,90 @@
---
icon: material/package
---
# 包管理器
## :material-download-box: 手动安装
=== ":material-debian: Debian / DEB"
```bash
bash <(curl -fsSL https://sing-box.app/deb-install.sh)
```
=== ":material-redhat: Redhat / RPM"
```bash
bash <(curl -fsSL https://sing-box.app/rpm-install.sh)
```
=== ":simple-archlinux: Archlinux / PKG"
```bash
bash <(curl -fsSL https://sing-box.app/arch-install.sh)
```
## :material-book-lock-open: 托管安装
=== ":material-linux: Linux"
| 类型 | 平台 | 链接 | 命令 | 活跃维护 |
|----------|--------------------|---------------------|------------------------------|------------------|
| AUR | (Linux) Arch Linux | [sing-box][aur] ᴬᵁᴿ | `? -S sing-box` | :material-check: |
| nixpkgs | (Linux) NixOS | [sing-box][nixpkgs] | `nix-env -iA nixos.sing-box` | :material-check: |
| Homebrew | macOS / Linux | [sing-box][brew] | `brew install sing-box` | :material-check: |
| Alpine | (Linux) Alpine | [sing-box][alpine] | `apk add sing-box` | :material-alert: |
=== ":material-apple: macOS"
| 类型 | 平台 | 链接 | 命令 | 活跃维护 |
|----------|---------------|------------------|-------------------------|------------------|
| Homebrew | macOS / Linux | [sing-box][brew] | `brew install sing-box` | :material-check: |
=== ":material-microsoft-windows: Windows"
| 类型 | 平台 | 链接 | 命令 | 活跃维护 |
|------------|---------|--------------------|---------------------------|------------------|
| Scoop | Windows | [sing-box][scoop] | `scoop install sing-box` | :material-check: |
| Chocolatey | Windows | [sing-box][choco] | `choco install sing-box` | :material-check: |
| winget | Windows | [sing-box][winget] | `winget install sing-box` | :material-alert: |
=== ":material-android: Android"
| 类型 | 平台 | 链接 | 命令 | 活跃维护 |
|--------|---------|--------------------|--------------------|------------------|
| Termux | Android | [sing-box][termux] | `pkg add sing-box` | :material-check: |
## :material-book-multiple: 服务管理
对于带有 [systemd][systemd] 的 Linux 系统,通常安装已经包含 sing-box 服务,
您可以使用以下命令管理服务:
| 行动 | 命令 |
|------|-----------------------------------------------|
| 启用 | `sudo systemctl enable sing-box` |
| 禁用 | `sudo systemctl disable sing-box` |
| 启动 | `sudo systemctl start sing-box` |
| 停止 | `sudo systemctl stop sing-box` |
| 强行停止 | `sudo systemctl kill sing-box` |
| 重新启动 | `sudo systemctl restart sing-box` |
| 查看日志 | `sudo journalctl -u sing-box --output cat -e` |
| 实时日志 | `sudo journalctl -u sing-box --output cat -f` |
[alpine]: https://pkgs.alpinelinux.org/packages?name=sing-box
[aur]: https://aur.archlinux.org/packages/sing-box
[nixpkgs]: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/tools/networking/sing-box/default.nix
[termux]: https://github.com/termux/termux-packages/tree/master/packages/sing-box
[brew]: https://formulae.brew.sh/formula/sing-box
[choco]: https://chocolatey.org/packages/sing-box
[scoop]: https://github.com/ScoopInstaller/Main/blob/master/bucket/sing-box.json
[winget]: https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/SagerNet/sing-box
[systemd]: https://systemd.io/

View file

@ -2,8 +2,6 @@
icon: material/arrange-bring-forward icon: material/arrange-bring-forward
--- ---
# Migration
## 1.8.0 ## 1.8.0
!!! warning "Unstable" !!! warning "Unstable"
@ -12,7 +10,7 @@ icon: material/arrange-bring-forward
### :material-close-box: Migrate cache file from Clash API to independent options ### :material-close-box: Migrate cache file from Clash API to independent options
!!! info "Reference" !!! info "References"
[Clash API](/configuration/experimental/clash-api/) / [Clash API](/configuration/experimental/clash-api/) /
[Cache File](/configuration/experimental/cache-file/) [Cache File](/configuration/experimental/cache-file/)
@ -50,7 +48,7 @@ icon: material/arrange-bring-forward
### :material-checkbox-intermediate: Migrate GeoIP to rule sets ### :material-checkbox-intermediate: Migrate GeoIP to rule sets
!!! info "Reference" !!! info "References"
[GeoIP](/configuration/route/geoip/) / [GeoIP](/configuration/route/geoip/) /
[Route](/configuration/route/) / [Route](/configuration/route/) /
@ -135,7 +133,7 @@ icon: material/arrange-bring-forward
### :material-checkbox-intermediate: Migrate Geosite to rule sets ### :material-checkbox-intermediate: Migrate Geosite to rule sets
!!! info "Reference" !!! info "References"
[Geosite](/configuration/route/geosite/) / [Geosite](/configuration/route/geosite/) /
[Route](/configuration/route/) / [Route](/configuration/route/) /

193
docs/migration.zh.md Normal file
View file

@ -0,0 +1,193 @@
---
icon: material/arrange-bring-forward
---
## 1.8.0
!!! warning "不稳定的"
该版本仍在开发中,迁移指南可能将在未来更改。
### :material-close-box: 将缓存文件从 Clash API 迁移到独立选项
!!! info "参考"
[Clash API](/zh/configuration/experimental/clash-api/) /
[Cache File](/zh/configuration/experimental/cache-file/)
=== ":material-card-remove: 弃用的"
```json
{
"experimental": {
"clash_api": {
"cache_file": "cache.db", // 默认值
"cahce_id": "my_profile2",
"store_mode": true,
"store_selected": true,
"store_fakeip": true
}
}
}
```
=== ":material-card-multiple: 新的"
```json
{
"experimental" : {
"cache_file": {
"enabled": true,
"path": "cache.db", // 默认值
"cache_id": "my_profile2",
"store_fakeip": true
}
}
}
```
### :material-checkbox-intermediate: 迁移 GeoIP 到规则集
!!! info "参考"
[GeoIP](/zh/configuration/route/geoip/) /
[路由](/zh/configuration/route/) /
[路由规则](/zh/configuration/route/rule/) /
[DNS 规则](/zh/configuration/dns/rule/) /
[规则集](/zh/configuration/rule-set/)
!!! tip
`sing-box geoip` 命令可以帮助您将自定义 GeoIP 转换为规则集。
=== ":material-card-remove: 弃用的"
```json
{
"route": {
"rules": [
{
"geoip": "private",
"outbound": "direct"
},
{
"geoip": "cn",
"outbound": "direct"
},
{
"source_geoip": "cn",
"outbound": "block"
}
],
"geoip": {
"download_detour": "proxy"
}
}
}
```
=== ":material-card-multiple: 新的"
```json
{
"route": {
"rules": [
{
"ip_is_private": true,
"outbound": "direct"
},
{
"rule_set": "geoip-cn",
"outbound": "direct"
},
{
"rule_set": "geoip-us",
"rule_set_ipcidr_match_source": true,
"outbound": "block"
}
],
"rule_set": [
{
"tag": "geoip-cn",
"type": "remote",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs",
"download_detour": "proxy"
},
{
"tag": "geoip-us",
"type": "remote",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-us.srs",
"download_detour": "proxy"
}
]
},
"experimental": {
"cache_file": {
"enabled": true // required to save Rule Set cache
}
}
}
```
### :material-checkbox-intermediate: 迁移 Geosite 到规则集
!!! info "参考"
[Geosite](/zh/configuration/route/geosite/) /
[路由](/zh/configuration/route/) /
[路由规则](/zh/configuration/route/rule/) /
[DNS 规则](/zh/configuration/dns/rule/) /
[规则集](/zh/configuration/rule-set/)
!!! tip
`sing-box geosite` 命令可以帮助您将自定义 Geosite 转换为规则集。
=== ":material-card-remove: 弃用的"
```json
{
"route": {
"rules": [
{
"geosite": "cn",
"outbound": "direct"
}
],
"geosite": {
"download_detour": "proxy"
}
}
}
```
=== ":material-card-multiple: 新的"
```json
{
"route": {
"rules": [
{
"rule_set": "geosite-cn",
"outbound": "direct"
}
],
"rule_set": [
{
"tag": "geosite-cn",
"type": "remote",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-cn.srs",
"download_detour": "proxy"
}
]
},
"experimental": {
"cache_file": {
"enabled": true // required to save Rule Set cache
}
}
}
```

View file

@ -220,6 +220,7 @@ plugins:
Headless Rule: 无头规则 Headless Rule: 无头规则
Experimental: 实验性 Experimental: 实验性
Cache File: 缓存文件
Shared: 通用 Shared: 通用
Listen Fields: 监听字段 Listen Fields: 监听字段