Repository navigation
Description
I am using FoxyVPN (v1.0.7) and I've noticed a critical issue with online gaming. While TCP traffic (like web browsing) works perfectly, online games fail to connect. I understand this is because the current HTTP/2 tunnel architecture primarily supports TCP and is not properly routing or encapsulating UDP packets.
To fix this and make the app suitable for gaming, please consider the following technical implementations:
- Implement UDP-over-TCP/HTTP2 Encapsulation (UDP Relay)
· Issue: The current tunnel drops UDP traffic, which is essential for online games (VoIP, multiplayer sessions).
· Solution: Please implement a mechanism to encapsulate UDP packets inside TCP/HTTP2 streams. (Similar to how udp2raw or V2Ray's mKCP/TCP transport handles UDP). If the edge server (Fastly) supports it, enable UDP Associate over SOCKS5.
- Add a Robust TUN Stack (tun2socks / gVisor)
· Issue: The current VPN interface (VpnService) does not properly capture and forward UDP packets to the proxy.
· Solution: Integrate a proper userspace network stack for Android like gVisor or tun2socks (using smoltcp or lwip). This ensures that UDP packets from the OS are correctly converted to SOCKS5 UDP datagrams or encapsulated into the HTTP/2 tunnel.
- Add "Routing Rules" (Bypass UDP or Specific IPs)
· Issue: When a game sends UDP packets, the app either drops them or sends them through a tunnel that doesn't support them, causing the game to hang or timeout.
· Solution: Add a routing engine (like the one in v2rayNG or NekoBox). Add an option to route all UDP traffic to direct (bypassing the VPN) by default, or allow users to add specific game server IP ranges to the direct routing table while TCP remains proxied.
- Fix MTU and Fragmentation Issues
· Issue: HTTP/2 tunneling adds overhead (headers, framing) to packets. The default MTU of 1480 might be too high for UDP, leading to packet fragmentation and dropping by the edge network (Fastly).
· Solution: Allow dynamic MTU adjustments or implement internal fragmentation for UDP packets before they enter the HTTP/2 tunnel.
- Granular Split Tunneling (Protocol-based)
· Issue: The current "Excluded apps" (Split Tunneling) completely removes the app from the VPN.
· Solution: Enhance split tunneling to allow protocol-based routing. For example, allow TCP traffic of a specific app to go through the VPN, but route its UDP traffic directly.
- Consider Core Replacement (sing-box / Xray-core)
· Suggestion: Instead of maintaining a custom HTTP/2 client, consider wrapping the app around sing-box or Xray-core. These cores have native, highly optimized support for UDP (via Full-Cone NAT), TUN mode, and complex routing rules out of the box.
Thank you for your hard work on this open-source project. I look forward to seeing these networking features implemented.
Activity
Vauth commentedon Oct 19, 2026
Thanks for the detailed explanation.
Fastly already supports
HTTP/3transport. the restriction is the allowed ports. Mozilla's upstream policy strictly permits web traffic (80/443) and drops all external UDP ports at the firewall. Encapsulating UDP inside the app also won't help because the edge nodes will still reject it. so about the gaming part, we cannot do anything.Regarding other suggestions (3,5,6), I've already planned to replace the core to sing-box. after that they will be supported.