mirror of
https://github.com/netbirdio/netbird.git
synced 2025-03-13 14:18:47 +01:00
17 lines
243 B
Go
17 lines
243 B
Go
package bind
|
|
|
|
import (
|
|
"net"
|
|
|
|
wgConn "golang.zx2c4.com/wireguard/conn"
|
|
)
|
|
|
|
type Endpoint = wgConn.StdNetEndpoint
|
|
|
|
func EndpointToUDPAddr(e Endpoint) *net.UDPAddr {
|
|
return &net.UDPAddr{
|
|
IP: e.Addr().AsSlice(),
|
|
Port: int(e.Port()),
|
|
}
|
|
}
|