mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[GH-ISSUE #6750] [Bug]: TUIC cannot proxy TLS connections. #4500
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#4500
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 @wgp-2020 on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6750
Describe the bug
TUIC cannot proxy Warframe's chat server (172.232.25.131:6697), although other types of inbound protocols work.
This is a TCP connection with a TLS certificate, but the certificate's domain name is not bound to any IP address.
How to reproduce the problem
openssl s_client -connect 172.232.25.131:6697 -servername irc.warframe.comExpected behavior
No response
Actual behavior
No response
Relevant logs
Screenshots
No response
3x-ui version
3.9.0
Xray-core version
No response
How did you install 3x-ui?
Docker / Docker Compose
Operating system
Ubuntu 18.04 LTS
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?
No response
Before submitting
@github-actions[bot] commented on GitHub (Oct 6, 2026):
This is a real bug. Xray's sniffer on the TUIC relay replaces your IP target
172.232.25.131with the TLS SNIirc.warframe.com, then tries to resolve that name. It has no DNS record, so the dial fails. Other inbounds work because their sniffing is whatever you set in the panel. The TUIC relay's sniffing is hardcoded, and it is missingrouteOnly.How it happens. A TUIC inbound doesn't dial the target itself.
internal/tuic/socks_bridge.go(SocksRelay.DialTCP) forwards the address your client sent, the raw IP here, to a loopback SOCKS inbound that the panel injects into the Xray config. That injected inbound has this sniffing block:Without
"routeOnly":true, Xray uses the sniffed domain as the real destination. Your log shows exactly that:failed to resolve ip > lookup irc.warframe.com on 8.8.8.8:53: no such host.The same bug was already fixed for the AmneziaWG relay, which sits right above it. That relay sets
routeOnlyand has a comment explaining why:The TUIC relay never got that change.
Workaround until it is fixed. The relay inbound is generated, so you can't set
routeOnlyon it from the panel. Use another inbound type for this traffic, since you said those work. Or, if your client allows it, exclude172.232.25.131from the TUIC proxy.Verdict: Confirmed bug
Severity: Medium
Confidence: High
Root cause:
internal/web/service/xray.go:800:tuicEgressSniffingSettingsturns on TLS/HTTP/QUIC sniffing withoutrouteOnly.injectTuicSocks(:824) attaches it to every TUIC relay inbound. Any TCP/QUIC flow to an IP whose SNI or Host doesn't resolve to that IP (no DNS record, split-horizon DNS, domain fronting, Telegram FakeTLS) is redirected to the sniffed name. Introduced in0054e671"feat(tuic): implement native in-process Go TUIC v5 server (#6577)", first released in v3.9.0.Already fixed: No. Still present on the default branch (tip
66ef5bbc) and in v3.9.0, the latest release.Duplicate of: None. Related: #6560 and #6704 (TUIC routing, a different cause). The same defect in the AmneziaWG relay was fixed in
788b76c5"fix(amneziawg): sniff the relay with routeOnly …" (#6654).Evidence:
internal/web/service/xray.go:800and:824: the TUIC relay sniffing has norouteOnly.internal/web/service/xray.go:736-738: AmneziaWG relay, the same design with"routeOnly":trueand the reason for it.internal/web/service/xray_config_inject_test.go:616TestInjectAmneziawgnetSocks_SniffingRouteOnly: pinsrouteOnlyfor AmneziaWG only.internal/web/service/inbound_tuic_test.go:53: compares the TUIC sniffing to the constant itself, so it can't catch this.internal/tuic/socks_bridge.go:53-120:DialTCP/buildSocks5ConnectRequestforward the client's address type (IPv4/IPv6/domain) unchanged.Not determined: Which TUIC client you use. It doesn't matter here: the server log shows the domain lookup happening in Xray, after the relay received the IP.
Suggested fix: Add
"routeOnly":truetotuicEgressSniffingSettings, matchingamneziawgEgressSniffingSettings. Sniffing stays on for domain routing rules, and the dial stays on the client's IP. Replace the constant-equality check ininbound_tuic_test.gowith a decodedRouteOnlyassertion like the AmneziaWG test.This reply was generated automatically; a maintainer may follow up.