mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-07 16:54:16 +01:00
1de3bb5420
Add netstack support for the agent to run it without privileges. - use interface for tun device - use common IPC for userspace WireGuard integration - move udpmux creation and sharedsock to tun layer
18 lines
457 B
Go
18 lines
457 B
Go
package iface
|
|
|
|
import (
|
|
"net"
|
|
"time"
|
|
|
|
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
|
)
|
|
|
|
type wgConfigurer interface {
|
|
configureInterface(privateKey string, port int) error
|
|
updatePeer(peerKey string, allowedIps string, keepAlive time.Duration, endpoint *net.UDPAddr, preSharedKey *wgtypes.Key) error
|
|
removePeer(peerKey string) error
|
|
addAllowedIP(peerKey string, allowedIP string) error
|
|
removeAllowedIP(peerKey string, allowedIP string) error
|
|
close()
|
|
}
|