wg

package
v0.0.0-...-958bab4 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PrivateKey    string   `yaml:"private_key"`
	PeerPublicKey string   `yaml:"peer_public_key"`
	Endpoint      string   `yaml:"endpoint"`
	Domain        string   `yaml:"domain"`
	Address       string   `yaml:"address"`
	DNS           []string `yaml:"dns"`
}

type Protocol

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

func New

func New(ctx context.Context, cfg *Config) (*Protocol, error)

func (*Protocol) HandleTCP

func (p *Protocol) HandleTCP(conn net.Conn)

func (*Protocol) HandleUDP

func (p *Protocol) HandleUDP(conn net.Conn)

func (*Protocol) LookupHost

func (p *Protocol) LookupHost(ctx context.Context, req *dns.Msg) (*dns.Msg, error)

Jump to

Keyboard shortcuts

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