2023-11-05 19:03:58 +01:00
|
|
|
package wg
|
|
|
|
|
2023-12-22 22:47:56 +01:00
|
|
|
import "golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
|
|
|
|
2023-11-05 19:03:58 +01:00
|
|
|
type WgInterfaceManipulatorStub struct{}
|
|
|
|
|
2023-12-22 22:47:56 +01:00
|
|
|
// 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
|
|
|
}
|
|
|
|
|
2023-12-22 22:47:56 +01:00
|
|
|
// AddAddress adds an address to the given interface name
|
|
|
|
func (w *WgInterfaceManipulatorStub) AddAddress(ifName string, addr string) error {
|
2023-11-07 20:48:53 +01:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2023-12-22 22:47:56 +01:00
|
|
|
// RemoveInterface removes the specified interface
|
|
|
|
func (w *WgInterfaceManipulatorStub) RemoveInterface(ifName string) error {
|
2023-11-05 19:03:58 +01:00
|
|
|
return nil
|
|
|
|
}
|