ctrl_client

package
v0.0.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 7 Imported by: 0

README

wgctrl comment:

在wgctrl-go 库的README文件最下面有一段话: This package implements WireGuard configuration protocol operations, enabling the configuration of existing WireGuard devices. Operations such as creating WireGuard devices, or applying IP addresses to those devices, are out of scope for this package.

这说明: 1,创建wg interface 配置ip都需要我们单独找方法去做,wgctrl不实现这些功能 2. wgctrl 只负责把配置写入wg device(也就是interface)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WgCtrlClient

type WgCtrlClient struct {
	base_client.WGClient
	// contains filtered or unexported fields
}

func NewClient

func NewClient(baseClient *base_client.WGClient) *WgCtrlClient

func (*WgCtrlClient) CheckInterface

func (c *WgCtrlClient) CheckInterface(iface string) error

func (*WgCtrlClient) Close

func (c *WgCtrlClient) Close(iface string) error

func (*WgCtrlClient) CloseAll

func (c *WgCtrlClient) CloseAll() error

func (*WgCtrlClient) DownInterface

func (c *WgCtrlClient) DownInterface(iface string) error

func (*WgCtrlClient) Init

func (c *WgCtrlClient) Init() error

func (*WgCtrlClient) UpInterface

func (c *WgCtrlClient) UpInterface(iface string) error

func (*WgCtrlClient) UpdateConfig

func (c *WgCtrlClient) UpdateConfig(iface string, replacePeers bool) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL