netbird icon indicating copy to clipboard operation
netbird copied to clipboard

Use webRTC data channel to relay the wireguard packets

Open CrazyPandar opened this issue 1 month ago • 0 comments

The browser client uses websocket server relay to relay wireguard packets. This wastes server bandwidth while the P2P connection can be established by browser. Maybe we can use WebRTC Data channel to relay the wireguard packets. This also makes the browser and none browser client have the same solution. I know this change need to modify the core connection architecture. However I think it's possible and not that difficult to change the code. Maybe just change the wireguard UDP socket read/write to the webRTC data channel read/write. I'm not familiar with the code base, forgive me if I'm wrong.

CrazyPandar avatar Nov 28 '25 02:11 CrazyPandar