forked from extern/smegmesh
7be11dbaa3
Removed a client's grpc endpoint value. Client's aren't publicly available so there is no need for a client's gRPC endpoint. Also changed a node ID's to their public key. A node id's public address is an issue for mobility of clients as their endpoint is subject to change
21 lines
508 B
Go
21 lines
508 B
Go
package wg
|
|
|
|
import "golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
|
|
|
type WgError struct {
|
|
msg string
|
|
}
|
|
|
|
func (m *WgError) Error() string {
|
|
return m.msg
|
|
}
|
|
|
|
type WgInterfaceManipulator interface {
|
|
// CreateInterface creates a WireGuard interface
|
|
CreateInterface(port int, privateKey *wgtypes.Key) (string, error)
|
|
// AddAddress adds an address to the given interface name
|
|
AddAddress(ifName string, addr string) error
|
|
// RemoveInterface removes the specified interface
|
|
RemoveInterface(ifName string) error
|
|
}
|