mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-23 02:36:42 +00:00
18 lines
268 B
Go
18 lines
268 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()),
|
|
Zone: e.Addr().Zone(),
|
|
}
|
|
}
|