mirror of
https://github.com/netbirdio/netbird.git
synced 2025-07-21 08:22:20 +02:00
23 lines
639 B
Go
23 lines
639 B
Go
package device
|
|
|
|
import (
|
|
"net"
|
|
"net/netip"
|
|
"time"
|
|
|
|
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
|
|
|
"github.com/netbirdio/netbird/client/iface/configurer"
|
|
)
|
|
|
|
type WGConfigurer interface {
|
|
ConfigureInterface(privateKey string, port int) error
|
|
UpdatePeer(peerKey string, allowedIps []netip.Prefix, keepAlive time.Duration, endpoint *net.UDPAddr, preSharedKey *wgtypes.Key) error
|
|
RemovePeer(peerKey string) error
|
|
AddAllowedIP(peerKey string, allowedIP netip.Prefix) error
|
|
RemoveAllowedIP(peerKey string, allowedIP netip.Prefix) error
|
|
Close()
|
|
GetStats() (map[string]configurer.WGStats, error)
|
|
FullStats() (*configurer.Stats, error)
|
|
}
|