feat(inbounds): fallbacks
This commit is contained in:
7 files changed
+547
-5
No files matched your search
@@ -47,6 +47,14 @@ Part of the [proxy-suite options reference](./index.md).
|
||||
- [privateKeyFile](#services-proxy-suite-inbounds-listeners-name-amneziawg-privatekeyfile)
|
||||
- [subnet](#services-proxy-suite-inbounds-listeners-name-amneziawg-subnet)
|
||||
- [subnet6](#services-proxy-suite-inbounds-listeners-name-amneziawg-subnet6)
|
||||
- [fallbacks](#services-proxy-suite-inbounds-listeners-name-fallbacks)
|
||||
- item
|
||||
- [alpn](#services-proxy-suite-inbounds-listeners-name-fallbacks-alpn)
|
||||
- [dest](#services-proxy-suite-inbounds-listeners-name-fallbacks-dest)
|
||||
- [listener](#services-proxy-suite-inbounds-listeners-name-fallbacks-listener)
|
||||
- [name](#services-proxy-suite-inbounds-listeners-name-fallbacks-name)
|
||||
- [path](#services-proxy-suite-inbounds-listeners-name-fallbacks-path)
|
||||
- [xver](#services-proxy-suite-inbounds-listeners-name-fallbacks-xver)
|
||||
- [flow](#services-proxy-suite-inbounds-listeners-name-flow)
|
||||
- hysteria
|
||||
- [masquerade](#services-proxy-suite-inbounds-listeners-name-hysteria-masquerade)
|
||||
@@ -752,6 +760,154 @@ null
|
||||
"fd66:66::/64"
|
||||
```
|
||||
|
||||
<a id="services-proxy-suite-inbounds-listeners-name-fallbacks"></a>
|
||||
## services\.proxy-suite\.inbounds\.listeners\.\<name>\.fallbacks
|
||||
|
||||
Where XRay sends connections that are not this listener’s protocol, so several share
|
||||
one port (vless or trojan on the raw transport)\. Matched in order on SNI, ALPN and path;
|
||||
the first entry without any is the catch-all, such as a decoy web server\. Browsers
|
||||
negotiate h2 unless tls\.alpn says otherwise, so a dest that speaks only HTTP/1\.1 needs
|
||||
tls\.alpn = \[ “http/1\.1” ], or an alpn = “h2” entry to one that speaks h2c\.
|
||||
|
||||
*Type:*
|
||||
list of (submodule)
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
[ ]
|
||||
```
|
||||
|
||||
*Example:*
|
||||
|
||||
```nix
|
||||
[
|
||||
{ path = "/ws"; listener = "ws-in"; } # ws-in: vless, ws, address = "127.0.0.1"
|
||||
{ dest = 8080; }
|
||||
]
|
||||
|
||||
```
|
||||
|
||||
<a id="services-proxy-suite-inbounds-listeners-name-fallbacks-alpn"></a>
|
||||
## services\.proxy-suite\.inbounds\.listeners\.\<name>\.fallbacks\.\*\.alpn
|
||||
|
||||
Negotiated ALPN to match\. Null matches any\.
|
||||
|
||||
*Type:*
|
||||
null or one of “h2”, “http/1\.1”
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
null
|
||||
```
|
||||
|
||||
*Example:*
|
||||
|
||||
```nix
|
||||
"h2"
|
||||
```
|
||||
|
||||
<a id="services-proxy-suite-inbounds-listeners-name-fallbacks-dest"></a>
|
||||
## services\.proxy-suite\.inbounds\.listeners\.\<name>\.fallbacks\.\*\.dest
|
||||
|
||||
Where matching connections go: a port, host:port, or a unix socket path\. Exclusive with listener\.
|
||||
|
||||
*Type:*
|
||||
null or 16 bit unsigned integer; between 0 and 65535 (both inclusive) or string
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
null
|
||||
```
|
||||
|
||||
*Example:*
|
||||
|
||||
```nix
|
||||
"127.0.0.1:8080"
|
||||
```
|
||||
|
||||
<a id="services-proxy-suite-inbounds-listeners-name-fallbacks-listener"></a>
|
||||
## services\.proxy-suite\.inbounds\.listeners\.\<name>\.fallbacks\.\*\.listener
|
||||
|
||||
Tag of another listener that matching connections go to, instead of dest\. It must be a
|
||||
vless listener without tls or reality, on a loopback address: it gets the connection
|
||||
decrypted, with the client address in PROXY protocol, and its share links advertise this
|
||||
listener’s port and TLS or REALITY\. Behind REALITY it must be xhttp or grpc, the only
|
||||
transports REALITY clients run besides raw\.
|
||||
|
||||
*Type:*
|
||||
null or string
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
null
|
||||
```
|
||||
|
||||
*Example:*
|
||||
|
||||
```nix
|
||||
"ws-in"
|
||||
```
|
||||
|
||||
<a id="services-proxy-suite-inbounds-listeners-name-fallbacks-name"></a>
|
||||
## services\.proxy-suite\.inbounds\.listeners\.\<name>\.fallbacks\.\*\.name
|
||||
|
||||
SNI to match\. Null matches any\.
|
||||
|
||||
*Type:*
|
||||
null or string
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
null
|
||||
```
|
||||
|
||||
*Example:*
|
||||
|
||||
```nix
|
||||
"www.example.com"
|
||||
```
|
||||
|
||||
<a id="services-proxy-suite-inbounds-listeners-name-fallbacks-path"></a>
|
||||
## services\.proxy-suite\.inbounds\.listeners\.\<name>\.fallbacks\.\*\.path
|
||||
|
||||
Request path to match\. Null matches any\. XRay reads it from HTTP/1\.1 only, so a ` listener `
|
||||
must be on ws or httpupgrade, with this as its transport\.path; xhttp and grpc clients speak h2
|
||||
and go by alpn = “h2” or a catch-all instead\.
|
||||
|
||||
*Type:*
|
||||
null or string
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
null
|
||||
```
|
||||
|
||||
*Example:*
|
||||
|
||||
```nix
|
||||
"/ws"
|
||||
```
|
||||
|
||||
<a id="services-proxy-suite-inbounds-listeners-name-fallbacks-xver"></a>
|
||||
## services\.proxy-suite\.inbounds\.listeners\.\<name>\.fallbacks\.\*\.xver
|
||||
|
||||
PROXY protocol version sent to dest; 0 sends none\. A listener always gets 2\.
|
||||
|
||||
*Type:*
|
||||
one of 0, 1, 2
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
0
|
||||
```
|
||||
|
||||
<a id="services-proxy-suite-inbounds-listeners-name-flow"></a>
|
||||
## services\.proxy-suite\.inbounds\.listeners\.\<name>\.flow
|
||||
|
||||
|
||||
Reference in new issue
Block a user