Documentation ¶
Index ¶
- func ConfigureForwarding(wgIface string, gatewayIface string, cidr string) error
- func ConfigureRouting(wgIface string, cidr string) error
- func ExecUserWireGuard(wgcommand string, ifaceName string) error
- func MustParseCIDR(cidr string) (net.IP, *net.IPNet)
- func MustParseIP(ip string) net.IP
- func ServerVPNIP(cidr string) *net.IPNet
- type DNSServer
- type DeviceManager
- type WireGuard
- func (s *WireGuard) AddPeer(publicKey string, addressCIDR string) error
- func (s *WireGuard) Close() error
- func (s *WireGuard) DNS() string
- func (s *WireGuard) Device() (*wgtypes.Device, error)
- func (s *WireGuard) Endpoint() string
- func (s *WireGuard) HasPeer(publicKey string) bool
- func (s *WireGuard) ListPeers() ([]wgtypes.Peer, error)
- func (s *WireGuard) Peer(publicKey string) (*wgtypes.Peer, error)
- func (s *WireGuard) PublicKey() string
- func (s *WireGuard) RemovePeer(publicKey string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureForwarding ¶
func ConfigureRouting ¶
func ExecUserWireGuard ¶
func MustParseIP ¶
func ServerVPNIP ¶
Types ¶
type DNSServer ¶
type DNSServer struct {
// contains filtered or unexported fields
}
func NewDNSServer ¶
type DeviceManager ¶
type DeviceManager struct {
// contains filtered or unexported fields
}
func NewDeviceManager ¶
func NewDeviceManager(w *WireGuard, s storage.Storage, cidr string) *DeviceManager
func (*DeviceManager) DeleteDevice ¶
func (d *DeviceManager) DeleteDevice(user string, name string) error
func (*DeviceManager) ListDevices ¶
func (d *DeviceManager) ListDevices(user string) ([]*storage.Device, error)
func (*DeviceManager) Sync ¶
func (d *DeviceManager) Sync() error
type WireGuard ¶
type WireGuard struct {
// contains filtered or unexported fields
}
func NewWireGuard ¶
func (*WireGuard) RemovePeer ¶
Click to show internal directories.
Click to hide internal directories.