{"record":{"id":"31ec96df9ca72e97","repo":"sqlmapproject/sqlmap","slug":"proxy-value-must-be-in-format-s-address-port","errorCode":null,"errorMessage":"proxy value must be in format '(%s)://address:port'","messagePattern":"proxy value must be in format '\\((.+?)\\)://address:port'","errorType":"exception","errorClass":"SqlmapSyntaxException","httpStatus":null,"severity":"error","filePath":"lib/core/option.py","lineNumber":1289,"sourceCode":"                username, password = match.group(1), match.group(2)\n            else:\n                username, password = None, None\n\n            hostnamePort = _.netloc.rsplit('@', 1)[-1].rsplit(\":\", 1)\n\n            scheme = _.scheme.upper()\n            hostname = hostnamePort[0]\n            port = None\n\n            if len(hostnamePort) == 2:\n                try:\n                    port = int(hostnamePort[1])\n                except:\n                    pass  # drops into the next check block\n\n            if not all((scheme, hasattr(PROXY_TYPE, scheme), hostname, port)):\n                errMsg = \"proxy value must be in format '(%s)://address:port'\" % \"|\".join(_[0].lower() for _ in getPublicTypeMembers(PROXY_TYPE))\n                raise SqlmapSyntaxException(errMsg)\n\n            if conf.proxyCred:\n                _ = re.search(r\"\\A(.*?):(.*?)\\Z\", conf.proxyCred)\n                if not _:\n                    errMsg = \"proxy authentication credentials \"\n                    errMsg += \"value must be in format username:password\"\n                    raise SqlmapSyntaxException(errMsg)\n                else:\n                    username = _.group(1)\n                    password = _.group(2)\n\n            if scheme in (PROXY_TYPE.SOCKS4, PROXY_TYPE.SOCKS5):\n                proxyHandler.proxies = {}\n\n                if scheme == PROXY_TYPE.SOCKS4:\n                    warnMsg = \"SOCKS4 does not support resolving (DNS) names (i.e. causing DNS leakage)\"\n                    singleTimeWarnMessage(warnMsg)\n","sourceCodeStart":1271,"sourceCodeEnd":1307,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/lib/core/option.py#L1271-L1307","documentation":"After parsing the --proxy URL, sqlmap validates that all components exist: a supported scheme (one of PROXY_TYPE's members, e.g. http/https/socks4/socks5), a hostname, and an integer port. When scheme is unknown/missing, the port is absent or non-numeric (the int() cast silently falls through), or the hostname is empty, SqlmapSyntaxException is raised showing the accepted format 'scheme://address:port'.","triggerScenarios":"Thrown at lib/core/option.py:1289 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Supply the scheme explicitly: use `http://`, `https://`, `socks4://` or `socks5://` — a bare `host:port` is rejected.","Include the port: `http://127.0.0.1:8080`, not `http://127.0.0.1`.","Ensure the port is numeric; non-numeric ports are silently discarded and trip this check.","Check for typos in the scheme (e.g. `socks5h` or `sock` are unsupported)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0a35b20e3953d341be6c7ac75ccb0b3362540c8d","analyzedAt":"2026-08-26T23:02:52.002Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}