mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #6318] [Feature]: No easy way to change Listen IP address in tui menu with SSH Port Forwarding Management after SSL cert set. #4293
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#4293
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 @thadguidry on GitHub (Aug 25, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6318
Describe the bug
I expected to be able to change listen ip address at anytime for the node during initial setup, since I have a node with multiple CPUs and multiple NICs with lots of IPs available.
It would be nice to have an easier way to set the listen ip address during setup and after in the tui menu directly. I saw that it was available under the SSH Port Forwarding Management, but after you setup the SSL, then going back to that menu item for SSH Port Forwarding Management will no longer show sub-menu options, but instead says:
How to reproduce the problem
Expected behavior
There is always the ability to have the sub-menu for SSH Port Forwarding Management -> Change Listen IP
Actual behavior
Instead, the panel sub-menu shows "Panel is secure with SSL".
So, I had to change the listen address via a SQL script:
Relevant logs
Screenshots
No response
3x-ui version
3.7.0
Xray-core version
26.7.28
How did you install 3x-ui?
install.sh script
Operating system
Ubuntu 24.04 LTS
Which parts of the panel are affected?
Xray config generation
Browser (only if it is a UI bug)
No response
Is the panel behind a reverse proxy or CDN?
Yes — Cloudflare (proxied DNS)
Before submitting
@github-actions[bot] commented on GitHub (Aug 25, 2026):
Your observation is correct and it is deliberate in the script, not a malfunction: menu item 24 is written as an alternative to having a certificate, so as soon as both
webCertFileandwebKeyFileare set it prints that message and bounces you back to the main menu. What is genuinely missing is a place to change the panel's Listen IP that is independent of SSL — so I have re-classified this as an enhancement request rather than a bug, and below are the two supported ways to do it today (neither needssqlite3).What the code actually does
x-ui.sh,SSH_port_forwarding()— the gate is the first thing after the settings are read:The design intent is visible in the branch immediately below it (
x-ui.sh:2623-2626), which is the mirror image:Certificate or SSH tunnel — the menu treats them as mutually exclusive, so it hides
1. Set listen IP/2. Clear listen IP(x-ui.sh:2639-2640) once you have a cert. That has been the behaviour since the feature was added in937bfb4c("SSH Port Forwarding (#2590)", Oct 2024), and it is unchanged onv3.7.0and on the default branch.Changing the Listen IP today
1. CLI — works regardless of SSL, no menu involved:
Check it, and revert it, with:
This is the exact call the hidden menu option makes (
x-ui.sh:2655andx-ui.sh:2671), and it lands on the samewebListensetting yourUPDATEstatement wrote (main.go:409-416→SettingService.SetListen→internal/web/service/setting.go:439-441).2. Web panel: Panel Settings → General → Listen IP (
frontend/src/pages/settings/GeneralTab.tsx:187-193; the field description reads "The IP address for the web panel. (leave blank to listen on all IPs)"), then the Restart Panel button on the same page. Given your setup, note that saving127.0.0.1here will cut off your own browser session the moment the panel restarts, unless you are already reaching it through a local reverse proxy — which is presumably why you went to the database in the first place.One caveat on reverting: the panel builds its bind address with
net.JoinHostPort(listen, port)(internal/web/web.go:572), so an emptywebListenbinds all interfaces including IPv6, while the literal0.0.0.0that the menu/CLI writes binds IPv4 only. The CLI cannot write the empty value back —main.go:409isif listenIP != "", so-listenIP ""is silently skipped. To get a truly blank value, clear the field in the web panel.Two things in that same block worth looking at
For whoever picks this up, there are two concrete defects next to the gate, independent of the feature request:
before_show_menuatx-ui.sh:2621is not followed byreturn.before_show_menu()(x-ui.sh:126-129) callsshow_menu, andshow_menu's fallback branch is justLOGE "Please enter the correct number [0-28]"(x-ui.sh:3537-3539) —LOGEonly echoes (x-ui.sh:14-16). So selecting 24 with a cert set, pressing Enter, then typing an invalid number at the main menu unwinds back intoSSH_port_forwardingat line 2623 and prints the very submenu the gate just refused.listenIPto127.0.0.1first and obtains a certificate afterwards has no menu path to2. Clear listen IP(x-ui.sh:2670-2673) — and if the panel is bound to loopback the web UI is not reachable either, leaving the CLI as the only way out.Also worth noting: the docs describe item 24 as "Bind the panel to localhost and tunnel over SSH" (
docs/content/docs/en/guide/update-uninstall.mdx:40) with no mention of the SSL gate, so the behaviour is undocumented as well as unexpected.I changed the title prefix from
[Bug]:to[Feature]:to match the classification; the old title was "[Bug]: No easy way to change Listen IP address in tui menu with SSH Port Forwarding Management after SSL cert set." and the rest of your wording is untouched.Related: #3933 asked the mirror-image question ("how do I switch from SSL Certificate Management to SSH Port Forwarding Management?") and hits the same gate, but it was a question and is already closed, so this issue stays open on its own.
Verdict: Feature request
This reply was generated automatically; a maintainer may follow up.