mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 06:35:07 +03:00
Show proto in admin socket, link linkInfo from peer, other fixes
This commit is contained in:
parent
2b8648e2b3
commit
61774aed3b
6 changed files with 34 additions and 36 deletions
|
@ -67,7 +67,15 @@ func (r *router) init(core *Core) {
|
|||
r.addr = *address.AddrForNodeID(&r.core.dht.nodeID)
|
||||
r.subnet = *address.SubnetForNodeID(&r.core.dht.nodeID)
|
||||
in := make(chan []byte, 1) // TODO something better than this...
|
||||
p := r.core.peers.newPeer(&r.core.boxPub, &r.core.sigPub, &crypto.BoxSharedKey{}, "(self)", nil)
|
||||
self := linkInterface{
|
||||
name: "(self)",
|
||||
info: linkInfo{
|
||||
local: "(self)",
|
||||
remote: "(self)",
|
||||
linkType: "self",
|
||||
},
|
||||
}
|
||||
p := r.core.peers.newPeer(&r.core.boxPub, &r.core.sigPub, &crypto.BoxSharedKey{}, &self, nil)
|
||||
p.out = func(packet []byte) { in <- packet }
|
||||
r.in = in
|
||||
out := make(chan []byte, 32)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue