mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-23 05:49:07 +02:00
18 lines
284 B
Go
18 lines
284 B
Go
package bind
|
|
|
|
import (
|
|
"net"
|
|
|
|
"github.com/netbirdio/netbird/client/iface/wgbackend"
|
|
)
|
|
|
|
type Endpoint = wgbackend.StdNetEndpoint
|
|
|
|
func EndpointToUDPAddr(e Endpoint) *net.UDPAddr {
|
|
return &net.UDPAddr{
|
|
IP: e.Addr().AsSlice(),
|
|
Port: int(e.Port()),
|
|
Zone: e.Addr().Zone(),
|
|
}
|
|
}
|