WIP adding crawling debug packets

This commit is contained in:
Arceliar 2021-05-22 19:54:52 -05:00
parent b11cf7a2f2
commit 8668abf481
4 changed files with 130 additions and 0 deletions

View file

@ -47,6 +47,7 @@ type TunAdapter struct {
isEnabled bool // Used by the writer to drop sessionTraffic if not enabled
gatekeeper func(pubkey ed25519.PublicKey, initiator bool) bool
nodeinfo nodeinfo
debug debugHandler
}
func (tun *TunAdapter) SetSessionGatekeeper(gatekeeper func(pubkey ed25519.PublicKey, initiator bool) bool) {
@ -113,6 +114,7 @@ func (tun *TunAdapter) Init(core *yggdrasil.Core, config *config.NodeState, log
if err := tun.core.SetOutOfBandHandler(tun.oobHandler); err != nil {
return fmt.Errorf("tun.core.SetOutOfBandHander: %w", err)
}
tun.debug.init(tun)
return nil
}