{"record":{"id":"96c421cfedbb6c15","repo":"XX-net/XX-Net","slug":"host-s-fail","errorCode":null,"errorMessage":"host:%s fail","messagePattern":"host:(.+?) fail","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"code/default/x_tunnel/local/cloudflare_front/check_ip.py","lineNumber":61,"sourceCode":"from front_base.openssl_wrap import SSLContext\nfrom front_base.connect_creator import ConnectCreator\nfrom front_base.check_ip import CheckIp\nfrom front_base.host_manager import HostManagerBase\n\nfrom cloudflare_front.config import Config\nfrom cloudflare_front import front\nfrom cloudflare_front.host_manager import HostManager\n\n\ndef check_all_domain(check_ip):\n    with open(os.path.join(current_path, \"front_domains.json\"), \"r\") as fd:\n        content = fd.read()\n        cs = json.loads(content)\n        for host in cs:\n            host = \"scan1.\" + host\n            res = check_ip.check_ip(ip, host=host, wait_time=wait_time)\n            if not res or not res.ok:\n                xlog.warn(\"host:%s fail\", host)\n            else:\n                xlog.info(\"host:%s ok\", host)\n\n\nclass CheckAllIp(object):\n    def __init__(self, check_ip, host):\n        self.check_ip = check_ip\n        self.host = host\n        self.lock = threading.Lock()\n\n        self.in_fd = open(os.path.join(current_path, \"good_ip.txt\"), \"r\")\n        self.out_fd = open(\n            os.path.join(module_data_path, \"cloudflare_checked_ip.txt\"),\n            \"w\"\n        )\n\n    def get_ip(self):\n        with self.lock:","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/XX-net/XX-Net/blob/cfa5bc17b67676e467f37ec50766127e0ab5f0aa/code/default/x_tunnel/local/cloudflare_front/check_ip.py#L43-L79","documentation":"In the CloudFlare front IP checker tool, checking a scan host against an IP returned a falsy result or res.ok == False, meaning the IP does not serve that domain.","triggerScenarios":"check_all_domain iterates hosts from a JSON file, calls check_ip.check_ip(ip, host='scan1.'+host); failure logs 'host:%s fail'.","commonSituations":"Running the check_ip maintenance script against a dead/wrong IP; domains removed from CloudFlare.","solutions":["Verify the IP is a live CloudFlare edge","Re-run check; single-host failures among many are expected","Update the domain list file"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run check_ip only against verified edge IPs","Keep the domain list current"],"tags":["cloudflare","ip-check","tooling"],"backgroundTag":"ip-health-check-failed","analyzedSha":"cfa5bc17b67676e467f37ec50766127e0ab5f0aa","analyzedAt":"2026-08-27T19:28:28.225Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}