[GH-ISSUE #3751] checkPortExist should consider TCP vs UDP #2527

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

Originally created by @JustAPunchingCat on GitHub (Feb 5, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/3751

checkPortExist currently ignores the transport protocol, treating TCP and UDP as identical.

This causes errors like:

"Something went wrong (Port already exists: 443)"

even when creating one TCP inbound and one UDP inbound on the same port.

Use case:

H3 (QUIC) opens a UDP port

H2 / HTTP1.1 opens a TCP port

Two separate inbounds are required for XHTTP [“h3”, “h2”, “http/1.1”] to work

Reference: https://github.com/XTLS/Xray-core/pull/4320

Also, this blocks safe UDP inbounds (e.g., mKCP, WireGuard) on ports used by TCP inbounds.

I tried to modify DB, but Routing Rules does not account for protocol (TCP vs UDP)

Describe the solution you'd like

Update checkPortExist to check the protocol (TCP/UDP) when verifying port conflicts.
Routing Rules should list inbounds with protocol

Describe alternatives you've considered

Add an option to ignore checkPortExist, or checkPortExist can show only warning and continue

Checklist

  • This feature report is written entirely in English.
Originally created by @JustAPunchingCat on GitHub (Feb 5, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/3751 ### Is your feature request related to a problem? checkPortExist currently ignores the transport protocol, treating TCP and UDP as identical. This causes errors like: "Something went wrong (Port already exists: 443)" even when creating one TCP inbound and one UDP inbound on the same port. Use case: H3 (QUIC) opens a UDP port H2 / HTTP1.1 opens a TCP port Two separate inbounds are required for XHTTP [“h3”, “h2”, “http/1.1”] to work Reference: https://github.com/XTLS/Xray-core/pull/4320 Also, this blocks safe UDP inbounds (e.g., mKCP, WireGuard) on ports used by TCP inbounds. I tried to modify DB, but Routing Rules does not account for protocol (TCP vs UDP) ### Describe the solution you'd like Update checkPortExist to check the protocol (TCP/UDP) when verifying port conflicts. Routing Rules should list inbounds with protocol ### Describe alternatives you've considered Add an option to ignore checkPortExist, or checkPortExist can show only warning and continue ### Checklist - [x] This feature report is written entirely in English.
bsakaguchi 2026-10-31 20:26:09 +07:00
Author
Owner

@ilya-fedin commented on GitHub (Apr 21, 2026):

I encountered the same problem with the new Hysteria support. I wanted to set up VLESS on 443/tcp and Hysteria on 443/udp but got the error.

<!-- gh-comment-id:4285339095 --> @ilya-fedin commented on GitHub (Apr 21, 2026): I encountered the same problem with the new Hysteria support. I wanted to set up VLESS on 443/tcp and Hysteria on 443/udp but got the error.
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#2527
No description provided.