{"record":{"id":"6e76b457cd7c5be4","repo":"googleapis/mcp-toolbox","slug":"connection-to-blocked-ip-s-denied","errorCode":null,"errorMessage":"connection to blocked IP %s denied","messagePattern":"connection to blocked IP (.+?) denied","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sources/http/http.go","lineNumber":338,"sourceCode":"\t}\n\n\tresolver := guard.Resolver\n\tif resolver == nil {\n\t\tresolver = net.DefaultResolver\n\t}\n\n\tdialer := &net.Dialer{\n\t\tTimeout:   30 * time.Second,\n\t\tKeepAlive: 30 * time.Second,\n\t\tControl: func(network, address string, c syscall.RawConn) error {\n\t\t\thost, _, err := net.SplitHostPort(address)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tip := net.ParseIP(host)\n\t\t\tif ip != nil {\n\t\t\t\tif guard.IsIPBlocked(ip) {\n\t\t\t\t\treturn fmt.Errorf(\"connection to blocked IP %s denied\", ip)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn nil\n\t\t},\n\t}\n\n\tif r, ok := resolver.(*net.Resolver); ok {\n\t\tdialer.Resolver = r\n\t}\n\n\ttr.DialContext = dialer.DialContext\n\n\tclient := &http.Client{\n\t\tTimeout:   duration,\n\t\tTransport: tr,\n\t\tCheckRedirect: func(req *http.Request, via []*http.Request) error {\n\t\t\tif len(via) >= 10 {\n\t\t\t\treturn fmt.Errorf(\"stopped after 10 redirects\")","sourceCodeStart":320,"sourceCodeEnd":356,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/sources/http/http.go#L320-L356","documentation":"Error \"connection to blocked IP %s denied\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/sources/http/http.go:338 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8cc6e09de2ad7b8bffc77751799585a1401a48eb","analyzedAt":"2026-09-05T01:10:36.887Z","contentChangedAt":"2026-09-05T01:10:36.887Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}