mirror of
https://github.com/XTLS/Xray-docs-next.git
synced 2025-04-12 13:30:54 +00:00
Updated HTTPUpgrade docs.
This commit is contained in:
parent
d0a74434f0
commit
1a2b3ebd8f
2 changed files with 17 additions and 4 deletions
docs
|
@ -11,7 +11,7 @@
|
|||
{
|
||||
"acceptProxyProtocol": false,
|
||||
"path": "/",
|
||||
"host": "xray.com"
|
||||
"host": "xray.com",
|
||||
"headers": {
|
||||
"key": "value"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# HttpUpgrade
|
||||
# HTTPUpgrade
|
||||
|
||||
A WebSocket-like transport protocol implementing the HTTP/1.1 upgrade and response, allowing it to be reverse proxied by web servers or CDNs just like WebSocket, but without the need to implement the remaining portions of the WebSocket protocol, yielding better performance.
|
||||
|
||||
|
@ -12,7 +12,10 @@ The `HttpUpgradeObject` corresponds to the `httpupgradeSettings` section under t
|
|||
{
|
||||
"acceptProxyProtocol": false,
|
||||
"path": "/",
|
||||
"host": "xray.com"
|
||||
"host": "xray.com",
|
||||
"headers": {
|
||||
"key": "value"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -30,6 +33,16 @@ When `true`, the downstream must first send PROXY protocol version 1 or 2 after
|
|||
|
||||
HTTP path used by the HTTPUpgrade connection. Defaults to `"/"`.
|
||||
|
||||
If the `path` property include an `ed` query field (e.g. ```/mypath?ed=2560```), "early data" will be used to decrease latency, with the value defining the threshold of the first packet's size. If the size of the first packet exceeds the defined value, "early data" will not be applied. The recommended value is `2560`.
|
||||
|
||||
> `host`: string
|
||||
|
||||
HTTP Host sent by the HTTPUpgrade connection. Empty by default.
|
||||
HTTP Host sent by the HTTPUpgrade connection. Empty by default. If this value is empty on the server, the host header sent by clients will not be validated.
|
||||
|
||||
If the `Host` header has been defined on the server in any way, the server will validate if the `Host` header matches.
|
||||
|
||||
The current priority of the `Host` header sent by clients: ```host``` > ```headers``` > ```address```
|
||||
|
||||
> `headers`: map \{string: string\}
|
||||
|
||||
Customized HTTP headers defined in key-value pairs. Defaults to empty.
|
Loading…
Add table
Reference in a new issue