Update documentation

This commit is contained in:
世界 2023-03-12 23:06:59 +08:00
parent 16788008b6
commit 5cb178ca93
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
2 changed files with 108 additions and 6 deletions

View file

@ -34,7 +34,9 @@ Available transports:
"host": [],
"path": "",
"method": "",
"headers": {}
"headers": {},
"idle_timeout": "15s",
"ping_timeout": "15s"
}
```
@ -66,6 +68,24 @@ Extra headers of HTTP request.
The server will write in response if not empty.
#### idle_timeout
In HTTP2 server:
Specifies the time until idle clients should be closed with a GOAWAY frame. PING frames are not considered as activity.
In HTTP2 client:
Specifies the period of time after which a health check will be performed using a ping frame if no frames have been received on the connection. Please note that a ping response is considered a received frame, so if there is no other traffic on the connection, the health check will be executed every interval. If the value is zero, no health check will be performed.
Zero is used by default.
#### ping_timeout
In HTTP2 client:
Specifies the timeout duration after sending a PING frame, within which a response must be received. If a response to the PING frame is not received within the specified timeout duration, the connection will be closed. The default timeout duration is 15 seconds.
### WebSocket
```json
@ -126,10 +146,41 @@ It needs to be consistent with the server.
```json
{
"type": "grpc",
"service_name": "TunService"
"service_name": "TunService",
"idle_timeout": "15s",
"ping_timeout": "15s",
"permit_without_stream": false
}
```
#### service_name
Service name of gRPC.
Service name of gRPC.
#### idle_timeout
In standard gRPC server/client:
If the transport doesn't see any activity after a duration of this time, it pings the client to check if the connection is still active.
In default gRPC server/client:
It has the same behavior as the corresponding setting in HTTP transport.
#### ping_timeout
In standard gRPC server/client:
The timeout that after performing a keepalive check, the client will wait for activity. If no activity is detected, the connection will be closed.
In default gRPC server/client:
It has the same behavior as the corresponding setting in HTTP transport.
#### permit_without_stream
In standard gRPC client:
If enabled, the client transport sends keepalive pings even with no active connections. If disabled, when there are no active connections, `idle_timeout` and `ping_timeout` will be ignored and no keepalive pings will be sent.
Disabled by default.

View file

@ -33,7 +33,9 @@ V2Ray Transport 是 v2ray 发明的一组私有协议,并污染了其他协议
"host": [],
"path": "",
"method": "",
"headers": {}
"headers": {},
"idle_timeout": "15s",
"ping_timeout": "15s"
}
```
@ -65,6 +67,24 @@ HTTP 请求的额外标头
默认服务器将写入响应。
#### idle_timeout
在 HTTP2 服务器中:
指定闲置客户端应在多长时间内使用 GOAWAY 帧关闭。PING 帧不被视为活动。
在 HTTP2 客户端中:
如果连接上没有收到任何帧,指定一段时间后将使用 PING 帧执行健康检查。需要注意的是PING 响应被视为已接收的帧,因此如果连接上没有其他流量,则健康检查将在每个间隔执行一次。如果值为零,则不会执行健康检查。
默认使用零。
#### ping_timeout
在 HTTP2 客户端中:
指定发送 PING 帧后,在指定的超时时间内必须接收到响应。如果在指定的超时时间内没有收到 PING 帧的响应,则连接将关闭。默认超时持续时间为 15 秒。
### WebSocket
```json
@ -125,10 +145,41 @@ HTTP 请求的额外标头。
```json
{
"type": "grpc",
"service_name": "TunService"
"service_name": "TunService",
"idle_timeout": "15s",
"ping_timeout": "15s",
"permit_without_stream": false
}
```
#### service_name
gRPC 服务名称。
gRPC 服务名称。
#### idle_timeout
在标准 gRPC 服务器/客户端:
如果传输在此时间段后没有看到任何活动,它会向客户端发送 ping 请求以检查连接是否仍然活动。
在默认 gRPC 服务器/客户端:
它的行为与 HTTP 传输层中的相应设置相同。
#### ping_timeout
在标准 gRPC 服务器/客户端:
经过一段时间之后,客户端将执行 keepalive 检查并等待活动。如果没有检测到任何活动,则会关闭连接。
在默认 gRPC 服务器/客户端:
它的行为与 HTTP 传输层中的相应设置相同。
#### permit_without_stream
在标准 gRPC 客户端:
如果启用,客户端传输即使没有活动连接也会发送 keepalive ping。如果禁用则在没有活动连接时将忽略 `idle_timeout``ping_timeout`,并且不会发送 keepalive ping。
默认禁用。