白嫖云端别炸锅 | Free Cloud, Fewer Meltdowns

零预算搭起自己的技术小窝:Cloudflare 负责连接入口,Mac 上的 Mihomo 负责 AI 分流,WordPress 负责记笔记,错误日志负责提醒你别迷信“永不报错”。好处是不必先买服务器;小缺点是免费出口偶尔摸鱼,千万别把它当永动机。
Build a tiny tech home without a server bill: Cloudflare provides the entry point, Mihomo routes AI traffic, and WordPress keeps your notes tidy. It saves money and setup time, although the occasional free-network nap is a reminder that “free” does not mean “forever reliable.”
完整实操案例:个人技术工具箱
这个例子把免费的 CFnew 节点、Mac 上的 Mihomo AI 分流、Cloudflare 故障排查和免费个人博客整合成一个个人技术工具箱。/This example combines a free CFnew node, Mihomo AI routing on Mac, Cloudflare troubleshooting, and a free personal blog into one personal tech toolbox.
先说明: 这是一套共同服务于同一个目标的组合方案,不是一次部署就能生成所有功能的单一程序。Cloudflare 节点、客户端分流和博客应分别配置,彼此不冒充对方的功能。
1. 创建免费账号/Prepare free accounts
注册 Cloudflare、GitHub 和 WordPress.com 账号,不购买域名,也不启用任何付费升级。/Create Cloudflare, GitHub, and WordPress.com accounts, without buying a domain or enabling paid upgrades.
2. 生成专属 UUID/Generate a unique UUID
在 macOS 终端运行下面的命令,生成唯一 UUID,并把结果暂存到密码管理器。/Run the following command in macOS Terminal to generate a unique UUID, then save the result in a password manager.
uuidgen | tr '[:upper:]' '[:lower:]'
不要沿用公共示例中的 UUID,因为其他人也可能知道它。/Do not reuse a public example UUID, because other people may know it too.
3. 下载并检查 CFnew/Review the CFnew source
打开 CFnew 的 GitHub 项目主页,阅读当前 README,并确认部署说明和兼容性日期。/Open the CFnew GitHub repository, read its current README, and confirm the deployment instructions and compatibility date.
只采用项目仓库中的代码,不把未知来源的打包脚本或所谓“修复程序”直接交给 Cloudflare 账号运行。/Use code from the project repository instead of running unknown bundled scripts or so-called repair tools against your Cloudflare account.
4. 创建 Cloudflare Worker/Create a Cloudflare Worker
在 Cloudflare 控制台打开 Workers & Pages,创建一个 Worker,然后进入代码编辑界面。/In the Cloudflare dashboard, open Workers & Pages, create a Worker, and enter its code editor.
按照 CFnew 当前 README 的 Worker 部署方式,把项目指定的 Worker 脚本粘贴进去并保存部署。/Follow the current CFnew README instructions for Worker deployment, paste the specified Worker script, and save the deployment.
5. 设置兼容性日期和 KV/Set the compatibility date and KV
进入 Worker 的设置页面,将兼容性日期设置为项目 README 指定的 2026-01-20。/Open the Worker settings and set the compatibility date to 2026-01-20, as required by the project README.
在 Cloudflare 创建 KV 命名空间,再把它绑定到该 Worker,并将变量名设为大写字母 C。/Create a KV namespace in Cloudflare, bind it to the Worker, and set the binding variable name to the uppercase letter C.
6. 配置 UUID 和基础变量/Configure the UUID and basic variables
按照 CFnew 当前 README 的变量说明,将生成的 UUID 配置给变量 u。/Following the current CFnew README, configure the generated UUID as the value of variable u.
初次测试时先不要设置可选的 p 和 wk,避免同时引入额外的 ProxyIP 或地区设置问题。/For the first test, leave the optional p and wk settings unset to avoid adding ProxyIP or regional-routing variables to the troubleshooting process.
7. 打开管理入口/Open the management panel
从 Cloudflare 控制台复制实际分配给 Worker 的 workers.dev 域名,然后按照 CFnew README 所列的入口方式打开管理页面。/Copy the actual workers.dev hostname assigned to your Worker, then open the management page using the entry path described in the CFnew README.
先确认页面可以正常加载、配置能够保存,再继续测试客户端连接。/Confirm that the page loads and that settings can be saved before testing the client connection.
8. 使用默认节点配置/Start with the default node configuration
在管理页面中先启用默认提供的 VLESS 配置,暂时不启用家宽链式或其他可选出口。/In the management panel, begin with the default VLESS configuration and leave the optional home-broadband chain and other exit options disabled.
先把基础连接跑通,才能在出现问题时分辨故障来自 Worker、出口还是客户端。/Get the basic connection working first so you can distinguish problems with the Worker, exit route, and client later.
9. 生成客户端订阅/Create a client subscription
在 CFnew 管理页面选择适用于 Clash 或 Mihomo 的订阅格式,并复制项目生成的订阅地址。/In the CFnew panel, select the subscription format for Clash or Mihomo, then copy the generated subscription address.
订阅地址可能包含敏感连接信息,不要发布到博客、公开仓库或群聊中。/A subscription URL may contain sensitive connection information, so do not publish it in a blog, public repository, or group chat.
10. 安装 Mac 客户端/Install the Mac client
从 Clash Verge Rev 官方 GitHub Releases 页面下载最新稳定版的 Apple Silicon 安装包,M2 芯片不要选 Intel 版本。/Download the latest stable Apple Silicon release from the official Clash Verge Rev GitHub Releases page, and do not choose the Intel build for an M2 Mac.
安装后添加 CFnew 订阅,刷新配置,并先选择一个节点测试连接和延迟。/After installation, add the CFnew subscription, refresh the profile, and test connectivity and latency with one node first.
11. 配置 AI 域名分流/Configure AI domain routing
AI 分流应由客户端完成,不能假设 CFnew 自动生成的订阅一定包含 AI 专用策略组。/AI routing belongs in the client, so do not assume the CFnew subscription automatically includes an AI-specific policy group.
先在现有 Mihomo 配置中找到 proxy-groups 和 rules,再添加下列规则骨架,并把占位节点名换成订阅里实际存在的节点名称。/Find the existing proxy-groups and rules sections in your Mihomo profile, add the rule skeleton below, and replace the placeholder node name with an actual node name from your subscription.
将下面的策略组条目添加到已有的 proxy-groups 列表中,不要创建第二个同名顶层字段。/Add the following policy-group entry to the existing proxy-groups list, rather than creating a second top-level field with the same name.
- name: AI
type: select
proxies:
- YOUR_CFNEW_NODE_NAME
- DIRECT
把下面的规则放在现有的兜底规则之前;如果配置已经存在同类规则,应先检查和合并,避免重复或冲突。/Place the following rules before the existing fallback rule, and check for duplicates or conflicts if similar rules already exist.
- DOMAIN-SUFFIX,openai.com,AI
- DOMAIN-SUFFIX,chatgpt.com,AI
- DOMAIN-SUFFIX,oaistatic.com,AI
- DOMAIN-SUFFIX,oaiusercontent.com,AI
- DOMAIN-SUFFIX,anthropic.com,AI
- DOMAIN-SUFFIX,claude.ai,AI
- DOMAIN-SUFFIX,claudeusercontent.com,AI
保存前确认 YOUR_CFNEW_NODE_NAME 已替换为实际节点名称,并且整个配置仍然符合 Mihomo 的 YAML 结构。/Before saving, make sure YOUR_CFNEW_NODE_NAME has been replaced with a real node name and that the full configuration remains valid Mihomo YAML.
这组规则只演示基础域名分流,不能保证每个 AI 服务都可用;服务端策略、登录状态和出口网络都可能影响访问结果。/These rules demonstrate basic domain routing only and cannot guarantee that every AI service will work; service policies, account status, and exit-network conditions can all affect access.
12. 理解 ProxyIP 与优选 IP/Understand ProxyIP and preferred IPs
初次部署时保持 p 和 wk 未设置,先验证项目默认路径是否可用。/Leave p and wk unset during initial deployment and verify the default route first.
如果后续需要测试 ProxyIP,只能采用你有权限使用、且与项目配置兼容的地址,并一次只改变一个变量。/If you later test a ProxyIP, use an address you are authorised to use that is compatible with the project, and change only one variable at a time.
优选 IP 不保证地理位置、低延迟或永久可连通,因此不要把某个测试成功的地址当作永久答案。/A preferred IP does not guarantee geographic location, low latency, or permanent connectivity, so do not treat one successful test as a permanent solution.
13. 可选测试家宽链式/Optionally test the home-broadband chain
只有基础连接稳定后,才考虑在 CFnew 管理页面中启用项目提供的家宽链式选项,并按 README 生成对应订阅。/Only consider enabling CFnew’s home-broadband chain after the basic connection is stable, and generate its subscription as described in the README.
该链路依赖第三方志愿节点,可能失效或拥堵,而且项目说明存在 TCP 支持限制,所以不应把它当作稳定、可信的住宅出口。/This route depends on third-party volunteer nodes, may fail or become congested, and has documented TCP limitations, so it should not be treated as a stable or trusted residential exit.
不要用不可信的第三方出口处理银行登录、工作机密或其他敏感流量。/Do not send bank logins, work secrets, or other sensitive traffic through an untrusted third-party exit.
14. 排查 1101、522 和 1027/Troubleshoot 1101, 522, and 1027
遇到 1101 时,进入 Cloudflare 的 Worker 日志检查具体异常,针对代码或运行时问题修复,不要直接把错误页面当作可以忽略的提示。/For error 1101, inspect the Worker logs for the specific exception and fix the code or runtime problem instead of treating the error page as harmless.
遇到 522 时,先确认错误对应的请求路径和源站,再检查连接超时、源站可达性或相关自定义域名配置。/For error 522, identify the request path and origin involved, then investigate connection timeouts, origin reachability, or relevant custom-domain settings.
遇到 1027 时,检查是否触及 Workers 使用限制,并根据实际情况减少请求、等待配额重置或调整架构,而不是反复部署同一份代码。/For error 1027, check whether a Workers limit has been reached, then reduce requests, wait for quota reset, or change the architecture instead of repeatedly deploying the same code.
15. 把 WARP 当作独立备用连接/Use WARP as a separate fallback
如果想测试 WARP,可以从 Cloudflare 官方网站获取应用,先关闭 Clash Verge Rev 的全设备隧道,再单独测试免费的 WARP 连接。/To test WARP, obtain the app from Cloudflare’s official website, disable the Clash Verge Rev full-device tunnel, and test the free WARP connection separately.
WARP 不是 CFnew 节点,也不会自动替你完成 AI 域名分流,更不能修复 Worker 的 1101 错误。/WARP is not a CFnew node, does not automatically configure AI domain routing, and cannot fix a Worker error 1101.
16. 发布免费个人博客/Publish a free personal blog
在 WordPress.com 创建免费站点,选择免费提供的子域名,并发布一篇记录部署经验和错误排查方法的文章。/Create a free WordPress.com site, choose its free subdomain, and publish an article documenting your deployment experience and troubleshooting notes.
不要在公开博客里放 UUID、订阅链接、API Key 或其他敏感配置信息。/Do not publish UUIDs, subscription URLs, API keys, or other sensitive configuration information on a public blog.
如果更喜欢 Typecho,可以另行选择支持 PHP 7.4 以上版本和兼容数据库的免费主机,但必须先核实主机商的实际 PHP 版本和配额。/If you prefer Typecho, choose a free host that supports PHP 7.4 or later and a compatible database, but first verify the host’s actual PHP version and quota.
17. 收尾与安全检查/Finish with a security check
把 UUID 和订阅信息保存在密码管理器中,定期检查 Cloudflare 配额与项目更新,不要把订阅当作普通网址公开分享。/Store your UUID and subscription information in a password manager, review Cloudflare quotas and project updates, and never share the subscription as though it were an ordinary public URL.
如果曾经把 Global API Key 提交给不可信工具,应立即轮换或撤销该密钥,并检查账户中的相关权限。/If you ever submitted a Global API Key to an untrusted tool, rotate or revoke it immediately and review the related account permissions.
相关链接/Related Links:
https://wasmer.io/ https://dash.cloudflare.com https://developers.cloudflare.com/workers/platform/pricing/ https://developers.cloudflare.com/workers/platform/limits/ https://developers.cloudflare.com/pages/platform/limits/ https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/error-1101/ https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/error-522/ https://developers.cloudflare.com/api/overview/ https://developers.cloudflare.com/fundamentals/api/reference/template/ https://github.com/byJoey/cfnew https://github.com/byJoey/cfnew-deployer https://github.com/yonggekkk/Cloudflare-vless-trojan https://github.com/clash-verge-rev/clash-verge-rev/releases https://github.com/MetaCubeX/mihomo https://github.com/VPSDance/ai-proxy-rules https://one.one.one.one/ https://wordpress.com/free/ https://www.awardspace.com/free-hosting/ https://www.awardspace.com/kb/what-are-the-limitations-on-web-space-and-bandwidth/ https://github.com/typecho/typecho https://typecho.org/download https://developers.cloudflare.com/pages/framework-guides/deploy-anything/ https://www.dnshe.com/ https://www.uuidgenerator.net/
评论
发表评论