2024-10-02 18:24:22 +02:00
|
|
|
package iface
|
|
|
|
|
|
|
|
import (
|
2025-02-07 14:11:53 +01:00
|
|
|
wgdevice "golang.zx2c4.com/wireguard/device"
|
|
|
|
|
2025-02-20 13:22:03 +01:00
|
|
|
"golang.zx2c4.com/wireguard/tun/netstack"
|
|
|
|
|
2024-10-02 18:24:22 +02:00
|
|
|
"github.com/netbirdio/netbird/client/iface/bind"
|
|
|
|
"github.com/netbirdio/netbird/client/iface/device"
|
|
|
|
)
|
|
|
|
|
|
|
|
type WGTunDevice interface {
|
|
|
|
Create(routes []string, dns string, searchDomains []string) (device.WGConfigurer, error)
|
|
|
|
Up() (*bind.UniversalUDPMuxDefault, error)
|
|
|
|
UpdateAddr(address WGAddress) error
|
|
|
|
WgAddress() WGAddress
|
|
|
|
DeviceName() string
|
|
|
|
Close() error
|
|
|
|
FilteredDevice() *device.FilteredDevice
|
2025-02-07 14:11:53 +01:00
|
|
|
Device() *wgdevice.Device
|
2025-02-20 13:22:03 +01:00
|
|
|
GetNet() *netstack.Net
|
2024-10-02 18:24:22 +02:00
|
|
|
}
|