mirror of
https://github.com/wyx2685/V2bX.git
synced 2025-01-22 09:58:14 -05:00
fix miss
This commit is contained in:
parent
1c68cd80c8
commit
968da8effd
@ -1,9 +1,19 @@
|
||||
package hy
|
||||
|
||||
//var errInvalidSyntax = errors.New("invalid syntax")
|
||||
import (
|
||||
"crypto/tls"
|
||||
"errors"
|
||||
"github.com/Yuzuki616/hysteria/core/utils"
|
||||
rdns "github.com/folbricht/routedns"
|
||||
"net"
|
||||
"net/url"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var errInvalidSyntax = errors.New("invalid syntax")
|
||||
|
||||
func setResolver(dns string) error {
|
||||
/*if net.ParseIP(dns) != nil {
|
||||
if net.ParseIP(dns) != nil {
|
||||
// Just an IP address, treat as UDP 53
|
||||
dns = "udp://" + net.JoinHostPort(dns, "53")
|
||||
}
|
||||
@ -107,6 +117,6 @@ func setResolver(dns string) error {
|
||||
return errInvalidSyntax
|
||||
}
|
||||
cache := rdns.NewCache("cache", r, rdns.CacheOptions{})
|
||||
net.DefaultResolver = rdns.NewNetResolver(cache)*/
|
||||
net.DefaultResolver = rdns.NewNetResolver(cache)
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user