add ext client check for endpoint nil

This commit is contained in:
Abhishek Kondur 2022-11-14 19:18:17 +05:30
parent eb1aa3a386
commit 467cf81000

View file

@ -280,6 +280,7 @@ func (m *ManagerAction) AddInterfaceToProxy() error {
defer func() {
if addExtClient {
log.Println("GOT ENDPOINT for Extclient adding peer...")
go packet.StartSniffer(wgInterface.Name, peerConf.Address)
common.PeerKeyHashMap[fmt.Sprintf("%x", md5.Sum([]byte(peer.PublicKey.String())))] = common.RemotePeer{
Interface: wgInterface.Name,
PeerKey: peer.PublicKey.String(),