Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nekohasekai committed Dec 3, 2023
1 parent 1108800 commit 26adcd0
Show file tree
Hide file tree
Showing 50 changed files with 765 additions and 386 deletions.
4 changes: 1 addition & 3 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
icon: material/alert-decagram
---

# ChangeLog

#### 1.8.0-alpha.9
#### 1.8.0-alpha.10

* Add `idle_timeout` for URLTest outbound **1**
* Fixes and improvements
Expand Down
4 changes: 2 additions & 2 deletions docs/configuration/dns/rule.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,15 @@ DNS 查询类型。值可以为整数或者类型名称字符串。

!!! failure "已在 sing-box 1.8.0 废弃"

Geosite 已废弃且可能在不久的将来移除,参阅 [迁移指南](/migration/#migrate-geosite-to-rule-sets)。
Geosite 已废弃且可能在不久的将来移除,参阅 [迁移指南](/zh/migration/#geosite)。

匹配 Geosite。

#### source_geoip

!!! failure "已在 sing-box 1.8.0 废弃"

GeoIp 已废弃且可能在不久的将来移除,参阅 [迁移指南](/migration/#migrate-geoip-to-rule-sets)。
GeoIP 已废弃且可能在不久的将来移除,参阅 [迁移指南](/zh/migration/#geoip)。

匹配源 GeoIP。

Expand Down
10 changes: 1 addition & 9 deletions docs/configuration/dns/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down
10 changes: 1 addition & 9 deletions docs/configuration/dns/server.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` | `无错误` |
Expand Down
32 changes: 32 additions & 0 deletions docs/configuration/experimental/cache-file.zh.md
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

缓存文件中的标识符。

如果不为空,配置特定的数据将使用由其键控的单独存储。
9 changes: 1 addition & 8 deletions docs/configuration/experimental/clash-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
112 changes: 112 additions & 0 deletions docs/configuration/experimental/clash-api.zh.md
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。

如果不为空,配置特定的数据将使用由其键控的单独存储。
30 changes: 30 additions & 0 deletions docs/configuration/experimental/index.zh.md
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) |
6 changes: 3 additions & 3 deletions docs/configuration/experimental/v2ray-api.md
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
50 changes: 50 additions & 0 deletions docs/configuration/experimental/v2ray-api.zh.md
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

统计流量的用户列表。
4 changes: 0 additions & 4 deletions docs/configuration/inbound/hysteria.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 0 additions & 4 deletions docs/configuration/inbound/hysteria.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
}
```

!!! warning ""

默认安装不包含被 Hysteria 依赖的 QUIC,参阅 [安装](/zh/#_2)。

### 监听字段

参阅 [监听字段](/zh/configuration/shared/listen/)
Expand Down
4 changes: 0 additions & 4 deletions docs/configuration/inbound/hysteria2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**,
Expand Down
4 changes: 0 additions & 4 deletions docs/configuration/inbound/hysteria2.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
}
```

!!! warning ""

默认安装不包含被 Hysteria2 依赖的 QUIC,参阅 [安装](/zh/#_2)。

!!! warning "与官方 Hysteria2 的区别"

官方程序支持一种名为 **userpass** 的验证方式,
Expand Down
4 changes: 0 additions & 4 deletions docs/configuration/inbound/naive.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading

0 comments on commit 26adcd0

Please sign in to comment.