ITADN

[Feature Request]: Add QoS / Traffic Prioritization (DSCP/Internal) for Real-Time UDP and DNS

#6324Openw0l4i 创建于 2026-06-14
W
w0l4icommented
Description: Currently, when utilizing proxy protocols (like VLESS or Trojan) in Xray-core, all user traffic (bulk downloads, social media, gaming, and voice calls) is multiplexed into a single tunnel without any internal prioritization. In scenarios with restricted bandwidth (weak ISPs, poor cellular networks) or multi-user setups, this causes Bufferbloat. Latency-sensitive packets (like a gunshot in a game or a voice packet) get stuck in the same queue behind heavy TCP/QUIC bulk traffic. This results in severe packet loss, massive ping spikes (rubberbanding in games), and robotic/choppy voice calls. I propose adding Quality of Service (QoS) / Traffic Prioritization, allowing users to assign priorities based on routing rules (e.g., giving DNS and real-time UDP traffic a "VIP Lane" over default bulk traffic). Why UDP != 443? (Real-World Examples) Most bulk traffic (web browsing, video streaming like YouTube/Netflix, heavy downloads) operates on TCP or UDP 443 (QUIC/HTTP3). Conversely, almost all real-time competitive games and VoIP applications use specific non-443 UDP port ranges to avoid this bulk traffic: 1. PC & Console Gaming: CS2 / CS:GO: UDP 27015 - 27030 Valorant: UDP 7000 - 8999, 8190 League of Legends: UDP 5000 - 5500 Call of Duty: UDP 3074, 27000+ 2. Mobile Gaming: PUBG Mobile: UDP 10000 - 12222 CoD Mobile: UDP 7000 - 7500, 3074 Mobile Legends: UDP 5000 - 5500 3. VoIP & Real-Time Communication: Discord Voice: UDP 50000 - 65535 WhatsApp / Telegram (WebRTC): Random high UDP ports and STUN/TURN ports like 3478, 19302. 4. DNS (Crucial for UX): DNS Requests: UDP 53. If DNS times out due to tunnel congestion, the entire browsing experience feels completely broken. Proposed Behavior & Implementation: It would be incredibly useful to introduce a priority or qos field within the routing rules. By processing "real-time" queues before "bulk" queues, or by setting DSCP (ToS) headers appropriately. Example of proposed routing config: JSON ``` { "routing": { "rules": [ { "type": "field", "network": "udp", "port": "53", "priority": "real-time", "outboundTag": "proxy" }, { "type": "field", "network": "udp", "port": "1-442, 444-65535", "priority": "real-time", "outboundTag": "proxy" }, { "type": "field", "priority": "bulk", "outboundTag": "proxy" } ] } } ``` The Impact (Before vs. After QoS): Adding this feature would be a game-changer for the Quality of Experience (QoE): Zero Ping Spikes during Downloads: A user could be downloading a large file or updating Windows in the background, yet their game ping would remain completely stable because the UDP game packets bypass the bulk queue. Flawless Voice Calls: Discord or WebRTC voice calls wouldn't become choppy or drop when someone else on the network loads a heavy Instagram page. Snappy Web Browsing: By prioritizing UDP 53, DNS resolution happens instantly, making the internet feel much faster even on heavily loaded servers. Better Server Resource Management: High-density servers would feel much more responsive to all users, as lightweight, latency-sensitive packets are instantly dispatched. Thank you for considering this enhancement! It would massively benefit users operating under constrained network conditions.
0 条评论