{"record":{"id":"a53c30e4fd2ffe7d","repo":"XX-net/XX-Net","slug":"control-req-s-s-s-a53c30","errorCode":null,"errorMessage":"Control Req %s %s %s ","messagePattern":"Control Req (.+?) (.+?) (.+?) ","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"code/default/x_tunnel/local/cloudflare_front/web_control.py","lineNumber":41,"sourceCode":"class ControlHandler(simple_http_server.HttpServerHandler):\n    def __init__(self, client_address, headers, command, path, rfile, wfile):\n        self.client_address = client_address\n        self.headers = headers\n        self.command = command\n        self.path = path\n        self.rfile = rfile\n        self.wfile = wfile\n\n    def do_GET(self):\n        path = urlparse(self.path).path\n        if path == \"/log\":\n            return self.req_log_handler()\n        elif path == \"/ip_list\":\n            return self.req_ip_list_handler()\n        elif path == \"/debug\":\n            return self.req_debug_handler()\n        else:\n            front.logger.warn('Control Req %s %s %s ', self.address_string(), self.command, self.path)\n\n        self.wfile.write(b'HTTP/1.1 404\\r\\nContent-Type: text/plain\\r\\nConnection: close\\r\\n\\r\\n404 Not Found')\n        front.logger.info('%s \"%s %s HTTP/1.1\" 404 -', self.address_string(), self.command, self.path)\n\n    def req_log_handler(self):\n        req = urlparse(self.path).query\n        reqs = self.unpack_reqs(parse_qs(req, keep_blank_values=True))\n        data = ''\n\n        cmd = \"get_last\"\n        if reqs[\"cmd\"]:\n            cmd = reqs[\"cmd\"]\n\n        if cmd == \"get_last\":\n            max_line = int(reqs[\"max_line\"])\n            data = front.logger.get_last_lines(max_line)\n        elif cmd == \"get_new\":\n            last_no = int(reqs[\"last_no\"])","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/XX-net/XX-Net/blob/cfa5bc17b67676e467f37ec50766127e0ab5f0aa/code/default/x_tunnel/local/cloudflare_front/web_control.py#L23-L59","documentation":"The cloudflare_front web control HTTP server received a GET for an unknown path; it responds 404 and logs the client address, method and path.","triggerScenarios":"Any request to the control port whose path is not /info, /log, /ip_list, /debug etc.","commonSituations":"Browsers or health probes hitting the control port root path '/'; port scanning.","solutions":["Use one of the documented control paths","Ignore; purely informational","Restrict access to the control port"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"known = {'/info','/log','/ip_list','/debug'}\nif path not in known: return_404()","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use documented control endpoints","Firewall the control port from untrusted clients"],"tags":["cloudflare","web-control","http-404"],"backgroundTag":"http-404-not-found","analyzedSha":"cfa5bc17b67676e467f37ec50766127e0ab5f0aa","analyzedAt":"2026-08-27T19:28:28.225Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}