internal

package
v0.0.0-...-760ee81 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApiDomain

func ApiDomain() string

func AuthKey

func AuthKey() string

func BackgroundLogger

func BackgroundLogger(d time.Duration)

func DialWg

func DialWg(ctx context.Context, network, address string) (net.Conn, error)

func GetEncodedIPPort

func GetEncodedIPPort(addr netip.AddrPort) string

func GetIPForKey

func GetIPForKey(pub wgtypes.Key) netip.Addr

func GetListenPort

func GetListenPort() int

func GetLocalWgIp

func GetLocalWgIp() netip.Addr

func GetPublicKey

func GetPublicKey() wgtypes.Key

func GetTLSConfig

func GetTLSConfig() *tls.Config

func GetWgDeviceInfo

func GetWgDeviceInfo() (*wgtypes.Device, error)

func Initialize

func Initialize() error

func Keystorage

func Keystorage() string

func ListenTCPWg

func ListenTCPWg(addr *net.TCPAddr) (net.Listener, error)

func LookupEncodedIPPort

func LookupEncodedIPPort(sni string) *netip.AddrPort

func Must

func Must[T any](v T, err error) T

func RelayServer

func RelayServer(tcpConn net.Conn, udpConn *net.UDPConn, addr net.Addr) error

func SSLCertificateEmail

func SSLCertificateEmail() string

func ServerIp

func ServerIp() string

func TestOnlyRunLocalhost

func TestOnlyRunLocalhost() bool

func UseRelay

func UseRelay() bool

func WgSetIpc

func WgSetIpc(ins []string) error

Types

type AddPeerReq

type AddPeerReq struct {
	Key []byte
}

type AddPeerResp

type AddPeerResp struct {
	Key      []byte
	Endpoint string
}

Jump to

Keyboard shortcuts

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