Documentation ¶
Index ¶
- Constants
- type Core
- func (c *Core) AddAllowedEncryptionPublicKey(boxStr string) error
- func (c *Core) AddMulticastInterfaceExpr(expr *regexp.Regexp)
- func (c *Core) AddPeer(addr string, sintf string) error
- func (c *Core) GetAddress() *net.IP
- func (c *Core) GetAdminDefaultListen() string
- func (c *Core) GetNodeID() *NodeID
- func (c *Core) GetSubnet() *net.IPNet
- func (c *Core) GetTUNDefaultIfMTU() int
- func (c *Core) GetTUNDefaultIfName() string
- func (c *Core) GetTUNDefaultIfTAPMode() bool
- func (c *Core) GetTUNIfMTU() int
- func (c *Core) GetTUNIfName() string
- func (c *Core) GetTUNMaximumIfMTU() int
- func (c *Core) GetTreeID() *TreeID
- func (c *Core) NewEncryptionKeys() (*boxPubKey, *boxPrivKey)
- func (c *Core) NewSigningKeys() (*sigPubKey, *sigPrivKey)
- func (c *Core) SetLogger(log *log.Logger)
- func (c *Core) Start(nc *config.NodeConfig, log *log.Logger) error
- func (c *Core) Stop()
- type NodeID
- type TreeID
Constants ¶
const NodeIDLen = sha512.Size
const TreeIDLen = sha512.Size
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Core ¶
type Core struct {
// contains filtered or unexported fields
}
The Core object represents the Yggdrasil node. You should create a Core object for each Yggdrasil node you plan to run.
func (*Core) AddAllowedEncryptionPublicKey ¶ added in v0.2.0
Adds an allowed public key. This allow peerings to be restricted only to keys that you have selected.
func (*Core) AddMulticastInterfaceExpr ¶ added in v0.2.0
Adds an expression to select multicast interfaces for peer discovery. This should be done before calling Start. This function can be called multiple times to add multiple search expressions.
func (*Core) AddPeer ¶ added in v0.2.0
Adds a peer. This should be specified in the peer URI format, i.e. tcp://a.b.c.d:e, udp://a.b.c.d:e, socks://a.b.c.d:e/f.g.h.i:j
func (*Core) GetAddress ¶ added in v0.2.0
Gets the IPv6 address of the Yggdrasil node. This is always a /128.
func (*Core) GetAdminDefaultListen ¶ added in v0.2.7
Gets the default admin listen address for your platform.
func (*Core) GetSubnet ¶ added in v0.2.0
Gets the routed IPv6 subnet of the Yggdrasil node. This is always a /64.
func (*Core) GetTUNDefaultIfMTU ¶ added in v0.2.0
Gets the default TUN/TAP interface MTU for your platform. This can be as high as 65535, depending on platform, but is never lower than 1280.
func (*Core) GetTUNDefaultIfName ¶ added in v0.2.0
Gets the default TUN/TAP interface name for your platform.
func (*Core) GetTUNDefaultIfTAPMode ¶ added in v0.2.0
Gets the default TUN/TAP interface mode for your platform.
func (*Core) GetTUNIfMTU ¶ added in v0.2.0
Gets the current TUN/TAP interface MTU.
func (*Core) GetTUNIfName ¶ added in v0.2.0
Gets the current TUN/TAP interface name.
func (*Core) GetTUNMaximumIfMTU ¶ added in v0.2.0
Gets the maximum supported TUN/TAP interface MTU for your platform. This can be as high as 65535, depending on platform, but is never lower than 1280.
func (*Core) NewEncryptionKeys ¶ added in v0.2.0
func (c *Core) NewEncryptionKeys() (*boxPubKey, *boxPrivKey)
Generates a new encryption keypair. The encryption keys are used to encrypt traffic and to derive the IPv6 address/subnet of the node.
func (*Core) NewSigningKeys ¶ added in v0.2.0
func (c *Core) NewSigningKeys() (*sigPubKey, *sigPrivKey)
Generates a new signing keypair. The signing keys are used to derive the structure of the spanning tree.
func (*Core) SetLogger ¶ added in v0.2.0
Sets the output logger of the Yggdrasil node after startup. This may be useful if you want to redirect the output later.