Skip to content

Commit 591a4fc

Browse files
committed
Initial zh-CN document translation: shared
1 parent 71dac85 commit 591a4fc

16 files changed

+416
-22
lines changed

docs/configuration/dns/index.zh.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# DNS
2+
13
### 结构
24

35
```json

docs/configuration/inbound/http.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
#### tls
3434

35-
TLS configuration, see [TLS inbound structure](/configuration/shared/tls/#inbound-structure).
35+
TLS configuration, see [TLS inbound structure](/configuration/shared/tls/#inbound).
3636

3737
#### users
3838

docs/configuration/inbound/hysteria.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Force enabled on for systems other than Linux and Windows (according to upstream
102102

103103
==Required==
104104

105-
TLS configuration, see [TLS inbound structure](/configuration/shared/tls/#inbound-structure).
105+
TLS configuration, see [TLS inbound structure](/configuration/shared/tls/#inbound).
106106

107107
### Listen Fields
108108

docs/configuration/inbound/naive.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
#### tls
3838

39-
TLS configuration, see [TLS inbound structure](/configuration/shared/tls/#inbound-structure).
39+
TLS configuration, see [TLS inbound structure](/configuration/shared/tls/#inbound).
4040

4141
#### users
4242

docs/configuration/inbound/trojan.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Trojan users.
4040

4141
#### tls
4242

43-
TLS configuration, see [TLS inbound structure](/configuration/shared/tls/#inbound-structure).
43+
TLS configuration, see [TLS inbound structure](/configuration/shared/tls/#inbound).
4444

4545
#### fallback
4646

docs/configuration/inbound/vmess.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ VMess users.
4646

4747
#### tls
4848

49-
TLS configuration, see [TLS inbound structure](/configuration/shared/tls/#inbound-structure).
49+
TLS configuration, see [TLS inbound structure](/configuration/shared/tls/#inbound).
5050

5151
#### transport
5252

docs/configuration/outbound/http.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Basic authorization password.
5353

5454
#### tls
5555

56-
TLS configuration, see [TLS outbound structure](/configuration/shared/tls/#outbound-structure).
56+
TLS configuration, see [TLS outbound structure](/configuration/shared/tls/#outbound).
5757

5858
### Dial Fields
5959

docs/configuration/outbound/hysteria.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Force enabled on for systems other than Linux and Windows (according to upstream
113113

114114
==Required==
115115

116-
TLS configuration, see [TLS outbound structure](/configuration/shared/tls/#outbound-structure).
116+
TLS configuration, see [TLS outbound structure](/configuration/shared/tls/#outbound).
117117

118118
#### network
119119

docs/configuration/outbound/trojan.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Both is enabled by default.
5959

6060
#### tls
6161

62-
TLS configuration, see [TLS outbound structure](/configuration/shared/tls/#outbound-structure).
62+
TLS configuration, see [TLS outbound structure](/configuration/shared/tls/#outbound).
6363

6464
#### multiplex
6565

docs/configuration/outbound/vmess.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Both is enabled by default.
9393

9494
#### tls
9595

96-
TLS configuration, see [TLS outbound structure](/configuration/shared/tls/#outbound-structure).
96+
TLS configuration, see [TLS outbound structure](/configuration/shared/tls/#outbound).
9797

9898
#### multiplex
9999

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
### 服务器要求
2+
3+
`sing-box` :)
4+
5+
### 结构
6+
7+
```json
8+
{
9+
"enabled": true,
10+
"protocol": "smux",
11+
"max_connections": 4,
12+
"min_streams": 4,
13+
"max_streams": 0
14+
}
15+
```
16+
17+
### 字段
18+
19+
#### enabled
20+
21+
启用多路复用
22+
23+
#### protocol
24+
25+
多路复用协议
26+
27+
| 协议 | 描述 |
28+
|-------|------------------------------------|
29+
| smux | https://github.com/xtaci/smux |
30+
| yamux | https://github.com/hashicorp/yamux |
31+
32+
默认使用 SMux.
33+
34+
#### max_connections
35+
36+
最大连接数量
37+
38+
`max_streams` 冲突.
39+
40+
#### min_streams
41+
42+
在打开新连接之前,连接中的最小多路复用流数量
43+
44+
`max_streams` 冲突.
45+
46+
#### max_streams
47+
48+
在打开新连接之前,连接中的最大多路复用流数量
49+
50+
`max_connections``min_streams` 冲突.

docs/configuration/shared/tls.md

+4-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### Inbound Structure
1+
### Inbound
22

33
```json
44
{
@@ -34,7 +34,7 @@
3434

3535
ACME is not included by default, see [Installation](/#installation).
3636

37-
### Outbound Structure
37+
### Outbound
3838

3939
```json
4040
{
@@ -115,20 +115,13 @@ See [Application-Layer Protocol Negotiation](https://en.wikipedia.org/wiki/Appli
115115
The minimum TLS version that is acceptable.
116116

117117
By default, TLS 1.2 is currently used as the minimum when acting as a
118-
client, and TLS 1.0 when acting as a server. TLS 1.0 is the minimum
119-
supported by this package, both as a client and as a server.
120-
121-
The client-side default can temporarily be reverted to TLS 1.0 by
122-
including the value "x509sha1=1" in the GODEBUG environment variable.
123-
Note that this option will be removed in Go 1.19 (but it will still be
124-
possible to set this field to VersionTLS10 explicitly).
118+
client, and TLS 1.0 when acting as a server.
125119

126120
#### max_version
127121

128122
The maximum TLS version that is acceptable.
129123

130-
By default, the maximum version supported by this package is used,
131-
which is currently TLS 1.3.
124+
By default, the maximum version is currently TLS 1.3.
132125

133126
#### cipher_suites
134127

docs/configuration/shared/tls.zh.md

+219
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
### 入站
2+
3+
```json
4+
{
5+
"enabled": true,
6+
"server_name": "",
7+
"alpn": [],
8+
"min_version": "",
9+
"max_version": "",
10+
"cipher_suites": [],
11+
"certificate": "",
12+
"certificate_path": "",
13+
"key": "",
14+
"key_path": "",
15+
"acme": {
16+
"domain": [],
17+
"data_directory": "",
18+
"default_server_name": "",
19+
"email": "",
20+
"provider": "",
21+
"disable_http_challenge": false,
22+
"disable_tls_alpn_challenge": false,
23+
"alternative_http_port": 0,
24+
"alternative_tls_port": 0,
25+
"external_account": {
26+
"key_id": "",
27+
"mac_key": ""
28+
}
29+
}
30+
}
31+
```
32+
33+
!!! warning ""
34+
35+
默认安装不包括 ACME, 参阅 [安装](/zh/#installation).
36+
37+
### 出站
38+
39+
```json
40+
{
41+
"enabled": true,
42+
"server_name": "",
43+
"insecure": false,
44+
"alpn": [],
45+
"min_version": "",
46+
"max_version": "",
47+
"cipher_suites": [],
48+
"certificate": "",
49+
"certificate_path": ""
50+
}
51+
```
52+
53+
TLS 版本值:
54+
55+
* `1.0`
56+
* `1.1`
57+
* `1.2`
58+
* `1.3`
59+
60+
密码套件值:
61+
62+
* `TLS_RSA_WITH_AES_128_CBC_SHA`
63+
* `TLS_RSA_WITH_AES_256_CBC_SHA`
64+
* `TLS_RSA_WITH_AES_128_GCM_SHA256`
65+
* `TLS_RSA_WITH_AES_256_GCM_SHA384`
66+
* `TLS_AES_128_GCM_SHA256`
67+
* `TLS_AES_256_GCM_SHA384`
68+
* `TLS_CHACHA20_POLY1305_SHA256`
69+
* `TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA`
70+
* `TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA`
71+
* `TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA`
72+
* `TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA`
73+
* `TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256`
74+
* `TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384`
75+
* `TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256`
76+
* `TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384`
77+
* `TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256`
78+
* `TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256`
79+
80+
!!! note ""
81+
82+
当内容只有一项时,可以忽略 JSON 数组 [] 标签
83+
84+
### 字段
85+
86+
#### enabled
87+
88+
启用 TLS
89+
90+
#### server_name
91+
92+
用于验证返回证书上的主机名,除非设置不安全。
93+
94+
它还包含在 ClientHello 中以支持虚拟主机,除非它是 IP 地址。
95+
96+
检阅 [Server Name Indication](https://en.wikipedia.org/wiki/Server_Name_Indication).
97+
98+
#### insecure
99+
100+
==仅客户端==
101+
102+
接受任何服务器证书
103+
104+
#### alpn
105+
106+
支持的应用层协议协商列表,按优先顺序排列。
107+
108+
如果两个对等点都支持 ALPN,则选择的协议将是此列表中的一个,如果没有相互支持的协议则连接将失败。
109+
110+
检阅 [Application-Layer Protocol Negotiation](https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation).
111+
112+
#### min_version
113+
114+
可接受的最低 TLS 版本。
115+
116+
默认情况下,当前使用 TLS 1.2 作为客户端的最低要求。作为服务器时使用 TLS 1.0.
117+
118+
#### max_version
119+
120+
可接受的最大 TLS 版本。
121+
122+
默认情况下,当前最高版本为 TLS 1.3。
123+
124+
#### cipher_suites
125+
126+
将在 ECDHE 握手中使用的椭圆曲线,按优先顺序排列。
127+
128+
如果为空,将使用默认值。
129+
130+
客户端将使用第一个首选项作为其在 TLS 1.3 中的密钥共享类型。
131+
这在未来可能会改变。
132+
133+
#### certificate
134+
135+
服务器 PEM 证书
136+
137+
#### certificate_path
138+
139+
服务器 PEM 证书路径
140+
141+
#### key
142+
143+
==仅服务器==
144+
145+
服务器 PEM 私钥
146+
147+
#### key_path
148+
149+
==仅服务器==
150+
151+
服务器 PEM 私钥路径
152+
153+
### ACME 字段
154+
155+
#### domain
156+
157+
一组域名。
158+
159+
如果为空,将禁用 ACME。
160+
161+
#### data_directory
162+
163+
ACME 数据目录。
164+
165+
如果为空,则使用 `$XDG_DATA_HOME/certmagic|$HOME/.local/share/certmagic`
166+
167+
#### default_server_name
168+
169+
如果 ClientHello 的 ServerName 字段为空,则选择证书时要使用的服务器名称。
170+
171+
#### email
172+
173+
创建或选择现有 ACME 服务器帐户时使用的电子邮件地址。
174+
175+
#### provider
176+
177+
要使用的 ACME CA 供应商。
178+
179+
|| 供应商 |
180+
|--------------------|---------------|
181+
| `letsencrypt (默认)` | Let's Encrypt |
182+
| `zerossl` | ZeroSSL |
183+
| `https://...` | 自定义 |
184+
185+
#### disable_http_challenge
186+
187+
禁用所有 HTTP 质询。
188+
189+
#### disable_tls_alpn_challenge
190+
191+
禁用所有 TLS-ALPN 质询。
192+
193+
#### alternative_http_port
194+
195+
用于 ACME HTTP 质询的备用端口;如果非空,将使用此端口而不是 80 来启动 HTTP 质询的侦听器。
196+
197+
#### alternative_tls_port
198+
199+
用于 ACME TLS-ALPN 质询的备用端口; 系统必须将 443 转发到此端口以使质询成功。
200+
201+
### Reload
202+
203+
对于服务器配置,如果修改,证书和密钥将自动重新加载。
204+
205+
#### external_account
206+
207+
EAB(外部帐户绑定)包含将 ACME 帐户绑定或映射到其他已知帐户所需的信息由 CA。
208+
209+
外部帐户绑定“用于将 ACME 帐户与非 ACME 系统中的现有帐户相关联,例如 CA 客户数据库。
210+
211+
为了启用 ACME 帐户绑定,运行 ACME 服务器的 CA 需要向 ACME 客户端提供 MAC 密钥和密钥标识符,使用 ACME 之外的一些机制。 §7.3.4
212+
213+
#### external_account.key_id
214+
215+
密钥标识符
216+
217+
#### external_account.mac_key
218+
219+
MAC 密钥

0 commit comments

Comments
 (0)