Documentation
¶
Overview ¶
Package wgnet provides a thin frontend for user-space VPN connections using the Go wireguard implementation running on the gVisor user-space network stack
Index ¶
- type Configuration
- type Device
- func (d *Device) AddPeer(publicKey string, clientIP netip.Addr) error
- func (d *Device) Close() error
- func (d *Device) Dial(network, address string) (net.Conn, error)
- func (d *Device) DialContext(ctx context.Context, network, address string) (net.Conn, error)
- func (d *Device) DialTCP(addr *net.TCPAddr) (net.Conn, error)
- func (d *Device) ListenTCP(addr *net.TCPAddr) (net.Listener, error)
- type Key
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct {
MyIPv4 netip.Addr
PrivateKey string
DNS []netip.Addr
MTU int
ServerPublicKey string
ServerEndpoint string
PersistentKeepaliveInterval int
}
func NewDefaultConfiguration ¶
func NewDefaultConfiguration() *Configuration
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
func NewDevice ¶
func NewDevice(c *Configuration) (*Device, error)
func (*Device) DialContext ¶
Click to show internal directories.
Click to hide internal directories.