Versions in this module Expand all Collapse all v1 v1.8.5 Sep 3, 2023 Changes in this version + var File_proxy_wireguard_config_proto protoreflect.FileDescriptor + func IsDomainName(s string) bool + type DeviceConfig struct + Endpoint []string + Mtu int32 + NumWorkers int32 + Peers []*PeerConfig + Reserved []byte + SecretKey string + func (*DeviceConfig) Descriptor() ([]byte, []int) + func (*DeviceConfig) ProtoMessage() + func (x *DeviceConfig) GetEndpoint() []string + func (x *DeviceConfig) GetMtu() int32 + func (x *DeviceConfig) GetNumWorkers() int32 + func (x *DeviceConfig) GetPeers() []*PeerConfig + func (x *DeviceConfig) GetReserved() []byte + func (x *DeviceConfig) GetSecretKey() string + func (x *DeviceConfig) ProtoReflect() protoreflect.Message + func (x *DeviceConfig) Reset() + func (x *DeviceConfig) String() string + type Handler struct + func New(ctx context.Context, conf *DeviceConfig) (*Handler, error) + func (h *Handler) Process(ctx context.Context, link *transport.Link, dialer internet.Dialer) error + type Net netTun + func CreateNetTUN(localAddresses []netip.Addr, dnsClient dns.Client, mtu int) (tun.Device, *Net, error) + func (n *Net) HasV4() bool + func (n *Net) HasV6() bool + func (net *Net) DialContextTCP(ctx context.Context, addr *net.TCPAddr) (*gonet.TCPConn, error) + func (net *Net) DialContextTCPAddrPort(ctx context.Context, addr netip.AddrPort) (*gonet.TCPConn, error) + func (net *Net) DialTCP(addr *net.TCPAddr) (*gonet.TCPConn, error) + func (net *Net) DialTCPAddrPort(addr netip.AddrPort) (*gonet.TCPConn, error) + func (net *Net) DialUDP(laddr, raddr *net.UDPAddr) (*gonet.UDPConn, error) + func (net *Net) DialUDPAddrPort(laddr, raddr netip.AddrPort) (*gonet.UDPConn, error) + func (net *Net) ListenTCP(addr *net.TCPAddr) (*gonet.TCPListener, error) + func (net *Net) ListenTCPAddrPort(addr netip.AddrPort) (*gonet.TCPListener, error) + func (net *Net) ListenUDP(laddr *net.UDPAddr) (*gonet.UDPConn, error) + func (net *Net) ListenUDPAddrPort(laddr netip.AddrPort) (*gonet.UDPConn, error) + type PeerConfig struct + AllowedIps []string + Endpoint string + KeepAlive int32 + PreSharedKey string + PublicKey string + func (*PeerConfig) Descriptor() ([]byte, []int) + func (*PeerConfig) ProtoMessage() + func (x *PeerConfig) GetAllowedIps() []string + func (x *PeerConfig) GetEndpoint() string + func (x *PeerConfig) GetKeepAlive() int32 + func (x *PeerConfig) GetPreSharedKey() string + func (x *PeerConfig) GetPublicKey() string + func (x *PeerConfig) ProtoReflect() protoreflect.Message + func (x *PeerConfig) Reset() + func (x *PeerConfig) String() string