raw_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: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEF_CONF_FOLDER string = "/etc/wireguard"
)

Variables

This section is empty.

Functions

func AddOrUpdateSectionKeyValue

func AddOrUpdateSectionKeyValue(section *ini.Section, key string, value string) error

func CheckConfFile added in v0.0.19

func CheckConfFile(confFolder string, iface string) (fullPath string, err error)

check and create file, return the full path

Types

type WgRawClient

type WgRawClient struct {
	base_client.WGClient
}

func NewClient

func NewClient(cli *base_client.WGClient) *WgRawClient

func (*WgRawClient) CheckInterface

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

func (*WgRawClient) Close

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

func (*WgRawClient) CloseAll

func (c *WgRawClient) CloseAll() error

func (*WgRawClient) UpdateConfig

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

type WireGuardConfig

type WireGuardConfig struct {
	Interface wgInterfaceCfg `ini:"Interface"`
	Peer      []wgPeerCfg    `ini:"Peer"`
}

Jump to

Keyboard shortcuts

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