wg

package
v0.0.190 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LocalPrivateKey PrivateKey `toml:"local_private_key"`
	LocalNetwork    *IPNet     `toml:"local_network"`

	RemotePublicKey PublicKey `toml:"remote_public_key"`
	RemoteNetwork   *IPNet    `toml:"remote_network"`

	Endpoint  string `toml:"endpoint"`
	DNS       net.IP `toml:"dns"`
	KeepAlive int    `toml:"keepalive"`
	MTU       int    `toml:"mtu"`
	LogLevel  int    `toml:"log_level"`
}

type IPNet

type IPNet net.IPNet

func (*IPNet) MarshalText

func (n *IPNet) MarshalText() ([]byte, error)

func (*IPNet) String

func (n *IPNet) String() string

func (*IPNet) UnmarshalText

func (n *IPNet) UnmarshalText(text []byte) error

type PrivateKey

type PrivateKey device.NoisePrivateKey

func (PrivateKey) MarshalText

func (pk PrivateKey) MarshalText() ([]byte, error)

func (PrivateKey) ToHex

func (pk PrivateKey) ToHex() string

func (*PrivateKey) UnmarshalText

func (pk *PrivateKey) UnmarshalText(text []byte) error

type PublicKey

type PublicKey device.NoisePublicKey

func (PublicKey) MarshalText

func (pk PublicKey) MarshalText() ([]byte, error)

func (PublicKey) ToHex

func (pk PublicKey) ToHex() string

func (*PublicKey) UnmarshalText

func (pk *PublicKey) UnmarshalText(text []byte) error

type Tunnel

type Tunnel struct {
	// contains filtered or unexported fields
}

func Connect

func Connect(cfg Config) (*Tunnel, error)

func (*Tunnel) Close

func (t *Tunnel) Close() error

func (*Tunnel) DialContext

func (t *Tunnel) DialContext(ctx context.Context, network, addr string) (net.Conn, error)

func (*Tunnel) Resolver

func (t *Tunnel) Resolver() *net.Resolver

Jump to

Keyboard shortcuts

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