EN Refactor Transports

This commit is contained in:
Meow
2026-05-09 06:47:38 +08:00
parent eeca4a15fb
commit 9c0b0e37dc
19 changed files with 1362 additions and 1253 deletions
+2 -2
View File
@@ -38,7 +38,7 @@ An array containing a series of powerful fallback distribution configurations.
The `fallbacks` item is optional and can only be used with the TCP+TLS transport combination.
- When this item has child elements, [Inbound TLS](../transport.md#tlsobject) must set `"alpn":["http/1.1"]`.
- When this item has child elements, [Inbound TLS](../transports/tls.md#tlsobject) must set `"alpn":["http/1.1"]`.
Usually, you need to first set a default fallback with both `alpn` and `path` omitted or empty, and then configure other traffic splitting as needed.
@@ -56,7 +56,7 @@ Attempts to match the TLS ALPN negotiation result. Empty means any. Default is `
Xray will only attempt to read the TLS ALPN negotiation result when necessary. If successful, it outputs `realAlpn =` to the info log.
Usage: Solves the issue where Nginx's h2c service cannot be compatible with http/1.1 simultaneously. Nginx would require two `listen` lines, for 1.1 and h2c respectively.
Note: When `fallbacks` `alpn` contains `"h2"`, [Inbound TLS](../transport.md#tlsobject) needs to set `"alpn":["h2","http/1.1"]` to support h2 access.
Note: When `fallbacks` `alpn` contains `"h2"`, [Inbound TLS](../transports/tls.md#tlsobject) needs to set `"alpn":["h2","http/1.1"]` to support h2 access.
::: tip
The `alpn` set in Fallback matches the _actually negotiated_ ALPN, whereas the `alpn` set in Inbound TLS is the list of _optional_ ALPNs during the handshake. The meanings are different.