erebe / wstunnel

Tunnel all your traffic over Websocket or HTTP2 - Bypass firewalls/DPI - Static binary available
Other
3.22k stars 290 forks source link

[Feature Request] WebTransport Support (HTTP3 over QUIC) #191

Open BxOxSxS opened 5 months ago

BxOxSxS commented 5 months ago

From MDM web docs:

The WebTransport API provides a modern update to WebSockets, transmitting data between client and server using HTTP/3 Transport. WebTransport provides support for multiple streams, unidirectional streams, and out-of-order delivery. It enables reliable transport via streams and unreliable transport via UDP-like datagrams.

In short: it would allow transporting data using QUIC with better performance than websocket over TCP

The downside of it is that some firewalls may block UDP on port 443, so there should be a switch (automatic?) to do fallback to websocket.

Regarding implementation, I have found these useful resources:

erebe commented 5 months ago

Hello,

It is something I will look into at some point, but not in the near future. The main issue is udp, as you mention, most firewall block udp traffic, also no corporate http proxy manage udp for now.

I will make it configurable at some point, but it is not a priority for now :x

P.s: Thanks for the reference material, it helps :)

bytejedi commented 5 months ago

Some firewalls will also block quic because quic is also essentially udp. If the remote server network is good, the performance of ws is sufficient or even excessive. I can use the ws protocol to drain the bandwidth of my remote server. ws has many benefits, such as being very mature, stable and common, and routers like tcp traffic. My experience tells me that the core lies in the quality of your network, the protocol is secondary.

In other words, no matter how awesome the protocol is, as long as it is based on UDP, it will be defeated by the ISP's QoS.

p.s. The reason why ISPs dislike UDP so much is because UDP has no congestion control and will cause congestion on the backbone network. Some ISPs directly block UDP to save trouble. Second Class Citizen UDP

BxOxSxS commented 5 months ago

I know there are some problems as these standards (QUIC, HTTP3 and WebTransport) are young, but they are being more and more adopted, so it's going to be only better. That's why I mentioned there should be a fallback. I think it's worth implementing, as there are certain scenarios where it's better. And I think over time there will be only more

alou-S commented 3 months ago

Most firewalls do block UDP. But due to HTTP/3 becoming more common there are a decent number of places that are allowing QUIC traffic through their often extremely restrictive firewalls, my university being one of them. Would be cool to actually see this feature implemented.