wireguard

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient added in v0.3.3

func NewClient(conf *protocol.Protocol_Wireguard) point.WrapProxy

Types

type Endpoint added in v0.3.4

type Endpoint netip.AddrPort

func (Endpoint) ClearSrc added in v0.3.4

func (e Endpoint) ClearSrc()

func (Endpoint) DstIP added in v0.3.4

func (e Endpoint) DstIP() netip.Addr

func (Endpoint) DstToBytes added in v0.3.4

func (e Endpoint) DstToBytes() []byte

func (Endpoint) DstToString added in v0.3.4

func (e Endpoint) DstToString() string

func (Endpoint) SrcIP added in v0.3.4

func (e Endpoint) SrcIP() netip.Addr

func (Endpoint) SrcToString added in v0.3.4

func (e Endpoint) SrcToString() string

type Net

type Net netTun

func CreateNetTUN

func CreateNetTUN(localAddresses []netip.Prefix, mtu int) (tun.Device, *Net, error)

func (*Net) DialContextTCP

func (net *Net) DialContextTCP(ctx context.Context, addr *net.TCPAddr) (*gonet.TCPConn, error)

func (*Net) DialContextTCPAddrPort

func (net *Net) DialContextTCPAddrPort(ctx context.Context, addr netip.AddrPort) (*gonet.TCPConn, error)

func (*Net) DialTCP

func (net *Net) DialTCP(addr *net.TCPAddr) (*gonet.TCPConn, error)

func (*Net) DialTCPAddrPort

func (net *Net) DialTCPAddrPort(addr netip.AddrPort) (*gonet.TCPConn, error)

func (*Net) DialUDP

func (net *Net) DialUDP(laddr, raddr *net.UDPAddr) (*gonet.UDPConn, error)

func (*Net) DialUDPAddrPort

func (net *Net) DialUDPAddrPort(laddr, raddr netip.AddrPort) (*gonet.UDPConn, error)

func (*Net) HasV4

func (n *Net) HasV4() bool

func (*Net) HasV6

func (n *Net) HasV6() bool

func (*Net) ListenTCP

func (net *Net) ListenTCP(addr *net.TCPAddr) (*gonet.TCPListener, error)

func (*Net) ListenTCPAddrPort

func (net *Net) ListenTCPAddrPort(addr netip.AddrPort) (*gonet.TCPListener, error)

func (*Net) ListenUDP

func (net *Net) ListenUDP(laddr *net.UDPAddr) (*gonet.UDPConn, error)

func (*Net) ListenUDPAddrPort

func (net *Net) ListenUDPAddrPort(laddr netip.AddrPort) (*gonet.UDPConn, error)

type Wireguard

type Wireguard struct {
	netapi.EmptyDispatch
	// contains filtered or unexported fields
}

func (*Wireguard) Conn

func (w *Wireguard) Conn(ctx context.Context, addr netapi.Address) (net.Conn, error)

func (*Wireguard) PacketConn

func (w *Wireguard) PacketConn(ctx context.Context, addr netapi.Address) (net.PacketConn, error)

Jump to

Keyboard shortcuts

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