Add option to force P2P connection via WebRTC #981

Open
opened 2025-11-20 05:20:57 -05:00 by saavagebueno · 1 comment
Owner

Originally created by @ghost on GitHub (Jun 15, 2024).

In https://docs.netbird.io/about-netbird/how-netbird-works, it shows P2P traffic tunneling directly through WireGuard. If I understand correctly, this is raw, unencapsulated WireGuard traffic.

In some networks, WireGuard traffic may be restricted, and since Netbird already supports WebRTC for relaying, it would be helpful to add an option to use it for P2P connections.

This can be accomplished in a number of ways:

  • Client-side environment variables
  • Setting server-side ACL for some peers
  • Global settings on the server

Related: #1096

Originally created by @ghost on GitHub (Jun 15, 2024). In https://docs.netbird.io/about-netbird/how-netbird-works, it shows P2P traffic tunneling directly through WireGuard. If I understand correctly, this is raw, unencapsulated WireGuard traffic. In some networks, WireGuard traffic may be restricted, and since Netbird already supports WebRTC for relaying, it would be helpful to add an option to use it for P2P connections. This can be accomplished in a number of ways: - Client-side environment variables - Setting server-side ACL for some peers - Global settings on the server Related: #1096
saavagebueno added the feature-request label 2025-11-20 05:20:57 -05:00
Author
Owner

@braginini commented on GitHub (Jun 19, 2024):

hey @thinadusk
Your understanding is correct - the traffic is raw WireGuard traffic.
The change that you are proposing is not as easy as it sounds and requires the whole transport logic refactor.
NetBird uses ICE from WebRTC to negotiate direct connections. However, it doesn't use data channels of WebRTC.
We had some thoughts around it but we lack a real strong use case that would benefit most of the users.

Bottom line, I don't think that we will persue this in the near future. However, we are working on relay improvements that might help with these issues.

What is your environment that blocks WireGuard?

@braginini commented on GitHub (Jun 19, 2024): hey @thinadusk Your understanding is correct - the traffic is raw WireGuard traffic. The change that you are proposing is not as easy as it sounds and requires the whole transport logic refactor. NetBird uses ICE from WebRTC to negotiate direct connections. However, it doesn't use data channels of WebRTC. We had some thoughts around it but we lack a real strong use case that would benefit most of the users. Bottom line, I don't think that we will persue this in the near future. However, we are working on relay improvements that might help with these issues. What is your environment that blocks WireGuard?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#981