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