1
0
forked from extern/smegmesh
smegmesh/pkg/wg/stubs.go

21 lines
589 B
Go
Raw Normal View History

2023-11-05 19:03:58 +01:00
package wg
import "golang.zx2c4.com/wireguard/wgctrl/wgtypes"
2023-11-05 19:03:58 +01:00
type WgInterfaceManipulatorStub struct{}
// CreateInterface creates a WireGuard interface
func (w *WgInterfaceManipulatorStub) CreateInterface(port int, privateKey *wgtypes.Key) (string, error) {
return "aninterface", nil
2023-11-05 19:03:58 +01:00
}
// AddAddress adds an address to the given interface name
func (w *WgInterfaceManipulatorStub) AddAddress(ifName string, addr string) error {
return nil
}
// RemoveInterface removes the specified interface
func (w *WgInterfaceManipulatorStub) RemoveInterface(ifName string) error {
2023-11-05 19:03:58 +01:00
return nil
}