Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustGetEnv ¶
Types ¶
type DeviceConfig ¶
type DeviceConfig struct { SecretKey string Endpoint []netip.Addr Peers []PeerConfig DNS []netip.Addr MTU int }
DeviceConfig contains the information to initiate a wireguard connection
func GetDeviceConfig ¶
func GetDeviceConfig() (*DeviceConfig, error)
type DeviceSetting ¶
type DeviceSetting struct {
// contains filtered or unexported fields
}
DeviceSetting contains the parameters for setting up a tun interface
type PeerConfig ¶
Configuration for a wireguard peer
type VirtualTun ¶
type VirtualTun struct {
// contains filtered or unexported fields
}
VirtualTun stores a reference to netstack network and DNS configuration
func StartWireguard ¶
func StartWireguard(conf *DeviceConfig) (*VirtualTun, error)
func (*VirtualTun) SetupForwarding ¶
func (vt *VirtualTun) SetupForwarding() error
Click to show internal directories.
Click to hide internal directories.