mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 14:15:06 +03:00
Link refactor (#941)
* Link refactoring * More refactoring * More tweaking * Cleaner shutdowns, UNIX socket support, more tweaks * Actorise links, remove mutex * SOCKS support
This commit is contained in:
parent
414aaf6eb9
commit
5ef61faeff
18 changed files with 738 additions and 698 deletions
|
@ -14,10 +14,6 @@ func (c *Core) _applyOption(opt SetupOption) {
|
|||
c.config.nodeinfo = v
|
||||
case NodeInfoPrivacy:
|
||||
c.config.nodeinfoPrivacy = v
|
||||
case IfName:
|
||||
c.config.ifname = v
|
||||
case IfMTU:
|
||||
c.config.ifmtu = v
|
||||
case AllowedPublicKey:
|
||||
pk := [32]byte{}
|
||||
copy(pk[:], v)
|
||||
|
@ -36,14 +32,10 @@ type Peer struct {
|
|||
}
|
||||
type NodeInfo map[string]interface{}
|
||||
type NodeInfoPrivacy bool
|
||||
type IfName string
|
||||
type IfMTU uint16
|
||||
type AllowedPublicKey ed25519.PublicKey
|
||||
|
||||
func (a ListenAddress) isSetupOption() {}
|
||||
func (a Peer) isSetupOption() {}
|
||||
func (a NodeInfo) isSetupOption() {}
|
||||
func (a NodeInfoPrivacy) isSetupOption() {}
|
||||
func (a IfName) isSetupOption() {}
|
||||
func (a IfMTU) isSetupOption() {}
|
||||
func (a AllowedPublicKey) isSetupOption() {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue