[GH-ISSUE #3153] Feature Request: Customizable client port in inbound configuration for generated user configs #2117

Closed
opened 2026-10-31 20:23:20 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @engvin on GitHub (Jun 25, 2025).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/3153

Currently, when an inbound is configured to listen on a specific port (e.g., 10000), all user configurations generated under that inbound will use this port as the destination port in the client configuration.
However, in setups where a reverse proxy (like Caddy or Nginx) is used in front of Xray and forwards traffic from a public port (e.g., 443) to the internal port (e.g., 10000), this behavior leads to incorrect client configs — clients try to connect to port 10000 directly instead of 443.
This requires manual correction of each generated configuration or extra effort to explain it to users, which becomes problematic in larger deployments.

Describe the solution you'd like

I would like to request an option in the inbound settings to specify a custom client port that will be used in the generated user configuration files.
This port would only affect the config values shown to the client and would not change the actual listening port of the inbound.
For example, the inbound listens on internal port 10000, but the configs generated for users should indicate port 443, because the reverse proxy listens on 443 and forwards to 10000.
This would significantly improve usability and eliminate the need for manual config adjustments or user-side confusion.

Describe alternatives you've considered

No response

Checklist

  • This feature report is written entirely in English.
Originally created by @engvin on GitHub (Jun 25, 2025). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/3153 ### Is your feature request related to a problem? Currently, when an inbound is configured to listen on a specific port (e.g., 10000), all user configurations generated under that inbound will use this port as the destination port in the client configuration. However, in setups where a reverse proxy (like Caddy or Nginx) is used in front of Xray and forwards traffic from a public port (e.g., 443) to the internal port (e.g., 10000), this behavior leads to incorrect client configs — clients try to connect to port 10000 directly instead of 443. This requires manual correction of each generated configuration or extra effort to explain it to users, which becomes problematic in larger deployments. ### Describe the solution you'd like I would like to request an option in the inbound settings to specify a custom client port that will be used in the generated user configuration files. This port would only affect the config values shown to the client and would not change the actual listening port of the inbound. For example, the inbound listens on internal port 10000, but the configs generated for users should indicate port 443, because the reverse proxy listens on 443 and forwards to 10000. This would significantly improve usability and eliminate the need for manual config adjustments or user-side confusion. ### Describe alternatives you've considered _No response_ ### Checklist - [x] This feature report is written entirely in English.
bsakaguchi 2026-10-31 20:23:20 +07:00
Author
Owner

@engvin commented on GitHub (Jun 25, 2025):

I figured it out — the functionality I was asking for already exists under the name ExternalProxy in the Inbound settings. I opened the issue too hastily. Thank you for your work!

<!-- gh-comment-id:3004896930 --> @engvin commented on GitHub (Jun 25, 2025): I figured it out — the functionality I was asking for already exists under the name ExternalProxy in the Inbound settings. I opened the issue too hastily. Thank you for your work!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#2117
No description provided.