Documentation
¶
Index ¶
Constants ¶
View Source
const ( SolictPort = 22434 RouteProto = linkmgr.RouteProto )
Variables ¶
View Source
var SolictIPv6 net.IP = net.ParseIP("fe80:5747:4443:5000::1")
Functions ¶
func IPv6LLForClient ¶
IPv6LLForClient generates the IPv6 link-local client will use for negotiation on the configuration tunnel.
It is determistic and based on the client public key. However, it does not authenticate the client in any way and nor is collision-safe since it coerces 256-bit key into 128-bit IPv6 address with two reserved bytes.
Determistic assignment is needed for tunnel configuration at the server side. WG's "Allowed IPs" cannot say "any IP" for multiple peers on the same interface.
Types ¶
type PeerKey ¶
func NewPeerKey ¶
func (PeerKey) AsPrivateKey ¶
func (k PeerKey) AsPrivateKey() ed25519.PrivateKey
AsPrivateKey converts the ed25519 private key stored in PeerKey to ed25519.PrivateKey.
func (PeerKey) AsPublicKey ¶
AsPrivateKey converts the ed25519 *public* key stored in PeerKey to ed25519.PublicKey.
func (PeerKey) PublicFromPrivate ¶
func (*PeerKey) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.