{"record":{"id":"80ad2d49b33b4f06","repo":"XIU2/CloudflareSpeedTest","slug":"cfst-ip-0-80ad2d","errorCode":null,"errorMessage":"CFST 测速结果 IP 数量为 0，跳过下面步骤...","messagePattern":"CFST 测速结果 IP 数量为 0，跳过下面步骤\\.\\.\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"script/cfst_ddns.bat","lineNumber":16,"sourceCode":":: --------------------------------------------------------------\r\n::\t项目: CloudflareSpeedTest 自动更新域名解析记录\r\n::\t版本: 1.0.6\r\n::\t作者: XIU2\r\n::\t项目: https://github.com/XIU2/CloudflareSpeedTest\r\n:: --------------------------------------------------------------\r\n@echo off\r\nSetlocal Enabledelayedexpansion\r\n\r\n:: 这里可以自己添加、修改 CFST 的运行参数，echo.| 的作用是自动回车退出程序（不再需要加上 -p 0 参数了）\r\necho.|cfst.exe -o \"result_ddns.txt\"\r\n\r\n:: 判断结果文件是否存在，如果不存在说明结果为 0\r\nif not exist result_ddns.txt (\r\n    echo.\r\n    echo CFST 测速结果 IP 数量为 0，跳过下面步骤...\r\n    goto :END\r\n)\r\n\r\nfor /f \"skip=1 tokens=1 delims=,\" %%i in (result_ddns.txt) do (\r\n    Echo %%i\r\n    if \"%%i\"==\"\" (\r\n        echo.\r\n        echo CFST 测速结果 IP 数量为 0，跳过下面步骤...\r\n        goto :END\r\n    )\r\n::  API 密钥方式（全局权限）\r\n    curl -X PUT \"https://api.cloudflare.com/client/v4/zones/域名ID/dns_records/域名解析记录ID\" ^\r\n            -H \"X-Auth-Email: 账号邮箱\" ^\r\n            -H \"X-Auth-Key: 前面获取的 API 密钥\" ^\r\n            -H \"Content-Type: application/json\" ^\r\n            --data \"{\\\"type\\\":\\\"A\\\",\\\"name\\\":\\\"完整域名\\\",\\\"content\\\":\\\"%%i\\\",\\\"ttl\\\":1,\\\"proxied\\\":true}\"\r\n::  API 令牌方式（自定义权限），如果要使用这种方式，可以把上面的删除或注释，然后把下面的行首 \"::\" 注释符删除即可。\r\n::    curl -X PUT \"https://api.cloudflare.com/client/v4/zones/域名ID/dns_records/域名解析记录ID\" ^\r","sourceCodeStart":1,"sourceCodeEnd":34,"githubUrl":"https://github.com/XIU2/CloudflareSpeedTest/blob/1da0c025d7b6f9bf0b2b0cf47a547f65430deab2/script/cfst_ddns.bat#L1-L34","documentation":"Informational guard in the CFST Windows DDNS batch script: after `echo.|cfst.exe -o \"result_ddns.txt\"` runs, the script checks `if not exist result_ddns.txt` and prints this message before jumping to :END. CFST only writes the -o output file when at least one Cloudflare IP passed all latency/speed filters, so a missing file means the speed test found zero usable IPs. This is a deliberate early-exit, not a crash — the DNS record is simply left untouched for this run.","triggerScenarios":"cfst.exe runs but writes no result_ddns.txt because: every IP in the default IP pool failed the latency test (-tl threshold), the download-speed filter (-sl, e.g. -sl 5) rejected all survivors because the test URL was slow/unreachable, IP versions mismatched (testing an ipv6.txt pool without -f or on a network without IPv6), or cfst.exe itself never executed (missing exe, AV quarantine, not in the working directory).","commonSituations":"Users raising -sl/-tl too high for their region; a stale or exhausted built-in IP pool after CF routing shifts; running the .bat from a different working directory so the file lands elsewhere; antivirus silently removing cfst.exe; ISP throttling the speed-test download making all IPs fall below the lower limit.","solutions":["Run `cfst.exe -o result_ddns.txt` manually in the same folder and watch stdout — if it prints 0 usable IPs, relax the filters (lower -sl, raise -tl) in the `echo.|cfst.exe ...` line.","Confirm cfst.exe exists in the script's working directory and is not quarantined by antivirus.","Provide a fresh pool: download a new ip.txt / ipv6.txt and add `-f ip.txt` to the cfst command line.","Check basic reachability of the speed-test URL (default uses a Cloudflare-hosted file) from that machine/browser.","If filtering is intentional, accept the skip: rerun on a schedule (Task Scheduler) so a later run with a working pool updates DNS."],"exampleFix":":: before\necho.|cfst.exe -o \"result_ddns.txt\"\nif not exist result_ddns.txt (\n    echo.\n    echo CFST 测速结果 IP 数量为 0，跳过下面步骤...\n    goto :END\n)\n\n:: after — explicit args and a fallback second attempt with looser speed limit\necho.|cfst.exe -f ip.txt -tl 250 -sl 2 -o \"result_ddns.txt\"\nif not exist result_ddns.txt (\n    echo.|cfst.exe -f ip.txt -tl 250 -o \"result_ddns.txt\"\n)\nif not exist result_ddns.txt (\n    echo.\n    echo CFST 测速结果 IP 数量为 0，跳过下面步骤...\n    goto :END\n)","handlingStrategy":"validation","validationCode":":: Pre-flight for cfst_ddns.bat\n@echo off\nif not exist cfst.exe (\n    echo cfst.exe not found in current directory & exit /b 1\n)\nfor %%A in (ip.txt) do if %%~zA EQU 0 (\n    echo ip.txt is empty - refresh the IP pool & exit /b 1\n)\n:: dry run to confirm at least one IP passes current filters\ncfst.exe -f ip.txt -tl 250 -sl 2 -o probe.txt >nul 2>&1\nif not exist probe.txt (\n    echo Filters too strict: 0 IPs passed - lower -sl or raise -tl & exit /b 1\n)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep the speed lower limit (-sl) modest (1-5 MB/s) so ordinary networks still yield results.","Refresh ip.txt/ipv6.txt periodically; pools go stale as Cloudflare ranges shift.","Set scheduled-task 'Start in' to the script folder so result_ddns.txt is created where the .bat reads it.","Exclude cfst.exe from antivirus or sign your own build to avoid silent quarantine.","Treat this message as a skip, not a failure: schedule frequent runs so the next successful round updates DNS."],"tags":["cloudflare","speedtest","batch","windows","ddns","ddns-bat"],"backgroundTag":null,"analyzedSha":"1da0c025d7b6f9bf0b2b0cf47a547f65430deab2","analyzedAt":"2026-08-15T22:22:10.737Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}