- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for SplitHostPort (0.2 sec)
-
cmd/net.go
"github.com/minio/minio/internal/logger" xnet "github.com/minio/pkg/v2/net" ) // IPv4 addresses of local host. var localIP4 = mustGetLocalIP4() // mustSplitHostPort is a wrapper to net.SplitHostPort() where error is assumed to be a fatal. func mustSplitHostPort(hostPort string) (host, port string) { xh, err := xnet.ParseHost(hostPort) if err != nil { logger.FatalIf(err, "Unable to split host port %s", hostPort) }
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Tue Mar 26 15:00:38 GMT 2024 - 9.3K bytes - Viewed (0) -
internal/handlers/forwarder.go
func ipv6fix(clientIP string) string { return strings.Split(clientIP, "%")[0] } func (rw *headerRewriter) Rewrite(req *http.Request) { if clientIP, _, err := net.SplitHostPort(req.RemoteAddr); err == nil { clientIP = ipv6fix(clientIP) if req.Header.Get(xRealIP) == "" { req.Header.Set(xRealIP, clientIP) } } xfProto := req.Header.Get(xForwardedProto)
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Fri Apr 07 05:42:10 GMT 2023 - 5.6K bytes - Viewed (0) -
istioctl/pkg/writer/ztunnel/configdump/connections.go
_, ip, _ := strings.Cut(netIP, "/") workloadNames[ip] = s.Name + "." + s.Namespace } lookupIP := func(addr string) string { if filter.Raw { return addr } ip, port, _ := net.SplitHostPort(addr) if s, f := serviceNames[ip]; f { return net.JoinHostPort(s, port) } if w, f := workloadNames[ip]; f { return net.JoinHostPort(w, port) } return addr }
Go - Registered: Wed Apr 24 22:53:08 GMT 2024 - Last Modified: Mon Apr 22 15:39:28 GMT 2024 - 3.3K bytes - Viewed (0) -
internal/http/dial_dnscache.go
Timeout: 30 * time.Second, KeepAlive: 30 * time.Second, }).DialContext } return func(ctx context.Context, network, addr string) (conn net.Conn, err error) { host, port, err := net.SplitHostPort(addr) if err != nil { return nil, err } if net.ParseIP(host) != nil { // For IP only setups there is no need for DNS lookups. return baseDialCtx(ctx, "tcp", addr) }
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Mon Jul 03 19:30:51 GMT 2023 - 2.6K bytes - Viewed (0) -
cmd/ftp-server.go
if len(tokens) != 2 { logger.Fatal(fmt.Errorf("invalid arguments passed to --ftp=%s", arg), "unable to start FTP server") } switch tokens[0] { case "address": host, portStr, err := net.SplitHostPort(tokens[1]) if err != nil { logger.Fatal(fmt.Errorf("invalid arguments passed to --ftp=%s (%v)", arg, err), "unable to start FTP server") } port, err = strconv.Atoi(portStr) if err != nil {
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Sat Mar 09 03:07:08 GMT 2024 - 4.8K bytes - Viewed (2) -
cmd/endpoint.go
u.User == nil && u.Opaque == "" && !u.ForceQuery && u.RawQuery == "" && u.Fragment == "") { return ep, fmt.Errorf("invalid URL endpoint format") } var port string host, port, err = net.SplitHostPort(u.Host) if err != nil { if !strings.Contains(err.Error(), "missing port in address") { return ep, fmt.Errorf("invalid URL endpoint format: %w", err) } host = u.Host } else {
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Sun Apr 21 11:43:18 GMT 2024 - 34.1K bytes - Viewed (0) -
internal/handlers/proxy.go
func GetSourceIPRaw(r *http.Request) string { addr := GetSourceIPFromHeaders(r) if addr == "" { addr = r.RemoteAddr } // Default to remote address if headers not set. raddr, _, _ := net.SplitHostPort(addr) if raddr == "" { return addr } return raddr } // GetSourceIP retrieves the IP from the request headers // and falls back to r.RemoteAddr when necessary.
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Fri Dec 22 00:56:55 GMT 2023 - 5.1K bytes - Viewed (0) -
internal/http/dial_linux.go
_ = syscall.SetsockoptInt(fd, syscall.IPPROTO_TCP, unix.TCP_USER_TIMEOUT, opts.UserTimeout) if opts.Interface != "" { if h, _, err := net.SplitHostPort(address); err == nil { address = h } // Create socket on specific vrf device. // To catch all kinds of special cases this filters specifically for loopback networks.
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Wed Jun 07 16:53:05 GMT 2023 - 4.4K bytes - Viewed (3) -
cmd/sftp-server.go
if len(tokens) != 2 { logger.Fatal(fmt.Errorf("invalid arguments passed to --sftp=%s", arg), "unable to start SFTP server") } switch tokens[0] { case "address": host, portStr, err := net.SplitHostPort(tokens[1]) if err != nil { logger.Fatal(fmt.Errorf("invalid arguments passed to --sftp=%s (%v)", arg, err), "unable to start SFTP server") } port, err = strconv.Atoi(portStr) if err != nil {
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 5.6K bytes - Viewed (0) -
cmd/http-tracer.go
inputBytes += len(k) + len(v) } // Calculate node name nodeName := r.Host if globalIsDistErasure { nodeName = globalLocalNodeName } if host, port, err := net.SplitHostPort(nodeName); err == nil { if port == "443" || port == "80" { nodeName = host } } // Calculate reqPath reqPath := r.URL.RawPath if reqPath == "" { reqPath = r.URL.Path }
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Tue Nov 21 01:09:35 GMT 2023 - 5.9K bytes - Viewed (0)