Documentation
¶
Index ¶
Constants ¶
View Source
const ( // default proxy port NmProxyPort = 51722 // default CIDR for proxy peers DefaultCIDR = "127.0.0.1/8" )
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
IsRelayed bool
RelayedEndpoint *net.UDPAddr
Config Proxy
StopConn func()
ResetConn func()
LocalConn net.Conn
Mutex *sync.RWMutex
NetworkSettings map[string]Settings
ServerMap map[string]struct{}
}
Conn is a peer Connection configuration
type HostInfo ¶
type HostInfo struct {
PublicIp net.IP
PrivIp net.IP
PubPort int
PrivPort int
ProxyEnabled bool
NatType string
}
HostInfo - struct for host information
type Proxy ¶
type Proxy struct {
PeerPublicKey wgtypes.Key
IsExtClient bool
PeerConf wgtypes.PeerConfig
PeerEndpoint *net.UDPAddr
RemoteConnAddr *net.UDPAddr
LocalConnAddr *net.UDPAddr
TurnConn net.PacketConn
ListenPort int
ProxyListenPort int
ProxyStatus bool
UsingTurn bool
}
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 Settings ¶
type Settings struct {
IsRelay bool
IsIngressGateway bool
IsEgressGateway bool
IsRelayed bool
RelayedTo *net.UDPAddr
}
Settings - struct for host settings
Click to show internal directories.
Click to hide internal directories.