mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 06:35:07 +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
|
@ -397,6 +397,12 @@ func (c *Core) DEBUG_setIfceExpr(expr *regexp.Regexp) {
|
|||
c.ifceExpr = expr
|
||||
}
|
||||
|
||||
func (c *Core) DEBUG_addAuthBoxPub(boxBytes []byte) {
|
||||
var box boxPubKey
|
||||
copy(box[:], boxBytes)
|
||||
c.peers.authBoxPubs[box] = struct{}{}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
func DEBUG_simLinkPeers(p, q *peer) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue