4
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2025-07-13 12:56:29 +00:00

Add FriendlyName option, show friendly name and real endpoint in admin socket/yggdrasilctl

This commit is contained in:
Neil Alexander
2018-10-21 17:57:48 +01:00
parent a9f72a6ee1
commit b809adf981
7 changed files with 67 additions and 40 deletions

View File

@ -47,7 +47,7 @@ func (r *router) init(core *Core) {
r.core = core
r.addr = *address_addrForNodeID(&r.core.dht.nodeID)
in := make(chan []byte, 32) // TODO something better than this...
p := r.core.peers.newPeer(&r.core.boxPub, &r.core.sigPub, &boxSharedKey{})
p := r.core.peers.newPeer(&r.core.boxPub, &r.core.sigPub, &boxSharedKey{}, "(self)", r.core.GetFriendlyName())
p.out = func(packet []byte) {
// This is to make very sure it never blocks
select {