mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-23 08:33:45 +01:00
ecac82a5ae
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.
15 lines
305 B
Go
15 lines
305 B
Go
//go:build !linux
|
|
|
|
package sharedsock
|
|
|
|
import (
|
|
"fmt"
|
|
"net"
|
|
"runtime"
|
|
)
|
|
|
|
// Listen is not supported on other platforms
|
|
func Listen(port int, filter BPFFilter) (net.PacketConn, error) {
|
|
return nil, fmt.Errorf(fmt.Sprintf("Not supported OS %s. SharedSocket is only supported on Linux", runtime.GOOS))
|
|
}
|