mirror of
https://github.com/XTLS/Xray-docs-next.git
synced 2025-03-14 04:56:20 +03:00
Sockopt: Add destinationStrategy
This commit is contained in:
parent
f6caba9745
commit
fb5318cb1d
@ -531,6 +531,7 @@ OCSP 装订更新,与证书热重载的时间间隔。 单位:秒。默认
|
||||
"tcpWindowClamp": 600
|
||||
"tcpMptcp": false,
|
||||
"tcpNoDelay": false,
|
||||
"addressPortStrategy": "",
|
||||
"customSockopt": []
|
||||
}
|
||||
```
|
||||
@ -723,6 +724,20 @@ Xray-core v1.8.6 新增参数。<br>
|
||||
|
||||
该选项已被删除,因为 golang 默认启用 TCP no delay。 相反地,如果想要禁用,请通过使用 customSockopt 禁用。
|
||||
|
||||
> `addressPortStrategy`: "none" | "SrvPortOnly" | "SrvAddressOnly" | "SrvPortAndAddress" | "TxtPortOnly" | "TxtAddressOnly" | "TxtPortAndAddress"
|
||||
|
||||
使用 SRV 记录或 TXT 记录指定出站使用的目标地址/端口,默认 `none` 即关闭
|
||||
|
||||
查询直接通过系统DNS而不是Xray的内置DNS, 尝试去查询的域名将会是出站中的域名。如果查询失败请求会按原地址和端口发出
|
||||
|
||||
`Srv` 开头代表查询 SRV 记录(标准格式), `Txt` 开头代表查询 TXT 记录(格式形如 `127.0.0.1:80`)
|
||||
|
||||
`PortOnly` 仅重置端口 `AddressOnly` 仅重置地址 `PortAndAddress` 则重置地址和端口
|
||||
|
||||
该选项生效在 sockopt 里的 domainStrategy 解析之前,地址重置后仍会按 domainStrategy 的规则进行解析(如果有), 但是在 Freedom 的 domainStrategy 之后,如果在其中设置了解析为 IP 则本选项无法生效。
|
||||
|
||||
PS: 如果有正常上网的域名流量被 AsIs 的 freedom 出站送过来,那么在此设置后会尝试解析并重置地址和端口,比如核心会尝试查询 google.com 的 SRV 记录并按记录重置目标。
|
||||
|
||||
> `customSockopt`: []
|
||||
|
||||
一个数组,用于高级用户指定需要的任何 sockopt, 理论上上述所有与连接有关的设置均可以在此等价设置, 自然也可以设置Linux中存在但是核心未添加的其他选项,下方示例等价于核心中的 `"tcpcongestion": "bbr"`
|
||||
|
Loading…
x
Reference in New Issue
Block a user