[GH-ISSUE #6664] [Bug]: Outbound IP Leak and Routing Protocol Issues #4452

Closed
opened 2026-10-31 20:39:45 +07:00 by bsakaguchi · 6 comments
Owner

Originally created by @barbod1123-bit on GitHub (Sep 27, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6664

Describe the bug

I found two issues related to the Outbound and Routing sections:

  1. When I add WARP or Psiphon as an Outbound, my main server's IP address is still leaked. I tested the connection on https://browserleaks.com/webrtc and the original server IP is visible.

  2. In the Routing section, the Outbound protocol must be set to TCP. When it is set to Any or UDP, Google does not open properly. TCP works normally.

I tested both issues on multiple different servers, and the same problems occurred, so it appears to be related to the panel.

Image

How to reproduce the problem

  1. Add WARP or Psiphon as an Outbound.
  2. Route the traffic through the configured Outbound.
  3. Open https://browserleaks.com/webrtc and check the detected IP addresses.
  4. The main server's IP is still visible.

For the second issue:

  1. Create a routing rule using the Outbound.
  2. Set the Outbound protocol to TCP and verify that Google works.
  3. Change the protocol to Any or UDP.
  4. Google no longer opens properly.
  5. The same behavior can be reproduced on multiple servers.

Expected behavior

No response

Actual behavior

No response

Relevant logs


Screenshots

No response

3x-ui version

3.8.5

Xray-core version

No response

How did you install 3x-ui?

install.sh script

Operating system

Ubuntu 22

Which parts of the panel are affected?

No response

Browser (only if it is a UI bug)

No response

Is the panel behind a reverse proxy or CDN?

None

Before submitting

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
Originally created by @barbod1123-bit on GitHub (Sep 27, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6664 ### Describe the bug I found two issues related to the Outbound and Routing sections: 1. When I add WARP or Psiphon as an Outbound, my main server's IP address is still leaked. I tested the connection on https://browserleaks.com/webrtc and the original server IP is visible. 2. In the Routing section, the Outbound protocol must be set to TCP. When it is set to Any or UDP, Google does not open properly. TCP works normally. I tested both issues on multiple different servers, and the same problems occurred, so it appears to be related to the panel. <img width="1079" height="1893" alt="Image" src="https://github.com/user-attachments/assets/92a2dbb6-2d28-4e4a-808c-038927f8b772" /> ### How to reproduce the problem 1. Add WARP or Psiphon as an Outbound. 2. Route the traffic through the configured Outbound. 3. Open https://browserleaks.com/webrtc and check the detected IP addresses. 4. The main server's IP is still visible. For the second issue: 1. Create a routing rule using the Outbound. 2. Set the Outbound protocol to TCP and verify that Google works. 3. Change the protocol to Any or UDP. 4. Google no longer opens properly. 5. The same behavior can be reproduced on multiple servers. ### Expected behavior _No response_ ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.8.5 ### Xray-core version _No response_ ### How did you install 3x-ui? install.sh script ### Operating system Ubuntu 22 ### Which parts of the panel are affected? _No response_ ### Browser (only if it is a UI bug) _No response_ ### Is the panel behind a reverse proxy or CDN? None ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
bsakaguchi 2026-10-31 20:39:45 +07:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@github-actions[bot] commented on GitHub (Sep 27, 2026):

The IP leak (issue 1) looks like a result of the routing rule, not a panel bug. With the rule's Network set to tcp, only TCP goes through WARP/Psiphon. All UDP falls through to the default direct outbound and leaves from your server's own IP. The WebRTC test on browserleaks uses STUN, which runs over UDP, so it sees the server IP. Issue 2 (Google breaking when UDP is sent through the outbound) is the real problem. I can't find its cause without your Xray log.

Why the leak happens

  • The "protocol" dropdown you changed is the routing rule's network match field. The panel offers const NETWORKS = ['', 'tcp', 'udp', 'tcp,udp']; (frontend/src/pages/xray/routing/RuleFormModal.tsx:62) and copies it into the Xray rule unchanged (network: v.network,, line 144). It only decides which connections the rule catches. It does not change how the outbound carries them.
  • Traffic that matches no rule goes to the first outbound. In the default template that is "protocol": "freedom" … "tag": "direct" (internal/web/service/config.json:31-39).
  • So a tcp-only rule sends UDP (STUN, QUIC, DNS over UDP) out directly. The panel can't send UDP through WARP while also keeping UDP out of it.

Why Google may break when UDP goes through the outbound (not confirmed)

With udp or tcp,udp, Chrome reaches Google over QUIC (UDP 443) through the outbound. Two likely causes:

  • Psiphon: the panel has no Psiphon integration (no source file mentions it), so this is a SOCKS/HTTP outbound you added pointing at a local Psiphon client. A proxy that can't relay UDP drops QUIC. That Psiphon's local proxy has no UDP support is my assumption, not something in this repository.
  • WARP: the panel-generated WARP outbound is WireGuard with mtu: 1420, domainStrategy: 'ForceIPv4v6' and noKernelTun: true (frontend/src/pages/xray/overrides/WarpModal.tsx:133-151). WireGuard carries UDP, so a failure here needs the log to explain.

Workarounds you can try now

  1. Keep the rule on tcp,udp (or empty = any) so no UDP leaks. Then add a rule above it with Network udp, Port 443 and outbound blocked. Chrome then falls back from QUIC to TCP, and Google should load again.
  2. Or keep your tcp rule and add a second rule for udp → blocked. UDP is then dropped instead of leaking.

To settle issue 2, please reply with:

  1. Is Google broken through WARP, Psiphon, or both? For Psiphon, paste the outbound JSON (protocol, address and port) with secrets redacted.
  2. The Xray log lines (Xray Configs → log level debug, or x-ui log) from loading google.com with the rule set to tcp,udp.
  3. Your Xray-core version, which the form left empty.

I couldn't read the attached image. Please paste its contents as text if it matters.

Verdict: Not a bug (user configuration) for the leak; issue 2 is Insufficient information
Severity: N/A
Confidence: Medium
Root cause: No panel defect found. The network: tcp rule (RuleFormModal.tsx:144) sends all UDP to the default direct freedom outbound (config.json:31-39), and WebRTC/STUN uses UDP. I found no panel-side cause for the UDP-through-outbound failure.
Already fixed: Not applicable
Duplicate of: Related: #3026 (WebRTC leak caused by routing-rule selection)
Evidence: RuleFormModal.tsx:62 NETWORKS list; RuleFormModal.tsx:144 passes network through unchanged; config.json:31-39 first outbound is direct; WarpModal.tsx:133-151 WARP outbound shape
Not determined: Why UDP/QUIC through WARP or Psiphon breaks Google. The Xray debug log for that request would settle it.

This reply was generated automatically; a maintainer may follow up.

<!-- gh-comment-id:5853569761 --> @github-actions[bot] commented on GitHub (Sep 27, 2026): The IP leak (issue 1) looks like a result of the routing rule, not a panel bug. With the rule's **Network** set to `tcp`, only TCP goes through WARP/Psiphon. All UDP falls through to the default `direct` outbound and leaves from your server's own IP. The WebRTC test on browserleaks uses STUN, which runs over UDP, so it sees the server IP. Issue 2 (Google breaking when UDP is sent through the outbound) is the real problem. I can't find its cause without your Xray log. **Why the leak happens** - The "protocol" dropdown you changed is the routing rule's `network` match field. The panel offers `const NETWORKS = ['', 'tcp', 'udp', 'tcp,udp'];` (`frontend/src/pages/xray/routing/RuleFormModal.tsx:62`) and copies it into the Xray rule unchanged (`network: v.network,`, line 144). It only decides which connections the rule catches. It does not change how the outbound carries them. - Traffic that matches no rule goes to the first outbound. In the default template that is `"protocol": "freedom"` … `"tag": "direct"` (`internal/web/service/config.json:31-39`). - So a `tcp`-only rule sends UDP (STUN, QUIC, DNS over UDP) out directly. The panel can't send UDP through WARP while also keeping UDP out of it. **Why Google may break when UDP goes through the outbound (not confirmed)** With `udp` or `tcp,udp`, Chrome reaches Google over QUIC (UDP 443) through the outbound. Two likely causes: - **Psiphon:** the panel has no Psiphon integration (no source file mentions it), so this is a SOCKS/HTTP outbound you added pointing at a local Psiphon client. A proxy that can't relay UDP drops QUIC. That Psiphon's local proxy has no UDP support is my assumption, not something in this repository. - **WARP:** the panel-generated WARP outbound is WireGuard with `mtu: 1420`, `domainStrategy: 'ForceIPv4v6'` and `noKernelTun: true` (`frontend/src/pages/xray/overrides/WarpModal.tsx:133-151`). WireGuard carries UDP, so a failure here needs the log to explain. **Workarounds you can try now** 1. Keep the rule on `tcp,udp` (or empty = any) so no UDP leaks. Then add a rule **above** it with Network `udp`, Port `443` and outbound `blocked`. Chrome then falls back from QUIC to TCP, and Google should load again. 2. Or keep your `tcp` rule and add a second rule for `udp` → `blocked`. UDP is then dropped instead of leaking. **To settle issue 2, please reply with:** 1. Is Google broken through **WARP**, **Psiphon**, or both? For Psiphon, paste the outbound JSON (protocol, address and port) with secrets redacted. 2. The Xray log lines (Xray Configs → log level `debug`, or `x-ui log`) from loading google.com with the rule set to `tcp,udp`. 3. Your Xray-core version, which the form left empty. I couldn't read the attached image. Please paste its contents as text if it matters. Verdict: Not a bug (user configuration) for the leak; issue 2 is Insufficient information Severity: N/A Confidence: Medium Root cause: No panel defect found. The `network: tcp` rule (`RuleFormModal.tsx:144`) sends all UDP to the default `direct` freedom outbound (`config.json:31-39`), and WebRTC/STUN uses UDP. I found no panel-side cause for the UDP-through-outbound failure. Already fixed: Not applicable Duplicate of: Related: #3026 (WebRTC leak caused by routing-rule selection) Evidence: `RuleFormModal.tsx:62` NETWORKS list; `RuleFormModal.tsx:144` passes `network` through unchanged; `config.json:31-39` first outbound is `direct`; `WarpModal.tsx:133-151` WARP outbound shape Not determined: Why UDP/QUIC through WARP or Psiphon breaks Google. The Xray debug log for that request would settle it. *This reply was generated automatically; a maintainer may follow up.* <!-- claude-issue:analyst -->
Author
Owner

@barbod1123-bit commented on GitHub (Sep 27, 2026):

The main issue I am reporting is the IP leak itself.

Even when I configure WARP as the Outbound and set the routing rule's Network to Any, the original IP address of my main server is still leaked on https://browserleaks.com/webrtc.

My Xray-core version is 26.9.9.

This issue did not occur in older versions of 3x-ui. I have noticed it in the last 2–3 versions of the panel.

I also tested this with different Outbounds, and the same issue occurs. Regardless of which Outbound I add, when I check the connection on BrowserLeaks WebRTC, the original IP address of the main server is still exposed.

So my issue is not limited to a TCP-only routing rule. The IP is still leaked even when the rule is set to Any and the traffic is supposed to use the configured Outbound.

<!-- gh-comment-id:5853624420 --> @barbod1123-bit commented on GitHub (Sep 27, 2026): The main issue I am reporting is the IP leak itself. Even when I configure WARP as the Outbound and set the routing rule's Network to Any, the original IP address of my main server is still leaked on https://browserleaks.com/webrtc. My Xray-core version is 26.9.9. This issue did not occur in older versions of 3x-ui. I have noticed it in the last 2–3 versions of the panel. I also tested this with different Outbounds, and the same issue occurs. Regardless of which Outbound I add, when I check the connection on BrowserLeaks WebRTC, the original IP address of the main server is still exposed. So my issue is not limited to a TCP-only routing rule. The IP is still leaked even when the rule is set to Any and the traffic is supposed to use the configured Outbound.
Author
Owner

@github-actions[bot] commented on GitHub (Sep 27, 2026):

Thanks, that narrows it down to the leak itself. I still can't find a panel-side cause, and nothing in the source explains UDP bypassing a rule that has Network set to Any. The next step is to ask your running Xray which outbound it picks for WebRTC's UDP traffic. That answer will show whether this is a routing-rule problem or something the panel generates.

What I checked on the current code

  • Setting Network to Any (the empty option) doesn't add a "match everything" condition. It removes the network key from the rule: if (v === '') continue; (frontend/src/pages/xray/routing/RuleFormModal.tsx:164). The rule then matches only on its other fields (domain, IP, port, inbound, user). So a rule built only from domains or geosite: entries never catches STUN, because STUN connects to a raw IP. That traffic falls through to the first outbound, direct (internal/web/service/config.json:31-39), and leaves from the server's own IP.
  • The panel does add routing rules of its own at config-generation time, but none of them can catch a client's public UDP traffic. They match the panel/node/MTProto loopback inbounds (internal/web/service/xray.go:488-502, 577-627, 702-712), private-IP DNS on the direct outbound (xray_setting_dns_routing.go:383-389), or AmneziaWG IPv6 peers.
  • Among the routing and WARP changes between v3.6.0 and v3.8.5 (git log v3.6.0..v3.8.5 on those files), none changes how client UDP is routed.

Please reply with:

  1. Route Tester result. Go to Xray Configs → Routing Rules → Route Tester. Enter Domain or IP stun.l.google.com, Port 19302, set Network to UDP, and pick the inbound your client connects to. Then press Test Route. Paste the "Matched outbound" line, or say whether it shows "No routing rule matched". The tester asks the live Xray instance (internal/xray/api.go:319-329) and sends no traffic.
  2. Your routing and outbounds JSON from Xray Configs → Advanced, with keys and addresses redacted. This shows exactly which fields your WARP rule matches on.
  3. Which IP browserleaks shows: the VPS's public IP, or the public IP of the device you're testing from? These have different causes. If it's the device's own IP, the client app is probably in proxy mode rather than TUN mode, so the browser's WebRTC traffic never reaches Xray at all.
  4. The last 3x-ui version that did not leak for you. You wrote "the last 2–3 versions". An exact version would let the changes between the two releases be compared directly.

Verdict: Insufficient information
Severity: N/A
Confidence: Medium
Root cause: Not established. No panel code routes client UDP around a user rule. The likely explanation, not yet confirmed, is a rule whose remaining matchers (domain/geosite) can't match STUN's raw-IP UDP, so it falls through to the first outbound, direct.
Already fixed: Not applicable
Duplicate of: Related: #3026 (WebRTC leak caused by which fields a routing rule matches)
Evidence: RuleFormModal.tsx:164 drops an empty network; config.json:31-39 first outbound is direct; the panel-injected rules in xray.go:488-502, 577-627, 702-712 all key on loopback inboundTag; xray_setting_dns_routing.go:383-389 covers private DNS IPs only
Not determined: Which outbound the live core chooses for UDP to a STUN server. The Route Tester result in item 1 would settle it.

This reply was generated automatically; a maintainer may follow up.

<!-- gh-comment-id:5853638176 --> @github-actions[bot] commented on GitHub (Sep 27, 2026): Thanks, that narrows it down to the leak itself. I still can't find a panel-side cause, and nothing in the source explains UDP bypassing a rule that has **Network** set to Any. The next step is to ask your running Xray which outbound it picks for WebRTC's UDP traffic. That answer will show whether this is a routing-rule problem or something the panel generates. **What I checked on the current code** - Setting Network to Any (the empty option) doesn't add a "match everything" condition. It removes the `network` key from the rule: `if (v === '') continue;` (`frontend/src/pages/xray/routing/RuleFormModal.tsx:164`). The rule then matches only on its other fields (domain, IP, port, inbound, user). So a rule built only from domains or `geosite:` entries never catches STUN, because STUN connects to a raw IP. That traffic falls through to the first outbound, `direct` (`internal/web/service/config.json:31-39`), and leaves from the server's own IP. - The panel does add routing rules of its own at config-generation time, but none of them can catch a client's public UDP traffic. They match the panel/node/MTProto loopback inbounds (`internal/web/service/xray.go:488-502`, `577-627`, `702-712`), private-IP DNS on the `direct` outbound (`xray_setting_dns_routing.go:383-389`), or AmneziaWG IPv6 peers. - Among the routing and WARP changes between v3.6.0 and v3.8.5 (`git log v3.6.0..v3.8.5` on those files), none changes how client UDP is routed. **Please reply with:** 1. **Route Tester result.** Go to Xray Configs → Routing Rules → **Route Tester**. Enter Domain or IP `stun.l.google.com`, Port `19302`, set Network to **UDP**, and pick the inbound your client connects to. Then press **Test Route**. Paste the "Matched outbound" line, or say whether it shows "No routing rule matched". The tester asks the live Xray instance (`internal/xray/api.go:319-329`) and sends no traffic. 2. **Your `routing` and `outbounds` JSON** from Xray Configs → Advanced, with keys and addresses redacted. This shows exactly which fields your WARP rule matches on. 3. **Which IP browserleaks shows**: the VPS's public IP, or the public IP of the device you're testing from? These have different causes. If it's the device's own IP, the client app is probably in proxy mode rather than TUN mode, so the browser's WebRTC traffic never reaches Xray at all. 4. **The last 3x-ui version that did *not* leak** for you. You wrote "the last 2–3 versions". An exact version would let the changes between the two releases be compared directly. Verdict: Insufficient information Severity: N/A Confidence: Medium Root cause: Not established. No panel code routes client UDP around a user rule. The likely explanation, not yet confirmed, is a rule whose remaining matchers (domain/geosite) can't match STUN's raw-IP UDP, so it falls through to the first outbound, `direct`. Already fixed: Not applicable Duplicate of: Related: #3026 (WebRTC leak caused by which fields a routing rule matches) Evidence: `RuleFormModal.tsx:164` drops an empty `network`; `config.json:31-39` first outbound is `direct`; the panel-injected rules in `xray.go:488-502`, `577-627`, `702-712` all key on loopback `inboundTag`; `xray_setting_dns_routing.go:383-389` covers private DNS IPs only Not determined: Which outbound the live core chooses for UDP to a STUN server. The Route Tester result in item 1 would settle it. *This reply was generated automatically; a maintainer may follow up.* <!-- claude-issue:analyst -->
Author
Owner

@barbod1123-bit commented on GitHub (Sep 27, 2026):

I ran the test you requested in:

Xray Configs → Routing Rules → Route Tester

I tested:

  • Domain/IP: "stun.l.google.com"
  • Port: "19302"
  • Network: "UDP"
  • Inbound: my client inbound

The result is shown in the Route Tester, but my Outbound does not appear as the matched outbound. The Outbound JSON I am testing is:

{
"protocol": "socks",
"settings": {
"servers": [
{
"address": "127.0.0.1",
"port": 1085,
"users": []
}
]
},
"tag": "Test"
}

Unfortunately, I don't remember exactly which 3x-ui version did not have this issue. However, I am certain that previously, when using WARP as an Outbound, my server's IP was not leaked.

Also, the IP shown by BrowserLeaks is the public IP address of my main VPS/server, not the public IP address of the device I am testing from.

The issue can be reproduced when checking the connection on:
https://browserleaks.com/webrtc

The main server's IP is exposed even when using WARP as the Outbound.

<!-- gh-comment-id:5853783780 --> @barbod1123-bit commented on GitHub (Sep 27, 2026): I ran the test you requested in: Xray Configs → Routing Rules → Route Tester I tested: - Domain/IP: "stun.l.google.com" - Port: "19302" - Network: "UDP" - Inbound: my client inbound The result is shown in the Route Tester, but my Outbound does not appear as the matched outbound. The Outbound JSON I am testing is: { "protocol": "socks", "settings": { "servers": [ { "address": "127.0.0.1", "port": 1085, "users": [] } ] }, "tag": "Test" } Unfortunately, I don't remember exactly which 3x-ui version did not have this issue. However, I am certain that previously, when using WARP as an Outbound, my server's IP was not leaked. Also, the IP shown by BrowserLeaks is the public IP address of my main VPS/server, not the public IP address of the device I am testing from. The issue can be reproduced when checking the connection on: https://browserleaks.com/webrtc The main server's IP is exposed even when using WARP as the Outbound.
Author
Owner

@github-actions[bot] commented on GitHub (Sep 27, 2026):

Your Route Tester result explains the leak: Xray itself does not send UDP to stun.l.google.com:19302 through your Test outbound. None of your routing rules match that connection, so it goes out another way (another rule's outbound, or the default first outbound direct), from the server's own IP. That is WebRTC's STUN request, and it is the IP browserleaks shows. The fix is in the routing rule, not in the panel, so I'm closing this as a configuration issue.

Why this is the routing rule and not the panel

  • The Route Tester doesn't guess. It asks the running Xray core's router which outbound it would pick (TestRoute in internal/xray/api.go:343, "without sending any traffic"). If the core says the connection doesn't go to Test, then no rule in the running config sends it there.
  • The panel copies your rule into the Xray config field by field (domain, ip, port, network, inboundTag, … in frontend/src/pages/xray/routing/RuleFormModal.tsx:135-151). Only empty fields are dropped (if (v === '') continue;, line 164). It doesn't narrow or rewrite what a rule matches.
  • A rule matches only if all of its fields match. Setting Network to Any adds no "match everything" condition. If the rule also lists domains, geosite: entries or IPs, WebRTC/STUN traffic to a raw IP won't match it. Xray checks rules top to bottom and uses the first match.

How to route all of a client inbound's traffic, UDP included, through the outbound

  1. In Xray Configs → Routing Rules, add a rule and move it to the top. Set only Inbound Tags = your client inbound (tags look like inbound-443), Network = tcp,udp, Outbound = Test (or your WARP outbound). Leave domain, IP and port empty. In JSON it looks like this:
    {
      "type": "field",
      "inboundTag": ["inbound-443"],
      "network": "tcp,udp",
      "outboundTag": "Test"
    }
    
  2. Save, restart Xray, then run the Route Tester again with the same input. Matched outbound should now show Test.
  3. Your Test outbound is SOCKS to 127.0.0.1:1085. UDP only works through it if the local proxy on port 1085 supports SOCKS5 UDP ASSOCIATE. If it doesn't, UDP (and so QUIC to Google) will fail through it. In that case, add a rule above it with Network udp → outbound blocked: WebRTC then can't leak, and Chrome falls back to TCP for Google. That the proxy on 1085 has no UDP support is my guess, not something I can check from this repository.

If the Route Tester still does not show your outbound after step 1, reopen with the routing section of Xray Configs → Advanced (secrets redacted) and the tester's exact "Matched outbound" text. That would point to a real defect.

Verdict: Not a bug (user configuration)
Severity: N/A
Confidence: Medium
Root cause: No panel defect. The live core's router (Route Tester, internal/xray/api.go:343) does not match UDP to the STUN server against the reporter's rule, so it leaves through a non-proxy outbound. The panel copies rule fields unchanged (RuleFormModal.tsx:135-167).
Already fixed: Not applicable
Duplicate of: Related: #3026 (WebRTC leak caused by which fields a routing rule matches)
Evidence: Reporter's Route Tester run: stun.l.google.com:19302/udp on their client inbound does not match outbound Test. RuleFormModal.tsx:135-151 builds the rule from form fields verbatim; :164 drops only empty values; internal/web/service/config.json:31-39 default first outbound is freedom/direct.
Not determined: The reporter's exact rule JSON, so which field keeps it from matching is inferred. It does not change the verdict, because the core's own decision is what the tester reports.

This reply was generated automatically; a maintainer may follow up.

<!-- gh-comment-id:5853797547 --> @github-actions[bot] commented on GitHub (Sep 27, 2026): Your Route Tester result explains the leak: Xray itself does not send UDP to `stun.l.google.com:19302` through your `Test` outbound. None of your routing rules match that connection, so it goes out another way (another rule's outbound, or the default first outbound `direct`), from the server's own IP. That is WebRTC's STUN request, and it is the IP browserleaks shows. The fix is in the routing rule, not in the panel, so I'm closing this as a configuration issue. **Why this is the routing rule and not the panel** - The Route Tester doesn't guess. It asks the running Xray core's router which outbound it would pick (`TestRoute` in `internal/xray/api.go:343`, "without sending any traffic"). If the core says the connection doesn't go to `Test`, then no rule in the running config sends it there. - The panel copies your rule into the Xray config field by field (`domain`, `ip`, `port`, `network`, `inboundTag`, … in `frontend/src/pages/xray/routing/RuleFormModal.tsx:135-151`). Only empty fields are dropped (`if (v === '') continue;`, line 164). It doesn't narrow or rewrite what a rule matches. - A rule matches only if **all** of its fields match. Setting Network to Any adds no "match everything" condition. If the rule also lists domains, `geosite:` entries or IPs, WebRTC/STUN traffic to a raw IP won't match it. Xray checks rules top to bottom and uses the first match. **How to route all of a client inbound's traffic, UDP included, through the outbound** 1. In Xray Configs → Routing Rules, add a rule and move it to the **top**. Set only **Inbound Tags** = your client inbound (tags look like `inbound-443`), **Network** = `tcp,udp`, **Outbound** = `Test` (or your WARP outbound). Leave domain, IP and port empty. In JSON it looks like this: ```json { "type": "field", "inboundTag": ["inbound-443"], "network": "tcp,udp", "outboundTag": "Test" } ``` 2. Save, restart Xray, then run the Route Tester again with the same input. **Matched outbound** should now show `Test`. 3. Your `Test` outbound is SOCKS to `127.0.0.1:1085`. UDP only works through it if the local proxy on port 1085 supports SOCKS5 UDP ASSOCIATE. If it doesn't, UDP (and so QUIC to Google) will fail through it. In that case, add a rule **above** it with Network `udp` → outbound `blocked`: WebRTC then can't leak, and Chrome falls back to TCP for Google. That the proxy on 1085 has no UDP support is my guess, not something I can check from this repository. If the Route Tester still does **not** show your outbound after step 1, reopen with the `routing` section of Xray Configs → Advanced (secrets redacted) and the tester's exact "Matched outbound" text. That would point to a real defect. Verdict: Not a bug (user configuration) Severity: N/A Confidence: Medium Root cause: No panel defect. The live core's router (Route Tester, `internal/xray/api.go:343`) does not match UDP to the STUN server against the reporter's rule, so it leaves through a non-proxy outbound. The panel copies rule fields unchanged (`RuleFormModal.tsx:135-167`). Already fixed: Not applicable Duplicate of: Related: #3026 (WebRTC leak caused by which fields a routing rule matches) Evidence: Reporter's Route Tester run: `stun.l.google.com:19302/udp` on their client inbound does not match outbound `Test`. `RuleFormModal.tsx:135-151` builds the rule from form fields verbatim; `:164` drops only empty values; `internal/web/service/config.json:31-39` default first outbound is `freedom`/`direct`. Not determined: The reporter's exact rule JSON, so which field keeps it from matching is inferred. It does not change the verdict, because the core's own decision is what the tester reports. *This reply was generated automatically; a maintainer may follow up.* <!-- claude-issue:analyst -->
Author
Owner

@barbod1123-bit commented on GitHub (Sep 27, 2026):

Just to clarify, the following Outbound configuration:

{
"protocol": "socks",
"settings": {
"servers": [
{
"address": "127.0.0.1",
"port": 1085,
"users": []
}
]
},
"tag": "Test"
}

is for Psiphon, not WARP.

I also tested the issue separately with the WARP Outbound, and the same IP leak occurs.

<!-- gh-comment-id:5853816691 --> @barbod1123-bit commented on GitHub (Sep 27, 2026): Just to clarify, the following Outbound configuration: { "protocol": "socks", "settings": { "servers": [ { "address": "127.0.0.1", "port": 1085, "users": [] } ] }, "tag": "Test" } is for Psiphon, not WARP. I also tested the issue separately with the WARP Outbound, and the same IP leak occurs.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#4452
No description provided.