mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 14:15:06 +03:00
Optional peer authentication, if non-empty then incoming TCP and all UDP peers must match one of these box keys
This commit is contained in:
parent
5962d009a5
commit
6026e0a014
6 changed files with 45 additions and 7 deletions
|
@ -58,6 +58,13 @@ func (n *node) init(cfg *nodeConfig, logger *log.Logger) {
|
|||
panic(err)
|
||||
}
|
||||
n.core.DEBUG_setIfceExpr(ifceExpr)
|
||||
for _, pBoxStr := range cfg.PeerBoxPubs {
|
||||
pbox, err := hex.DecodeString(pBoxStr)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
n.core.DEBUG_addAuthBoxPub(pbox)
|
||||
}
|
||||
|
||||
logger.Println("Starting interface...")
|
||||
n.core.DEBUG_setupAndStartGlobalTCPInterface(cfg.Listen) // Listen for peers on TCP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue