Update dependencies
This commit is contained in:
10
vendor/golang.org/x/net/http/httpproxy/proxy.go
generated
vendored
10
vendor/golang.org/x/net/http/httpproxy/proxy.go
generated
vendored
@@ -14,6 +14,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
"net/netip"
|
||||
"net/url"
|
||||
"os"
|
||||
"strings"
|
||||
@@ -177,8 +178,10 @@ func (cfg *config) useProxy(addr string) bool {
|
||||
if host == "localhost" {
|
||||
return false
|
||||
}
|
||||
ip := net.ParseIP(host)
|
||||
if ip != nil {
|
||||
nip, err := netip.ParseAddr(host)
|
||||
var ip net.IP
|
||||
if err == nil {
|
||||
ip = net.IP(nip.AsSlice())
|
||||
if ip.IsLoopback() {
|
||||
return false
|
||||
}
|
||||
@@ -360,6 +363,9 @@ type domainMatch struct {
|
||||
}
|
||||
|
||||
func (m domainMatch) match(host, port string, ip net.IP) bool {
|
||||
if ip != nil {
|
||||
return false
|
||||
}
|
||||
if strings.HasSuffix(host, m.host) || (m.matchHost && host == m.host[1:]) {
|
||||
return m.port == "" || m.port == port
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user