Documentation
¶
Index ¶
Constants ¶
View Source
const ( // default proxy port NmProxyPort = 51722 // default CIDR for proxy peers DefaultCIDR = "127.0.0.1/8" // PersistentKeepaliveInterval - default keepalive for wg peer DefaultPersistentKeepaliveInterval = time.Duration(time.Second * 20) )
Variables ¶
This section is empty.
Functions ¶
func ConvPeerKeyToHash ¶
ConvPeerKeyToHash - converts peer key to a md5 hash
Types ¶
type Conn ¶
type Conn struct {
// Key is a public key of a remote peer
Key wgtypes.Key
RelayedEndpoint *net.UDPAddr
Config Proxy
StopConn func()
ResetConn func()
LocalConn net.Conn
Mutex *sync.RWMutex
}
Conn is a peer Connection configuration
type Proxy ¶
type Proxy struct {
PeerPublicKey wgtypes.Key
PeerConf wgtypes.PeerConfig
PeerEndpoint *net.UDPAddr
RemoteConnAddr *net.UDPAddr
LocalConnAddr *net.UDPAddr
TurnConn net.PacketConn
}
Proxy - struct for proxy config
type RemotePeer ¶
type RemotePeer struct {
PeerKey string
Endpoint *net.UDPAddr
LocalConn net.Conn
CancelFunc context.CancelFunc
CommChan chan *net.UDPAddr
}
RemotePeer - struct remote peer data
type TurnCfg ¶ added in v0.19.0
type TurnCfg struct {
Mutex *sync.RWMutex
Cfg *turn.ClientConfig
Client *turn.Client
TurnConn net.PacketConn
Status bool
}
TurnCfg - struct to hold turn conn details
type TurnPeerCfg ¶ added in v0.19.0
TurnPeerCfg - struct for peer turn conn details
Click to show internal directories.
Click to hide internal directories.