debug logs

This commit is contained in:
Abhishek Kondur 2022-11-15 16:04:11 +05:30
parent eed290c4dd
commit a05193f6bb
2 changed files with 4 additions and 1 deletions

View file

@ -270,6 +270,7 @@ func (m *ManagerAction) AddInterfaceToProxy() error {
Interface: ifaceName,
PeerKey: peerI.PublicKey.String(),
IsExtClient: peerConf.IsExtClient,
Endpoint: peerI.Endpoint,
IsAttachedExtClient: peerConf.IsAttachedExtClient,
}
}
@ -340,5 +341,7 @@ func (m *ManagerAction) AddInterfaceToProxy() error {
peerConf.IsExtClient, peerConf.IsAttachedExtClient, relayedTo)
}
log.Printf("------> PEERHASHMAP: %+v\n", common.PeerKeyHashMap)
log.Printf("-------> WgKeyHashMap: %+v\n", common.WgIfaceKeyMap)
log.Printf("-------> WgIFaceMap: %+v\n", common.WgIFaceMap)
return nil
}

View file

@ -69,7 +69,7 @@ func (p *ProxyServer) Listen(ctx context.Context) {
log.Printf("-------->Forwarding the pkt to extClient [ SourceIP: %s ], [ SourceKeyHash: %s ], [ DstIP: %s ], [ DstHashKey: %s ] \n",
source.String(), srcPeerKeyHash, val.Endpoint.String(), dstPeerKeyHash)
_, err = NmProxyServer.Server.WriteToUDP(buffer[:n+32], val.Endpoint)
_, err = NmProxyServer.Server.WriteToUDP(buffer[:n], val.Endpoint)
if err != nil {
log.Println("Failed to send to remote: ", err)
}