mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-22 08:31:30 +00:00
Initial zh-CN document translation: route
This commit is contained in:
parent
03f457f3d0
commit
ad90ddd327
|
@ -110,7 +110,7 @@
|
|||
|
||||
4 (A DNS 查询) 或 6 (AAAA DNS 查询)。
|
||||
|
||||
留空不限制。
|
||||
为空则不限制。
|
||||
|
||||
#### network
|
||||
|
||||
|
@ -126,7 +126,7 @@
|
|||
|
||||
#### domain
|
||||
|
||||
匹配完整域名。Match user name.
|
||||
匹配完整域名。
|
||||
|
||||
#### domain_suffix
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# 实验性
|
||||
|
||||
### 结构
|
||||
|
||||
```json
|
33
docs/configuration/route/geoip.zh.md
Normal file
33
docs/configuration/route/geoip.zh.md
Normal file
|
@ -0,0 +1,33 @@
|
|||
### 结构
|
||||
|
||||
```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 资源的出站的标签。
|
||||
|
||||
如果为空,则使用默认出站。
|
33
docs/configuration/route/geosite.zh.md
Normal file
33
docs/configuration/route/geosite.zh.md
Normal file
|
@ -0,0 +1,33 @@
|
|||
### 结构
|
||||
|
||||
```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 资源的出站的标签。
|
||||
|
||||
如果为空,则使用默认出站。
|
|
@ -106,7 +106,7 @@
|
|||
|
||||
#### inbound
|
||||
|
||||
Tags of [inbound](../inbound).
|
||||
Tags of [Inbound](/configuration/inbound).
|
||||
|
||||
#### ip_version
|
||||
|
||||
|
|
241
docs/configuration/route/rule.zh.md
Normal file
241
docs/configuration/route/rule.zh.md
Normal file
|
@ -0,0 +1,241 @@
|
|||
### 结构
|
||||
|
||||
```json
|
||||
{
|
||||
"route": {
|
||||
"rules": [
|
||||
{
|
||||
"inbound": [
|
||||
"mixed-in"
|
||||
],
|
||||
"ip_version": 6,
|
||||
"network": "tcp",
|
||||
"auth_user": [
|
||||
"usera",
|
||||
"userb"
|
||||
],
|
||||
"protocol": [
|
||||
"tls",
|
||||
"http",
|
||||
"quic"
|
||||
],
|
||||
"domain": [
|
||||
"test.com"
|
||||
],
|
||||
"domain_suffix": [
|
||||
".cn"
|
||||
],
|
||||
"domain_keyword": [
|
||||
"test"
|
||||
],
|
||||
"domain_regex": [
|
||||
"^stun\\..+"
|
||||
],
|
||||
"geosite": [
|
||||
"cn"
|
||||
],
|
||||
"source_geoip": [
|
||||
"private"
|
||||
],
|
||||
"geoip": [
|
||||
"cn"
|
||||
],
|
||||
"source_ip_cidr": [
|
||||
"10.0.0.0/24"
|
||||
],
|
||||
"ip_cidr": [
|
||||
"10.0.0.0/24"
|
||||
],
|
||||
"source_port": [
|
||||
12345
|
||||
],
|
||||
"source_port_range": [
|
||||
"1000:2000",
|
||||
":3000",
|
||||
"4000:"
|
||||
],
|
||||
"port": [
|
||||
80,
|
||||
443
|
||||
],
|
||||
"port_range": [
|
||||
"1000:2000",
|
||||
":3000",
|
||||
"4000:"
|
||||
],
|
||||
"process_name": [
|
||||
"curl"
|
||||
],
|
||||
"package_name": [
|
||||
"com.termux"
|
||||
],
|
||||
"user": [
|
||||
"sekai"
|
||||
],
|
||||
"user_id": [
|
||||
1000
|
||||
],
|
||||
"invert": false,
|
||||
"outbound": "direct"
|
||||
},
|
||||
{
|
||||
"type": "logical",
|
||||
"mode": "and",
|
||||
"rules": [],
|
||||
"invert": false,
|
||||
"outbound": "direct"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
!!! note ""
|
||||
|
||||
当内容只有一项时,可以忽略 JSON 数组 [] 标签
|
||||
|
||||
### Default Fields
|
||||
|
||||
!!! note ""
|
||||
|
||||
默认规则使用以下匹配逻辑:
|
||||
(`domain` || `domain_suffix` || `domain_keyword` || `domain_regex` || `geosite` || `geoip` || `ip_cidr`) &&
|
||||
(`source_geoip` || `source_ip_cidr`) &&
|
||||
`other fields`
|
||||
|
||||
#### inbound
|
||||
|
||||
[入站](/zh/configuration/inbound) 标签.
|
||||
|
||||
#### ip_version
|
||||
|
||||
4 或 6.
|
||||
|
||||
为空则不限制。
|
||||
|
||||
#### auth_user
|
||||
|
||||
认证用户名,参阅入站设置。
|
||||
|
||||
#### protocol
|
||||
|
||||
探测到的协议, 参阅 [协议探测](/zh/configuration/route/sniff/)。
|
||||
|
||||
#### network
|
||||
|
||||
`tcp` 或 `udp`。
|
||||
|
||||
#### domain
|
||||
|
||||
匹配完整域名。
|
||||
|
||||
#### domain_suffix
|
||||
|
||||
匹配域名后缀。
|
||||
|
||||
#### domain_keyword
|
||||
|
||||
匹配域名关键字。
|
||||
|
||||
#### domain_regex
|
||||
|
||||
匹配域名正则表达式。
|
||||
|
||||
#### geosite
|
||||
|
||||
匹配 GeoSite.
|
||||
|
||||
#### source_geoip
|
||||
|
||||
匹配源 GeoIP。
|
||||
|
||||
#### geoip
|
||||
|
||||
匹配 GeoIP。
|
||||
|
||||
#### source_ip_cidr
|
||||
|
||||
匹配源 IP CIDR。
|
||||
|
||||
#### ip_cidr
|
||||
|
||||
匹配 IP CIDR。
|
||||
|
||||
#### source_port
|
||||
|
||||
匹配源端口。
|
||||
|
||||
#### source_port_range
|
||||
|
||||
匹配源端口范围。
|
||||
|
||||
#### port
|
||||
|
||||
匹配端口。
|
||||
|
||||
#### port_range
|
||||
|
||||
匹配端口范围。
|
||||
|
||||
#### process_name
|
||||
|
||||
!!! error ""
|
||||
|
||||
仅支持 Linux, Windows, 和 macOS.
|
||||
|
||||
匹配进程名称。
|
||||
|
||||
#### package_name
|
||||
|
||||
匹配 Android 应用包名。
|
||||
|
||||
#### user
|
||||
|
||||
!!! error ""
|
||||
|
||||
仅支持 Linux.
|
||||
|
||||
匹配用户名。
|
||||
|
||||
#### user_id
|
||||
|
||||
!!! error ""
|
||||
|
||||
仅支持 Linux.
|
||||
|
||||
匹配用户 ID。
|
||||
|
||||
#### invert
|
||||
|
||||
反选匹配结果。
|
||||
|
||||
#### outbound
|
||||
|
||||
==必须==
|
||||
|
||||
目标出站的标签。
|
||||
|
||||
### 逻辑字段
|
||||
|
||||
#### type
|
||||
|
||||
`logical`
|
||||
|
||||
#### mode
|
||||
|
||||
`and` 或 `or`
|
||||
|
||||
#### rules
|
||||
|
||||
包括的默认规则。
|
||||
|
||||
#### invert
|
||||
|
||||
反选匹配结果。
|
||||
|
||||
#### outbound
|
||||
|
||||
==必须==
|
||||
|
||||
目标出站的标签。
|
11
docs/configuration/route/sniff.zh.md
Normal file
11
docs/configuration/route/sniff.zh.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
如果在入站中启用,则可以嗅探连接的协议和域名(如果存在)。
|
||||
|
||||
#### 支持的协议
|
||||
|
||||
| 网络 | 协议 | 域名 |
|
||||
|:-------:|:----:|:-----------:|
|
||||
| TCP | HTTP | Host |
|
||||
| TCP | TLS | Server Name |
|
||||
| UDP | QUIC | Server Name |
|
||||
| UDP | STUN | / |
|
||||
| TCP/UDP | DNS | / |
|
33
mkdocs.yml
33
mkdocs.yml
|
@ -42,11 +42,23 @@ nav:
|
|||
- configuration/dns/index.md
|
||||
- DNS Server: configuration/dns/server.md
|
||||
- DNS Rule: configuration/dns/rule.md
|
||||
- Route:
|
||||
- configuration/route/index.md
|
||||
- GeoIP: configuration/route/geoip.md
|
||||
- Geosite: configuration/route/geosite.md
|
||||
- Route Rule: configuration/route/rule.md
|
||||
- Protocol Sniff: configuration/route/sniff.md
|
||||
- Experimental:
|
||||
- configuration/experimental/index.md
|
||||
- Shared:
|
||||
- TLS: configuration/shared/tls.md
|
||||
- Multiplex: configuration/shared/multiplex.md
|
||||
- V2Ray Transport: configuration/shared/v2ray-transport.md
|
||||
- Inbound:
|
||||
- configuration/inbound/index.md
|
||||
- Direct: configuration/inbound/direct.md
|
||||
- Mixed: configuration/inbound/mixed.md
|
||||
- Socks: configuration/inbound/socks.md
|
||||
- SOCKS: configuration/inbound/socks.md
|
||||
- HTTP: configuration/inbound/http.md
|
||||
- Shadowsocks: configuration/inbound/shadowsocks.md
|
||||
- VMess: configuration/inbound/vmess.md
|
||||
|
@ -60,7 +72,7 @@ nav:
|
|||
- configuration/outbound/index.md
|
||||
- Direct: configuration/outbound/direct.md
|
||||
- Block: configuration/outbound/block.md
|
||||
- Socks: configuration/outbound/socks.md
|
||||
- SOCKS: configuration/outbound/socks.md
|
||||
- HTTP: configuration/outbound/http.md
|
||||
- Shadowsocks: configuration/outbound/shadowsocks.md
|
||||
- VMess: configuration/outbound/vmess.md
|
||||
|
@ -71,17 +83,6 @@ nav:
|
|||
- SSH: configuration/outbound/ssh.md
|
||||
- DNS: configuration/outbound/dns.md
|
||||
- Selector: configuration/outbound/selector.md
|
||||
- Route:
|
||||
- configuration/route/index.md
|
||||
- GeoIP: configuration/route/geoip.md
|
||||
- Geosite: configuration/route/geosite.md
|
||||
- Route Rule: configuration/route/rule.md
|
||||
- Protocol Sniff: configuration/route/sniff.md
|
||||
- Experimental: configuration/experimental.md
|
||||
- Shared:
|
||||
- TLS: configuration/shared/tls.md
|
||||
- Multiplex: configuration/shared/multiplex.md
|
||||
- V2Ray Transport: configuration/shared/v2ray-transport.md
|
||||
- FAQ:
|
||||
- faq/index.md
|
||||
- Known Issues: faq/known-issues.md
|
||||
|
@ -138,15 +139,15 @@ plugins:
|
|||
Log: 日志
|
||||
DNS Server: DNS 服务器
|
||||
DNS Rule: DNS 规则
|
||||
Inbound: 入站
|
||||
Outbound: 出站
|
||||
Route: 路由
|
||||
Route Rule: 路由规则
|
||||
Protocol Sniff: 协议探测
|
||||
Experimental: 实验性功能
|
||||
Experimental: 实验性
|
||||
Shared: 通用
|
||||
Multiple: 多路复用
|
||||
V2Ray Transport: V2Ray 传输层
|
||||
Inbound: 入站
|
||||
Outbound: 出站
|
||||
FAQ: 常见问题
|
||||
Known Issues: 已知问题
|
||||
Examples: 示例
|
||||
|
|
Loading…
Reference in a new issue