Skip to content

Commit

Permalink
Modify a few small places in mkcp.md transport.md (#444)
Browse files Browse the repository at this point in the history
* Update transport.md 中的 network domainStrategy

整理了`network`: "tcp" | "ws" | "h2" | "grpc" | "quic" | "kcp"
增加一个TIP

Sockopt中的domainStrategy,添加新的值

* Update mkcp.md 中的 dns 伪装类型

之前版本新增功能,补充一下文档
  • Loading branch information
chika0801 authored Jan 2, 2024
1 parent 9b50094 commit c97a00d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
16 changes: 13 additions & 3 deletions docs/config/transport.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,14 @@
}
```

> `network`: "tcp" | "kcp" | "ws" | "http" | "h2" | "quic" | "grpc" | "domainsocket"
> `network`: "tcp" | "ws" | "h2" | "grpc" | "quic" | "kcp"
连接的数据流所使用的传输方式类型,默认值为 `"tcp"`

::: tip
"h2" 可以写成 "http","grpc" 可以写成 "gun","kcp" 可以写成 "mkcp"。
:::

> `security`: "none" | "tls" | "reality"
是否启用传输层加密,支持的选项有
Expand Down Expand Up @@ -562,7 +566,13 @@ OCSP 装订更新,与证书热重载的时间间隔。 单位:秒。默认
设置中的`tproxy` 的值会被设为 `"redirect"`
:::

> `domainStrategy`: "AsIs" | "UseIP" | "UseIPv4" | "UseIPv6"
> `domainStrategy`: "AsIs"<br>
> "UseIP" | "UseIPv6v4" | "UseIPv6" | "UseIPv4v6" | "UseIPv4"<br>
> "ForceIP" | "ForceIPv6v4" | "ForceIPv6" | "ForceIPv4v6" | "ForceIPv4"
Xray-core v1.8.6 新增功能:<br>
`"UseIPv6v4"` | `"UseIPv4v6"`<br>
`"ForceIP"` | `"ForceIPv6v4"` | `"ForceIPv6"` | `"ForceIPv4v6"` | `"ForceIPv4"`

在之前的版本中,当 Xray 尝试使用域名建立系统连接时,域名的解析由系统完成,不受 Xray
控制。这导致了在 [非标准 Linux 环境中无法解析域名](https://github.com/v2ray/v2ray-core/issues/1909) 等问题。为此,Xray 1.3.1 为 Sockopt 引入了 Freedom
Expand Down Expand Up @@ -648,7 +658,7 @@ TCP 空闲时间阈值,单位为秒。当 TCP 连接空闲时间达到这个

> `tcpUserTimeout`: number
单位为毫秒。
单位为毫秒。详细介绍:https://github.com/grpc/proposal/blob/master/A18-tcp-user-timeout.md

> `tcpcongestion`: ""
Expand Down
11 changes: 9 additions & 2 deletions docs/config/transports/mkcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ mKCP 牺牲带宽来降低延迟。传输同样的内容,mKCP 一般比 TCP
"readBufferSize": 1,
"writeBufferSize": 1,
"header": {
"type": "none"
"type": "none",
"domain": "example.com"
},
"seed": "Password"
}
Expand Down Expand Up @@ -106,7 +107,8 @@ mKCP 牺牲带宽来降低延迟。传输同样的内容,mKCP 一般比 TCP

```json
{
"type": "none"
"type": "none",
"domain": "example.com"
}
```

Expand All @@ -120,6 +122,11 @@ mKCP 牺牲带宽来降低延迟。传输同样的内容,mKCP 一般比 TCP
- `"wechat-video"`:伪装成微信视频通话的数据包。
- `"dtls"`:伪装成 DTLS 1.2 数据包。
- `"wireguard"`:伪装成 WireGuard 数据包。(并不是真正的 WireGuard 协议)
- `"dns"`:某些校园网在未登录的情况下允许DNS查询,给KCP添加DNS头,把流量伪装成dns请求,可以绕过某些校园网登录。

> `domain`: string
配合伪装类型 `"dns"` 使用,可随便填一个域名。

## 鸣谢

Expand Down

0 comments on commit c97a00d

Please sign in to comment.