Loopback outbound: Add sniffing

https://github.com/XTLS/Xray-core/pull/6326
This commit is contained in:
Meow
2026-06-26 01:21:15 +08:00
parent 64a4231978
commit fb95880d75
3 changed files with 42 additions and 27 deletions
+14 -9
View File
@@ -2,6 +2,15 @@
Loopback is a loopback outbound used to send traffic back to routing for further processing without leaving the core.
::: tip Uses
- In places where only an outbound can be specified and `balancerTag` cannot be written directly, Loopback can be used to indirectly use a balancer.<br>
For example, `proxySettings` and `dialerProxy` in chained proxies, and `fallbackTag` in load balancing.
- After traffic has already been routed once, it can be further subdivided based on more conditions.<br>
For example, TCP traffic and UDP traffic routed by the same set of routing rules can be sent to different outbounds.
:::
## OutboundConfigurationObject
`OutboundConfigurationObject` corresponds to the `settings` item in [`OutboundObject`](../outbound.md).
@@ -12,9 +21,10 @@ Loopback is a loopback outbound used to send traffic back to routing for further
{
// ...
"protocol": "loopback",
// [!code focus:3]
// [!code focus:4]
"settings": {
"inboundTag": "TagUseAsInbound"
"inboundTag": "TagUseAsInbound",
"sniffing": {}
}
}
]
@@ -27,11 +37,6 @@ The inbound tag used when re-entering routing.
This tag can be used as `inboundTag` in routing, indicating that data from this outbound will re-enter routing with this tag and be processed again by the corresponding rules.
::: tip Uses
> `sniffing`: [SniffingObject](../inbound.md#sniffingobject)
- In places where only an outbound can be specified and `balancerTag` cannot be written directly, Loopback lets you use a balancer indirectly.<br>
For example, `proxySettings` and `dialerProxy` in chained proxies, and `fallbackTag` in load balancing.
- After traffic has already been routed once, it can be further subdivided using more conditions.<br>
For example, TCP traffic and UDP traffic split by the same set of routing rules can be sent to different outbounds.
:::
Traffic sniffing. The specific configuration is the same as that of [Inbound](../inbound.md#sniffingobject). Disabled by default.