3 ms·
Why wouldn't you just tunnel WireGuard over WebRTC? There's already a very, very good implementation of WireGuard --- one of the two major production implementa
by tptacek 5y ago
Why wouldn't you just tunnel WireGuard over WebRTC? There's already a very, very good implementation of WireGuard --- one of the two major production implementations --- in Go. We tunnel it over WebSockets, and it took like an hour to write that code.
- saurik 5y agoThat seems like it would offer no advantages, but would result in all of worse performance, smaller remaining available packet size, and "more code".
- pojntfx 5y agoYou could totally do that! See https://github.com/pojntfx/weron#8-write-your-own-protocol-with-wrtcconn https://github.com/pojntfx/weron#8-write-your-own-protocol-w..., but I agree with saurik - if DTLS is secure enough for your usecase, that would just add overhead ...
- tptacek 5y agoYep, that's a good point. I jumped into the code (I just wanted to see what the encryption transform was) and should have zoomed out and looked more carefully at the whole design. Thanks!
- VWWHFSfQ 5y agoSo that's what, 4 layers of encapsulation now? Yikes.
- AlchemistCamp 5y agoCoders gonna code.
- braginini 5y agothat is indeed a performance decrease. But the idea of this project is just great! There is another way of combining WebRTC and Wireguard. Netbird uses ICE protocol (used in WebRTC) for NAT traversal and then reuses that punched holes to establish a direct Wireguard tunnel. https://github.com/netbirdio/netbird https://github.com/netbirdio/netbird P.S. I'm author of Netbird (formerly know as Wiretrustee)