mirror of
https://github.com/xvzc/SpoofDPI.git
synced 2024-12-23 06:42:51 +00:00
fix dns look up error
This commit is contained in:
parent
439e79ad73
commit
8a15c05fdb
@ -1,6 +1,7 @@
|
|||||||
package doh
|
package doh
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/babolivier/go-doh-client"
|
"github.com/babolivier/go-doh-client"
|
||||||
@ -19,6 +20,10 @@ func Lookup(domain string) (string, error) {
|
|||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(a) < 1 {
|
||||||
|
return "", errors.New(" couldn't resolve the domain")
|
||||||
|
}
|
||||||
|
|
||||||
ip := a[0].IP4
|
ip := a[0].IP4
|
||||||
|
|
||||||
return ip, nil
|
return ip, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user