1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-21 09:36:34 -05:00
This commit is contained in:
Darien Raymond 2018-11-22 22:49:45 +01:00
parent db83f23f00
commit 480175691c
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -36,6 +36,7 @@ func (c *Client) LookupIP(host string) ([]net.IP, error) {
return ips, nil
}
// LookupIPv4 implements IPv4Lookup.
func (c *Client) LookupIPv4(host string) ([]net.IP, error) {
ips, err := c.LookupIP(host)
if err != nil {
@ -51,6 +52,7 @@ func (c *Client) LookupIPv4(host string) ([]net.IP, error) {
return ipv4, nil
}
// LookupIPv6 implements IPv6Lookup.
func (c *Client) LookupIPv6(host string) ([]net.IP, error) {
ips, err := c.LookupIP(host)
if err != nil {
@ -66,6 +68,7 @@ func (c *Client) LookupIPv6(host string) ([]net.IP, error) {
return ipv6, nil
}
// New create a new dns.Client that queries localhost for DNS.
func New() *Client {
return &Client{
resolver: net.Resolver{