mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5205] [Bug]: WARP outbound always fails on 3x-ui v3.3.0 with Xray 26.6.1 #3650
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#3650
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @okwebsite on GitHub (Jun 11, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5205
Describe the bug
Checklist
Environment
Bug Description
After upgrading to 3x-ui v3.3.0, the built-in WARP outbound cannot establish a connection.
When creating a WARP outbound from the panel and activating it, the outbound status immediately changes to:
How to reproduce the problem
No traffic is routed through WARP.
I also tested different routing methods and placed WARP behind inbound/routing rules, but the outbound still fails to connect.
Steps To Reproduce
Expected Behavior
WARP outbound should connect successfully and route traffic through Cloudflare WARP.
Actual Behavior
Outbound status remains "failed" and does not establish a connection.
Additional Notes
Expected behavior
No response
Actual behavior
No response
Relevant logs
Screenshots
3x-ui version
3.3.0
Xray-core version
26.6.1
How did you install 3x-ui?
install.sh script
Operating system
Ubuntu 24
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
@github-actions[bot] commented on GitHub (Jun 11, 2026):
The report does not include the Xray logs or the actual generated outbound config, which are both necessary to determine the root cause. Below is what the code shows, what to check, and what information is still needed.
Context from the codebase
The missing-
reserved-bytes bug reported in #4781 (emptyreserved: []due toclient_idnot being persisted from the Cloudflare registration response) was fixed ininternal/web/service/integration/warp.goand is present in v3.3.0. Specifically,RegWarpnow extractsconfig.client_idfrom the Cloudflare response and stores it in thewarpDatamap before saving to the database (lines 110–114 ofintegration/warp.go). The frontendcollectConfiginWarpModal.tsxthen decodes this into the 3-bytereservedarray.This fix applies to new registrations made on or after the fix was included. If you are using a WARP registration that was created on an older version (before the fix), the stored
warpDatain the database may still be missingclient_id, which causesreserved: []in the outbound and can prevent the WireGuard handshake from completing.Diagnostic steps
Run the following commands to confirm what is actually stored:
client_idis present in the stored WARP credentials:Expected output for a correctly registered WARP account includes a
client_idfield. If it is absent or empty, thereservedbytes will be empty and the WireGuard handshake will fail.The
reservedfield must be a 3-element integer array (e.g.,[123, 45, 67]). An empty array ([]) ornullmeans theclient_idwas not present when the outbound was generated.If
client_idis missingDelete the current WARP registration from the panel (WARP modal → "Delete Account"), then create a new one. This re-registers with Cloudflare and stores the
client_idcorrectly under v3.3.0. After registering, use the "Refresh" button to fetch the config, then add or reset the outbound.Information needed to continue
The following is missing from the report:
sqlite3commands above (redact private keys and access tokens as shown).journalctlcommand above, or from the panel's log viewer.Without the Xray logs and the generated config, the root cause cannot be determined from the report as submitted.
This reply was generated automatically; a maintainer may follow up.
@okwebsite commented on GitHub (Jun 11, 2026):
Additional investigation results:
Environment:
I deleted the old WARP account completely and created a brand new WARP registration on v3.3.0.
The stored WARP credentials contain a valid client_id:
{
"client_id": "rQNk"
}
The generated WireGuard outbound contains valid reserved bytes:
"reserved": [173, 3, 100]
The generated outbound configuration is:
"protocol": "wireguard",
"endpoint": "engage.cloudflareclient.com:2408"
UDP connectivity to the Cloudflare WARP endpoint is working:
nc -vzu engage.cloudflareclient.com 2408
Connection to engage.cloudflareclient.com (2606:4700:d0::a29f:c001) 2408 port [udp/*] succeeded!
Xray version:
Xray 26.6.1 (Xray, Penetrates Everything.)
I also verified that the generated /usr/local/x-ui/bin/config.json contains:
The issue remains after:
The panel still shows the outbound status as failed.
No WireGuard-specific errors appear in Xray logs. The logs only show normal freedom outbound activity.
Based on these tests, the issue does not appear to be related to:
Could this be a regression in the WARP status check logic or WireGuard outbound handling in 3x-ui v3.3.0 with Xray 26.6.1?
@MHSanaei commented on GitHub (Jun 11, 2026):
Fixed in
09a887f9— thank you for the thorough follow-up diagnostics; they ruled out the credential side and pointed at the right place.Root cause (two compounding defaults in the generated WARP outbound):
domainStrategy: "ForceIP"lets Xray resolveengage.cloudflareclient.comto either address family with no fallback. Yourncoutput shows the endpoint resolving to IPv6 (2606:4700:d0::a29f:c001) — on a host with partially-configured IPv6 (common on Hetzner), the WireGuard handshake blackholes silently. Notenc -vzu"succeeded" does not prove UDP reachability — UDP connect() succeeds locally unless an ICMP error comes back.noKernelTun: falsemakes the real outbound use kernel TUN when running as root (needs CAP_NET_ADMIN + fwmark routing, fails silently on many VPS setups), while the panel's connectivity test always probes withnoKernelTun: true(userspace). The status check and your real traffic were exercising different data paths — which is exactly why everything looked valid but nothing connected and nothing was logged.The fix: panel-generated WARP (and NordVPN) outbounds now use
domainStrategy: "ForceIPv4v6"(prefer IPv4, fall back to IPv6 — matching the official WARP client) andnoKernelTun: true, so the probe and real traffic follow the same path. Ships in the next release.Workaround on v3.3.0 right now: edit the
warpoutbound in the Xray settings and set"domainStrategy": "ForceIPv4v6"and"noKernelTun": truein its settings, then restart Xray. If it still fails after that, the remaining suspect is UDP/2408 egress filtering on the host or upstream.@okwebsite commented on GitHub (Jun 11, 2026):
Thank you for the quick fix and detailed explanation.
I tested the workaround described in commit
09a887fmanually on my server.Changes applied:
After applying the changes I restarted Xray and verified that the active generated configuration contains the updated values.
Additional checks performed:
Despite all of the above, the issue still persists.
Observed behavior:
warp=off
The workaround from commit
09a887fdoes not resolve the issue in my environment.Environment:
Please let me know if there are any additional WireGuard/WARP debug steps I can run to help identify the remaining issue.
@okwebsite commented on GitHub (Jun 13, 2026):
Just following up on this issue.
I tested the workaround introduced in commit
09a887fand verified that the generated outbound contains:I also recreated the WARP account, verified client_id and reserved bytes, confirmed IPv6 connectivity, and verified routing configuration.
Despite these checks, the WARP outbound still remains in the "failed" state and client traffic times out when routed through it.
Could you please advise what additional diagnostics would be useful to determine the remaining cause?
Thank you for your time.
@github-actions[bot] commented on GitHub (Jun 14, 2026):
Claude finished @MHSanaei's task in 2m 29s —— View job
Context review
The trigger comment contains no specific request, so this is a code-context summary and additional debugging guidance for the remaining environment-specific failure reported by @okwebsite.
What is already fixed in the codebase (
09a887f9)Both fixes are present in the current source:
frontend/src/pages/xray/overrides/WarpModal.tsxlines 110–116: new WARP outbounds are generated withdomainStrategy: "ForceIPv4v6"andnoKernelTun: true.frontend/src/pages/xray/overrides/NordModal.tsxline 215: NordVPN outbounds similarly setnoKernelTun: true.internal/web/service/outbound/probe_http.golines 363–376: the batch test engine forcesnoKernelTun: trueon every wireguard outbound in the temporary Xray instance, so the probe and the real traffic path are now identical.Why the user's issue persists after the workaround
The user confirmed
domainStrategy: "ForceIPv4v6"andnoKernelTun: trueare set, credentials are correct, and UDP/2408 connectivity tests pass. However, the "failed" panel status and traffic timeout remain.The most likely remaining causes, in order:
Hetzner egress UDP filtering. The
nc -vzutest only verifies that the local socket sent a packet and received no ICMP unreachable back — it does not confirm the WireGuard handshake completed. Hetzner sometimes rate-limits or blocks WireGuard-characteristic UDP traffic on shared plans. The distinguishing test is to look for the handshake response in Xray debug logs (see below), not thencresult.DNS resolution of the WARP endpoint still picking IPv6. Even with
ForceIPv4v6, if the system DNS resolver returns only AAAA records forengage.cloudflareclient.comand the IPv4 path to those addresses is broken, Xray will try the IPv6 address as the fallback. Using a hardcoded IPv4 endpoint eliminates this.Xray 26.6.1 WireGuard regression. The absence of any WireGuard error in the logs at the default
warninglog level is not conclusive — WireGuard handshake timeouts are not always logged at warning.Additional diagnostics for the user
If the debug logs show no handshake attempts despite routing traffic through the WARP outbound, the routing rule or outbound tag mismatch is the remaining cause. If handshake attempts appear but never complete, Hetzner UDP egress filtering is the cause and no code change will fix it — a different port (WARP also supports
engage.cloudflareclient.com:500and2408) or a different network path is needed.@MHSanaei — if there is a specific code change you would like me to implement (for example, adding a hardcoded-IPv4 fallback endpoint option, or surfacing handshake errors more prominently), please describe it and I can implement it.
@okwebsite commented on GitHub (Jun 14, 2026):
Thank you for the detailed analysis.
I have now completed all of the suggested checks and the issue still persists.
Environment:
What I verified:
"tag": "warp",
"protocol": "wireguard"
{
"type": "field",
"inboundTag": ["in-8787-tcp"],
"outboundTag": "warp"
}
"port": 8787,
"tag": "in-8787-tcp"
/usr/local/x-ui/bin/xray-linux-amd64 run -test -config /usr/local/x-ui/bin/config.json
Result:
Configuration OK.
As soon as I remove the WARP routing rule, the same inbound works immediately and clients connect successfully.
Current behavior:
failed
Important observation:
The issue is not limited to the outbound test UI. Real client traffic also fails whenever the WARP outbound is selected.
At this point:
Despite all of the above, the outbound remains in failed state and any inbound routed through WARP becomes unusable (connection timeout).
So there still seems to be a problem either in the WireGuard/WARP outbound itself, the outbound probing logic, or the actual WireGuard handshake/runtime path, because the configuration appears correct but traffic cannot pass through the WARP outbound.
If there is any additional debug logging specifically for the WireGuard outbound or handshake process that you would like me to collect, I can provide it.