mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6850] [MERGED] fix(outbound): correctly dial IPv6 literals in TCP probes #6481
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#6481
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?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/6850
Author: @HamedSanaei
Created: 10/16/2026
Status: ✅ Merged
Merged: 10/24/2026
Merged by: @MHSanaei
Base:
main← Head:fix/outbound-ipv6-probes📝 Commits (3)
17adc54fix(outbound): handle IPv6 literals in TCP probes082ecfcMerge remote-tracking branch 'origin/main' into pr/6850e50f949test(outbound): keep only the IPv6 probe tests that can fail📊 Changes
2 files changed (+150 additions, -1 deletions)
View changed files
📝
internal/web/service/outbound/outbound.go(+7 -1)📝
internal/web/service/outbound/outbound_endpoints_test.go(+143 -0)📄 Description
Summary
Fix false-negative TCP connectivity results for outbound servers configured with unbracketed IPv6 literals.
Previously, the TCP probe constructed a dial address with string formatting (
host:port), producing an invalid dial target whenhostwas an IPv6 literal. The outbound itself could still carry traffic.Changes
net.JoinHostPortand handle already-bracketed IPv6 literals without double brackets.Scope / Root cause
Only the TCP probe implementation required a fix. HTTP and Real Delay use separate temporary-Xray-based probe paths; their production code is unchanged.
During validation, a separate reverse-tunnel outbound produced HTTP/Real Delay failures with both IPv6 spellings. Its reverse tag/configuration caused those failures, not IPv6 bracket handling; this PR does not attempt to change reverse-tunnel probing.
Validation
All completed successfully on Windows (Go 1.27.2, GCC 16.2.0, CGO enabled):
go test ./internal/web/service/outbound -count=1go test ./...go build ./...go vet ./...git diff --checkTestOutboundProbesIPv6ThroughXraywith an Xray 26.10.10 executable built from the pinned module: HTTP and Real Delay pass for raw and bracketed IPv6 on the standard local test setup.Additional live VPS checks on the reported endpoint confirmed that TCP succeeded with both IPv6 formats (three repetitions each); reverse-tunnel HTTP/Real Delay failures were independent of address formatting.
Compatibility
No persistent configuration changes, dependency updates, or intentional breaking changes.
Related to #4766.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.