Documentation ¶
Index ¶
- Constants
- Variables
- type KernelConfigurer
- func (c *KernelConfigurer) AddAllowedIP(peerKey string, allowedIP string) error
- func (c *KernelConfigurer) Close()
- func (c *KernelConfigurer) ConfigureInterface(privateKey string, port int) error
- func (c *KernelConfigurer) GetStats(peerKey string) (WGStats, error)
- func (c *KernelConfigurer) RemoveAllowedIP(peerKey string, allowedIP string) error
- func (c *KernelConfigurer) RemovePeer(peerKey string) error
- func (c *KernelConfigurer) UpdatePeer(peerKey string, allowedIps string, keepAlive time.Duration, ...) error
- type WGStats
- type WGUSPConfigurer
- func (c *WGUSPConfigurer) AddAllowedIP(peerKey string, allowedIP string) error
- func (t *WGUSPConfigurer) Close()
- func (c *WGUSPConfigurer) ConfigureInterface(privateKey string, port int) error
- func (t *WGUSPConfigurer) GetStats(peerKey string) (WGStats, error)
- func (c *WGUSPConfigurer) RemoveAllowedIP(peerKey string, ip string) error
- func (c *WGUSPConfigurer) RemovePeer(peerKey string) error
- func (c *WGUSPConfigurer) UpdatePeer(peerKey string, allowedIps string, keepAlive time.Duration, ...) error
Constants ¶
View Source
const WgInterfaceDefault = "wt0"
WgInterfaceDefault is a default interface name of Wiretrustee
Variables ¶
View Source
var ErrAllowedIPNotFound = fmt.Errorf("allowed IP not found")
View Source
var ErrPeerNotFound = errors.New("peer not found")
Functions ¶
This section is empty.
Types ¶
type KernelConfigurer ¶
type KernelConfigurer struct {
// contains filtered or unexported fields
}
func NewKernelConfigurer ¶
func NewKernelConfigurer(deviceName string) *KernelConfigurer
func (*KernelConfigurer) AddAllowedIP ¶
func (c *KernelConfigurer) AddAllowedIP(peerKey string, allowedIP string) error
func (*KernelConfigurer) Close ¶
func (c *KernelConfigurer) Close()
func (*KernelConfigurer) ConfigureInterface ¶
func (c *KernelConfigurer) ConfigureInterface(privateKey string, port int) error
func (*KernelConfigurer) GetStats ¶
func (c *KernelConfigurer) GetStats(peerKey string) (WGStats, error)
func (*KernelConfigurer) RemoveAllowedIP ¶
func (c *KernelConfigurer) RemoveAllowedIP(peerKey string, allowedIP string) error
func (*KernelConfigurer) RemovePeer ¶
func (c *KernelConfigurer) RemovePeer(peerKey string) error
type WGUSPConfigurer ¶
type WGUSPConfigurer struct {
// contains filtered or unexported fields
}
func NewUSPConfigurer ¶
func NewUSPConfigurer(device *device.Device, deviceName string) *WGUSPConfigurer
func (*WGUSPConfigurer) AddAllowedIP ¶
func (c *WGUSPConfigurer) AddAllowedIP(peerKey string, allowedIP string) error
func (*WGUSPConfigurer) Close ¶
func (t *WGUSPConfigurer) Close()
func (*WGUSPConfigurer) ConfigureInterface ¶
func (c *WGUSPConfigurer) ConfigureInterface(privateKey string, port int) error
func (*WGUSPConfigurer) GetStats ¶
func (t *WGUSPConfigurer) GetStats(peerKey string) (WGStats, error)
func (*WGUSPConfigurer) RemoveAllowedIP ¶
func (c *WGUSPConfigurer) RemoveAllowedIP(peerKey string, ip string) error
func (*WGUSPConfigurer) RemovePeer ¶
func (c *WGUSPConfigurer) RemovePeer(peerKey string) error
Click to show internal directories.
Click to hide internal directories.