mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-04-04 21:57:44 +03:00
Update deps
This commit is contained in:
parent
0f4872a4e6
commit
f0bac6f0c7
9 changed files with 233 additions and 160 deletions
8
vendor/golang.org/x/net/proxy/per_host.go
generated
vendored
8
vendor/golang.org/x/net/proxy/per_host.go
generated
vendored
|
@ -7,6 +7,7 @@ package proxy
|
|||
import (
|
||||
"context"
|
||||
"net"
|
||||
"net/netip"
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
@ -57,7 +58,8 @@ func (p *PerHost) DialContext(ctx context.Context, network, addr string) (c net.
|
|||
}
|
||||
|
||||
func (p *PerHost) dialerForRequest(host string) Dialer {
|
||||
if ip := net.ParseIP(host); ip != nil {
|
||||
if nip, err := netip.ParseAddr(host); err == nil {
|
||||
ip := net.IP(nip.AsSlice())
|
||||
for _, net := range p.bypassNetworks {
|
||||
if net.Contains(ip) {
|
||||
return p.bypass
|
||||
|
@ -108,8 +110,8 @@ func (p *PerHost) AddFromString(s string) {
|
|||
}
|
||||
continue
|
||||
}
|
||||
if ip := net.ParseIP(host); ip != nil {
|
||||
p.AddIP(ip)
|
||||
if nip, err := netip.ParseAddr(host); err == nil {
|
||||
p.AddIP(net.IP(nip.AsSlice()))
|
||||
continue
|
||||
}
|
||||
if strings.HasPrefix(host, "*.") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue