[GH-ISSUE #1327] Disabling udp in some protocols in xray #902

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

Originally created by @sharif221 on GitHub (Dec 11, 2023).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/1327

The problem starts from my ip
My server ip is clean when using tcp protocol means restrictions do not apply to any tcp connections that firewall cant figure out its identity, aka v2ray is that case.
But it is heavily restricted on udp, so firewall don't care why that ip send or receive udp connection always restrictions apply, in some hours 9 out of 10 udp connections drops from firewall right away.

I done a small trick to see not using udp make changes or not, the config is vmess tcp http and i blocked udp in my local firewall and tryed to connect, the result was unbelievable, i not changed any thing in client app and xray, just removed any udp connection in client side, the vpn turned from loading screen every 3 second in YouTube to working very well in 80% of use cases, i think its not the best way to remove udp in my connection(why using local firewall against our connection :/ ),
There might be a setting in xray that let us only use tcp even if there is disadvantages in using full tcp in vpn.
Is there anything like that in x-ui or xray routing that let us perform this action?

I'm not an expert and there might be a chance that the problem is something else but the only thing that im sure is using tcp for Instagram is better than using udp that get dropped by firewall and xray need to figure out sending that data with new connection.

Thanks.

Originally created by @sharif221 on GitHub (Dec 11, 2023). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/1327 The problem starts from my ip My server ip is clean when using tcp protocol means restrictions do not apply to any tcp connections that firewall cant figure out its identity, aka v2ray is that case. But it is heavily restricted on udp, so firewall don't care why that ip send or receive udp connection always restrictions apply, in some hours 9 out of 10 udp connections drops from firewall right away. I done a small trick to see not using udp make changes or not, the config is vmess tcp http and i blocked udp in my local firewall and tryed to connect, the result was unbelievable, i not changed any thing in client app and xray, just removed any udp connection in client side, the vpn turned from loading screen every 3 second in YouTube to working very well in 80% of use cases, i think its not the best way to remove udp in my connection(why using local firewall against our connection :/ ), There might be a setting in xray that let us only use tcp even if there is disadvantages in using full tcp in vpn. Is there anything like that in x-ui or xray routing that let us perform this action? I'm not an expert and there might be a chance that the problem is something else but the only thing that im sure is using tcp for Instagram is better than using udp that get dropped by firewall and xray need to figure out sending that data with new connection. Thanks.
bsakaguchi 2026-10-31 20:15:13 +07:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@pulsarice commented on GitHub (Dec 11, 2023):

Hi
Thanks for sharing.
I don't recommend completely blocking udp. The problem is QUIC protocol. You'll have to only block udp443 and udp80. Take a look: https://github.com/MHSanaei/3x-ui/discussions/1317

  {
    "type": "field",
    "port": "80,443",
    "network": "udp",
    "outboundTag": "blocked"
  },
<!-- gh-comment-id:1850519934 --> @pulsarice commented on GitHub (Dec 11, 2023): Hi Thanks for sharing. I don't recommend completely blocking udp. The problem is QUIC protocol. You'll have to only block udp443 and udp80. Take a look: https://github.com/MHSanaei/3x-ui/discussions/1317 ``` { "type": "field", "port": "80,443", "network": "udp", "outboundTag": "blocked" }, ```
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#902
No description provided.