-
-
Notifications
You must be signed in to change notification settings - Fork 581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Share kernel Wireguard port with raw socket #826
Conversation
- rename mutex - add comment
This is initial changes to support shared port between stun (ICE agent) and the kernel wireguard
# Conflicts: # go.mod # go.sum
add exported function comment
select { | ||
case <-s.ctx.Done(): | ||
return | ||
case s.packetDemux <- rcvdPacket{n, addr, buf[:], err}: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make no sense to create a new buf slice with the same content. Just pass the buf variable.
|
||
decodedLayers := make([]gopacket.LayerType, 0, 3) | ||
|
||
err = parser.DecodeLayers(pkt.buf[:], &decodedLayers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point the buf is may half empty. Maybe we should handle the N variable to reduca the len of the slice.
This PR brings support of a shared port between stun (ICE agent) and the kernel WireGuard It implements a single port mode for execution with kernel WireGuard interface using a raw socket listener. BPF filters ensure that only STUN packets hit the NetBird userspace app Removed a lot of the proxy logic and direct mode exchange. Now we are doing an extra hole punch to the remote WireGuard port for best-effort cases and support to old client's direct mode.
Describe your changes
This is initial changes to support shared port between stun (ICE agent) and
the kernel Wireguard
Implement single port mode for execution with kernel Wireguard interfaces using a raw socket listener.
BPF filters ensure that only stun packets hit the raw socket
Removed a lot of the proxy logic and direct mode exchange
now we are doing an extra hole punch to the remote wireguard port for best-effort cases and support to old client's direct mode.
Issue ticket number and link
Checklist