[GH-ISSUE #4870] Use webRTC data channel to relay the wireguard packets #9967

Open
opened 2026-08-05 01:24:10 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @CrazyPandar on GitHub (Nov 27, 2025).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/4870

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.

Originally created by @CrazyPandar on GitHub (Nov 27, 2025). Original GitHub issue: https://github.com/netbirdio/netbird/issues/4870 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.
saavagebueno added the feature-request label 2026-08-05 01:24:10 -04:00
Sign in to join this conversation.
No Label feature-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#9967