Skip to content

Commit 73092ac

Browse files
authored
Explaining the impact of domainStrategy on happyEyeballs (#778)
1 parent a6c5b19 commit 73092ac

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/config/transport.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -870,14 +870,18 @@ PS: 如果有正常上网的域名流量被 AsIs 的 freedom 出站送过来,
870870

871871
当 type 指定为 int 时需要使用十进制数字。
872872

873-
> `happyEyeballs`: map
873+
> `happyEyeballs`: [HappyEyeballsObject](#happyeyeballsobject)
874874
875-
RFC-8305 实现的 happyEyeballs 仅适用于 TCP, 当目标为域名时对它们竞速并选择第一个成功的返回,当 `domainStrategy` 被设置为 `UseIP`/`ForceIP` (包括它们的v4/v6/v4v6版本,但这会使可用的IP列表被缩减到仅剩v4或v6,不推荐这么用)
875+
RFC-8305 实现的 happyEyeballs,仅适用于 TCP。当目标为域名时对它们竞速并选择第一个成功的返回,仅当 `Sockopt.domainStrategy` 被设置为非 `AsIs` 时生效。
876+
877+
注意:`UseIPv4v6` / `ForceIPv4v6` 会使可用的 IP 列表被缩减到仅剩 IPv4,仅查询失败时才会回退查询 IPv6。不推荐这么用。建议使用 UseIP / ForceIP 配合 `HappyEyeballs.interleave`
876878

877879
::: warning
878880
使用这个功能时不要使用 `Freedom` 出站的 `domainStrategy`, 这会导致 `Sockopt` 只能看到被替换完毕的 IP.
879881
:::
880882

883+
#### HappyEyeballsObject
884+
881885
```json
882886
"happyEyeballs": {
883887
"tryDelayMs": 250,

0 commit comments

Comments
 (0)