{"record":{"id":"6a5861876804c33e","repo":"XIU2/CloudflareSpeedTest","slug":"cfst-ip-0-6a5861","errorCode":null,"errorMessage":"CFST 测速结果 IP 数量为 0，跳过下面步骤...","messagePattern":"CFST 测速结果 IP 数量为 0，跳过下面步骤\\.\\.\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"script/cfst_hosts.bat","lineNumber":65,"sourceCode":"\r\n::�� nowip_hosts.txt �ļ���ȡ��ǰ Hosts ��ʹ�õ� Cloudflare CDN IP\r\nset /p nowip=<nowip_hosts.txt\r\necho ��ʼ����...\r\n\r\n\r\n:: ��� RESET �Ǹ���Ҫ \"�Ҳ������������� IP ��һֱѭ��������ȥ\" ���ܵ���׼����\r\n:: �����Ҫ������ܾͰ����� 3 �� goto :STOP ��Ϊ goto :RESET ����\r\n:RESET\r\n\r\n\r\n:: ��������Լ����ӡ��޸� CFST �����в�����echo.| ���������Զ��س��˳����򣨲�����Ҫ���� -p 0 �����ˣ�\r\necho.|cfst.exe -o \"result_hosts.txt\"\r\n\r\n\r\n:: �жϽ���ļ��Ƿ���ڣ����������˵�����Ϊ 0\r\nif not exist result_hosts.txt (\r\n    echo.\r\n    echo CFST ���ٽ�� IP ����Ϊ 0���������沽��...\r\n    goto :STOP\r\n)\r\n\r\n:: ��ȡ��һ�е���� IP\r\nfor /f \"skip=1 tokens=1 delims=,\" %%i in ('more result_hosts.txt') do (\r\n    SET bestip=%%i\r\n    goto :END\r\n)\r\n\r\n:END\r\n\r\n:: �жϸոջ�ȡ����� IP �Ƿ�Ϊ�գ��Լ��Ƿ�;� IP һ��\r\nif \"%bestip%\"==\"\" (\r\n    echo.\r\n    echo CFST ���ٽ�� IP ����Ϊ 0���������沽��...\r\n    goto :STOP\r\n)\r\nif \"%bestip%\"==\"%nowip%\" (\r","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/XIU2/CloudflareSpeedTest/blob/1da0c025d7b6f9bf0b2b0cf47a547f65430deab2/script/cfst_hosts.bat#L47-L83","documentation":"Guard in cfst_hosts.bat (the Windows hosts-file updater, a GBK-encoded file shown here as mojibake): after `echo.|cfst.exe -o \"result_hosts.txt\"`, `if not exist result_hosts.txt` prints 'CFST 测速结果 IP 数量为 0' and jumps to :STOP. CFST only creates the -o file when at least one IP survives its latency/speed tests, so a missing file equals zero usable IPs. The script intentionally leaves the hosts file unchanged instead of writing a blank/garbage IP.","triggerScenarios":"cfst.exe finds 0 qualifying IPs (filters too strict: -tl/-sl/-tll), the exe never ran (missing, blocked by antivirus, wrong working directory), an IP-version mismatch (v6 pool on a v4-only machine), or the -o path was changed so the file is written elsewhere.","commonSituations":"Raising -sl to chase faster IPs and excluding everything in the current pool; scheduled-task runs where 'start in' is not set to the script folder; Windows Defender quarantining cfst.exe; corporate proxies/SSL inspection breaking the download test so every IP scores 0 MB/s.","solutions":["Run cfst.exe manually in the script folder and confirm result_hosts.txt gets data rows; if 0 IPs, relax -sl/-tl in the script.","Check that cfst.exe is present and not quarantined (Windows Security > Protection history).","For scheduled tasks, set 'Start in' to the script directory so result_hosts.txt is created where the .bat looks.","Refresh the candidate pool (-f ip.txt with a recent list, or re-download the release's bundled ip.txt/ipv6.txt).","If the goal is auto-retry, follow the file's own comment and change `goto :STOP` to `goto :RESET` so a failed round is retried."],"exampleFix":":: before\necho.|cfst.exe -o \"result_hosts.txt\"\nif not exist result_hosts.txt (\n    echo.\n    echo CFST 测速结果 IP 数量为 0，跳过下面步骤...\n    goto :STOP\n)\n\n:: after — retry once with looser filters, using the file's own RESET mechanism\necho.|cfst.exe -o \"result_hosts.txt\"\nif not exist result_hosts.txt (\n    echo.|cfst.exe -sl 0 -o \"result_hosts.txt\"\n)\nif not exist result_hosts.txt (\n    echo.\n    echo CFST 测速结果 IP 数量为 0，跳过下面步骤...\n    goto :STOP\n)","handlingStrategy":"validation","validationCode":":: Pre-flight for cfst_hosts.bat\n@echo off\nif not exist cfst.exe ( echo cfst.exe missing & goto :STOP )\ndel result_hosts.txt 2>nul\necho.|cfst.exe -o \"result_hosts.txt\"\n:: require an actual data row, not just a created file\nfor %%A in (result_hosts.txt) do if %%~zA LEQ 60 (\n    echo CFST 测速结果 IP 数量为 0，跳过下面步骤...\n    goto :STOP\n)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep -sl low enough that at least one IP always survives on an ordinary day.","Set 'Start in' on scheduled tasks to the script's folder.","Re-download the release's ip.txt/ipv6.txt when results thin out.","Check Windows protection history if cfst.exe silently disappears.","Use goto :RESET instead of goto :STOP if you want automatic retries."],"tags":["cloudflare","speedtest","batch","windows","hosts-file"],"backgroundTag":null,"analyzedSha":"1da0c025d7b6f9bf0b2b0cf47a547f65430deab2","analyzedAt":"2026-08-15T22:22:10.737Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}