Fix: udp crash

This commit is contained in:
Dreamacro 2019-12-31 14:47:00 +08:00
parent 38458cc4d0
commit 50704eaeeb

View file

@ -188,7 +188,7 @@ func (t *Tunnel) handleUDPConn(packet *inbound.PacketAdapter) {
lockKey := key + "-lock" lockKey := key + "-lock"
wg, loaded := t.natTable.GetOrCreateLock(lockKey) wg, loaded := t.natTable.GetOrCreateLock(lockKey)
isFakeIP := dns.DefaultResolver.IsFakeIP(metadata.DstIP) isFakeIP := dns.DefaultResolver != nil && dns.DefaultResolver.IsFakeIP(metadata.DstIP)
go func() { go func() {
if !loaded { if !loaded {