mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5472] [Bug]: Better support for pure IPv6-only VPS: remove forced -4 in install script or add IPv6 option #3825
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#3825
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 @yominra on GitHub (Jun 21, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5472
Describe the bug
Title
Better support for pure IPv6-only VPS: remove forced
-4in install script or add IPv6 optionProblem
On pure IPv6-only VPS (no native IPv4 outbound connectivity), the official installation script fails because it forces IPv4 with the
-4flag:This results in:
Although users can manually remove -4 or use DNS64 servers, it is not beginner-friendly.
How to reproduce the problem
Please consider one of the following improvements in install.sh:
Best option: Remove the -4 flag entirely. Modern curl + DNS64 works well on IPv6-only systems.
Compatible option: Add a flag or environment variable such as:
--ipv6 parameter
XUI_IPV6_ONLY=1 environment variable
When detected (e.g. no global IPv4 address via ip -4 addr), the script should automatically avoid using -4.
This change should be applied to all curl commands that download the tar.gz, x-ui.sh, etc.
Affected Code
Main download commands in install_x-ui() function (around lines 1318 and 1335):
Additional Recommendations
Apply the same logic to GitHub API calls for version checking.
Add a note in the README for IPv6-only users (e.g. recommend DNS64 or ghproxy mirrors).
This improvement would greatly help users on IPv6-only providers such as certain Oracle, Vultr, Hetzner, and other cloud instances.
Thank you for maintaining 3x-ui — it's currently one of the best Xray panels available!
Expected behavior
Change this line of code
to the following line.
Alternatively, add a switch to enable IPv6 access.
Actual behavior
Relevant logs
Screenshots
No response
3x-ui version
3.3.1
Xray-core version
No relationships
How did you install 3x-ui?
install.sh script
Operating system
Ubuntu 22.04
Which parts of the panel are affected?
Install / upgrade script
Browser (only if it is a UI bug)
No relationships
Is the panel behind a reverse proxy or CDN?
None
Before submitting
@github-actions[bot] commented on GitHub (Jun 21, 2026):
The report is confirmed against the current source. Here is what the code actually does today:
Version fetch (
install_x-ui, line 1308 ofinstall.sh): already uses a fallback strategy — it first triescurlwithout-4, and only retries with-4if the first attempt returns an empty string. On a pure IPv6-only host the first attempt may succeed, so version detection may pass.Binary and script downloads (lines 1318, 1335, 1341, 1407, 1464, 1467, 1470 of
install.sh): all still unconditionally pass-4. On a host with no global IPv4 address these calls will time out, which is exactly the failure shown in the log.Affected
curlcalls ininstall_x-ui()and the downstream service-file download block:Workaround until a fix is merged:
Download the installer, strip the
-4flags, then run it locally:Verify with
grep 'curl -4' install.shthat no-4flags remain before running.Fix: removing
-4from all downloadcurlcalls (and ideally adopting the same dual-stack-first pattern already used for the version fetch) would resolve this for IPv6-only hosts without breaking dual-stack hosts, since moderncurlprefers the address family that works. A PR implementing this change would be welcome.This reply was generated automatically; a maintainer may follow up.