<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Fuwari</title><description>Demo Site</description><link>https://fuwari.vercel.app/</link><language>en</language><item><title>有限生命里的无限当下</title><link>https://fuwari.vercel.app/posts/day/yxdsm/</link><guid isPermaLink="true">https://fuwari.vercel.app/posts/day/yxdsm/</guid><pubDate>Wed, 06 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;直到多年以后你才恍然大悟，原来那是最后一次，那天午后，你像往常一样退出了游戏界面，那天傍晚你习惯性的和朋友道了，别，那天深夜妈妈轻轻抱了你一下，遗憾的是没人提醒你，也没有任何征兆，最后一次总是悄然而至，不会张扬，没有预兆，当你再回头已是物是人非，我们总以为时间充以为来日方长，以至于我们常常忽略当下，海德格尔认为人类最大的不同就是我们清楚自己终将死亡，这意味着我们每一次呼吸，每一次相遇都有可能是绝对意义上的最后一次，所以有人把每一次都当做最后一次去珍惜，也有人整日忧心，总在害怕最后一次的到来，但无论是景物还是担忧生活都不会因此停下也许。所谓最后一次在大多数时候并不是故事的终点，而是生命中温柔的提醒，别再沉溺过去的美好，也别把未来想的太远，此刻正在发生的才是我们唯一能抓住的真实朋友，过去的最后一次，你沉入时光，而未来仍有无数的第一次在等待着你，所以请试着放慢脚步，环顾四周，更深的去感受当下的人和事，因为没有人知道这是不是最后一次&lt;/p&gt;
</content:encoded></item><item><title>Cloudflare优选教程，让Cloudflare在国内不再是减速器</title><link>https://fuwari.vercel.app/posts/cf-ys/</link><guid isPermaLink="true">https://fuwari.vercel.app/posts/cf-ys/</guid><pubDate>Sun, 19 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h4&gt;作者的优选域名&lt;/h4&gt;
&lt;p&gt;CF: &lt;a href=&quot;https://cf.legspcpd.furry.bz/&quot;&gt;https://cf.legspcpd.furry.bz/&lt;/a&gt;
&lt;img src=&quot;https://imghub.legspcpd.indevs.in/file/image/cf.png&quot; alt=&quot;&quot; /&gt;
真 移动优化: &lt;a href=&quot;https://cmcc.legspcpd.furry.bz/&quot;&gt;https://cmcc.legspcpd.furry.bz/&lt;/a&gt;
&lt;img src=&quot;https://imghub.legspcpd.indevs.in/file/image/cf-cmcc.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h4&gt;什么是优选？&lt;/h4&gt;
&lt;p&gt;简单来说，优选就是选择一个国内访问速度更快的Cloudflare节点。&lt;/p&gt;
&lt;p&gt;Cloudflare官方分配给我们的IP，在国内访问时延迟往往较高，甚至可能出现无法访问的情况。而通过优选，我们可以手动将域名解析到那些国内访问更快的Cloudflare IP，从而显著提升网站的访问速度和可用性。&lt;/p&gt;
&lt;p&gt;从上面的对比图可以看到，优选过的网站响应速度有很大提升，出口IP也变多了。这能让你的网站可用性大大提高，并且加载速度显著变快。&lt;/p&gt;
&lt;p&gt;要实现优选，我们需要做到两点：自己控制路由规则 和 自己控制DNS解析。通过Cloudflare SaaS或Worker路由，我们可以同时实现这两点，下面会详细说明&lt;/p&gt;
&lt;hr /&gt;
&lt;h4&gt;优选原理&lt;/h4&gt;
&lt;p&gt;首先我们要知道CDN是如何通过不同域名给不同内容的。&lt;/p&gt;
&lt;p&gt;我们可以将其抽象为2层：规则层和解析层。当我们普通的在Cloudflare添加一条开启了小黄云的解析，Cloudflare会为我们做两件事：&lt;/p&gt;
&lt;p&gt;帮我们写一条DNS解析指向Cloudflare
在Cloudflare创建一条路由规则
如果你想要优选，实际上你是要手动更改这个DNS解析，使其指向一个更快的Cloudflare节点。&lt;/p&gt;
&lt;p&gt;但是，一旦你将小黄云关闭，路由规则也会被删除，再访问就会显示DNS直接指向IP——这就没法用了。&lt;/p&gt;
&lt;p&gt;而SaaS和Worker路由的出现改变了这一切。&lt;/p&gt;
&lt;p&gt;使用SaaS后，Cloudflare不再帮你做这两件事了，这两件事你都可以自己做了：&lt;/p&gt;
&lt;p&gt;1.你可以自己写一条SaaS规则（规则层）
2.你可以自己写一条CNAME解析到优选节点（解析层）&lt;/p&gt;
&lt;p&gt;使用Worker路由同理，你创建Worker路由规则后，DNS解析就可以随便指向任何优选节点了。&lt;/p&gt;
&lt;p&gt;这就是为什么经由SaaS或Worker路由的流量可以做优选的原因。&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;选择优选域名&lt;/h1&gt;
&lt;p&gt;优选的核心就是选择一个国内访问速度更快的Cloudflare节点IP或域名。&lt;/p&gt;
&lt;h2&gt;传统优选域名&lt;/h2&gt;
&lt;p&gt;常用的社区优选域名：&lt;a href=&quot;https://cf.090227.xyz/&quot;&gt;https://cf.090227.xyz&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;这些优选域名通常是通过扫描Cloudflare官方IP段，找出国内延迟最低的IP整理而成。&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;各类优选方案&lt;/h1&gt;
&lt;h2&gt;更简单的优选方法&lt;/h2&gt;
&lt;h3&gt;使用A/AAAA指向指定IPV4/V6&lt;/h3&gt;
&lt;p&gt;打开Cloudflare或者其他云平台
新建一个A记录
&lt;img src=&quot;https://imghub.legspcpd.indevs.in/file/image/cf-jl.png&quot; alt=&quot;cf-jl.png&quot; /&gt;
找一个CF优选IP，我这里拿&lt;strong&gt;104.20.28.171&lt;/strong&gt;这个IP做例子
&lt;img src=&quot;https://imghub.legspcpd.indevs.in/file/image/ip.png&quot; alt=&quot;ip.png&quot; /&gt;
按照这样填写&lt;/p&gt;
&lt;p&gt;我们打开ITDOG进行测速
&lt;img src=&quot;https://imghub.legspcpd.indevs.in/file/image/itdog-test-ip.png&quot; alt=&quot;itdog-test-ip.png&quot; /&gt;
已经解析完毕，可以使用&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;Worker项目优选（最简单）&lt;/h2&gt;
&lt;p&gt;接下来编写Worker路由&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// 域名前缀映射配置
const domain_mappings = {
  &apos;源站.com&apos;: &apos;最终访问头.&apos;,
//例如：
//&apos;gitea.072103.xyz&apos;: &apos;gitea.&apos;,
//则你设置Worker路由为gitea.*都将会反代到gitea.072103.xyz
};

addEventListener(&apos;fetch&apos;, event =&amp;gt; {
  event.respondWith(handleRequest(event.request));
});

async function handleRequest(request) {
  const url = new URL(request.url);
  const current_host = url.host;

  // 强制使用 HTTPS
  if (url.protocol === &apos;http:&apos;) {
    url.protocol = &apos;https:&apos;;
    return Response.redirect(url.href, 301);
  }

  const host_prefix = getProxyPrefix(current_host);
  if (!host_prefix) {
    return new Response(&apos;Proxy prefix not matched&apos;, { status: 404 });
  }

  // 查找对应目标域名
  let target_host = null;
  for (const [origin_domain, prefix] of Object.entries(domain_mappings)) {
    if (host_prefix === prefix) {
      target_host = origin_domain;
      break;
    }
  }

  if (!target_host) {
    return new Response(&apos;No matching target host for prefix&apos;, { status: 404 });
  }

  // 构造目标 URL
  const new_url = new URL(request.url);
  new_url.protocol = &apos;https:&apos;;
  new_url.host = target_host;

  // 创建新请求
  const new_headers = new Headers(request.headers);
  new_headers.set(&apos;Host&apos;, target_host);
  new_headers.set(&apos;Referer&apos;, new_url.href);

  try {
    const response = await fetch(new_url.href, {
      method: request.method,
      headers: new_headers,
      body: request.method !== &apos;GET&apos; &amp;amp;&amp;amp; request.method !== &apos;HEAD&apos; ? request.body : undefined,
      redirect: &apos;manual&apos;
    });

    // 复制响应头并添加CORS
    const response_headers = new Headers(response.headers);
    response_headers.set(&apos;access-control-allow-origin&apos;, &apos;*&apos;);
    response_headers.set(&apos;access-control-allow-credentials&apos;, &apos;true&apos;);
    response_headers.set(&apos;cache-control&apos;, &apos;public, max-age=600&apos;);
    response_headers.delete(&apos;content-security-policy&apos;);
    response_headers.delete(&apos;content-security-policy-report-only&apos;);

    return new Response(response.body, {
      status: response.status,
      statusText: response.statusText,
      headers: response_headers
    });
  } catch (err) {
    return new Response(`Proxy Error: ${err.message}`, { status: 502 });
  }
}

function getProxyPrefix(hostname) {
  for (const prefix of Object.values(domain_mappings)) {
    if (hostname.startsWith(prefix)) {
      return prefix;
    }
  }
  return null;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;创建路由:
&lt;img src=&quot;https://imghub.legspcpd.indevs.in/file/image/cf-ly.png&quot; alt=&quot;&quot; /&gt;
像这样
&lt;img src=&quot;https://imghub.legspcpd.indevs.in/file/image/cf-lytx.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;strong&gt;(SaaS将会引用二叉树树的教程)&lt;/strong&gt;&lt;/p&gt;
&lt;h1&gt;传统SaaS优选&lt;/h1&gt;
&lt;h3&gt;SaaS做了什么？&lt;/h3&gt;
&lt;p&gt;Cloudflare SaaS是一个不需要你改变一个域名的NS服务器，就可以让其受益于Cloudflare网络的功能。&lt;/p&gt;
&lt;p&gt;当一个域名被SaaS到一个已经在Cloudflare的域名后，它就完整受益所有Cloudflare服务。如我将 umami.acofork.com SaaS 到 2x.nz，我就可以在 2x.nz 里为 umami.acofork.com 写规则了：
&lt;img src=&quot;https://imghub.legspcpd.indevs.in/file/image/cf-saas-1.webp&quot; alt=&quot;cf-saas-1.webp&quot; /&gt;
&lt;img src=&quot;https://imghub.legspcpd.indevs.in/file/image/cf-saas-2.webp&quot; alt=&quot;cf-saas-2.webp&quot; /&gt;
&lt;img src=&quot;https://imghub.legspcpd.indevs.in/file/image/cf-saas-3.webp&quot; alt=&quot;cf-saas-3.webp&quot; /&gt;
Worker中的路由规则也适用：
&lt;img src=&quot;https://imghub.legspcpd.indevs.in/file/image/cf-saas-4.webp&quot; alt=&quot;cf-saas-4.webp&quot; /&gt;&lt;/p&gt;
&lt;p&gt;SaaS优选步骤
简单易懂（pro.yourdomain.com 是最终访问域名）： CF SaaS DNS origin.yourdomain.com -&amp;gt; 源站开小黄云 cdn.yourdomain.com -&amp;gt; cf优选域名 pro.yourdomain.com -&amp;gt; cdn.yourdomain.com&lt;/p&gt;
&lt;p&gt;CF SaaS 添加自定义主机名pro.yourdomain.com 源站为origin.yourdomain.com&lt;/p&gt;
&lt;p&gt;警告
Cloudflare最近将新接入的域名SSL默认设为了完全，记得将 SSL 改为灵活。&lt;/p&gt;
&lt;h3&gt;准备工作&lt;/h3&gt;
&lt;p&gt;我们需要一个域名或两个域名（单域名直接用子域名即可。双域名比如：onani.cn和acofork.cn）。&lt;/p&gt;
&lt;p&gt;如果在同一CF账号下不可用，请尝试将俩域名放置在不同账号&lt;/p&gt;
&lt;p&gt;这里我们让onani.cn成为主力域名，让acofork.cn成为辅助域名。&lt;/p&gt;
&lt;p&gt;单域名效果：
&lt;img src=&quot;https://imghub.legspcpd.indevs.in/file/image/cf-fastip-1.webp&quot; alt=&quot;cf-fastip-1.webp&quot; /&gt;&lt;/p&gt;
&lt;p&gt;具体步骤
首先新建一个DNS解析，指向你的源站，开启cf代理
&lt;img src=&quot;https://imghub.legspcpd.indevs.in/file/image/c94c34ee262fb51fb5697226ae0df2d804bf76fe.webp&quot; alt=&quot;c94c34ee262fb51fb5697226ae0df2d804bf76fe.webp&quot; /&gt;&lt;/p&gt;
&lt;p&gt;前往辅助域名的 SSL/TLS -&amp;gt; 自定义主机名。设置回退源为你刚才的DNS解析的域名：xlog.acofork.cn（推荐 HTTP 验证）&lt;/p&gt;
&lt;p&gt;点击添加自定义主机名。设置一个自定义主机名，比如 onani.cn，然后选择自定义源服务器，填写第一步的域名，即 xlog.acofork.cn。&lt;/p&gt;
&lt;p&gt;如果你想要创建多个优选也就这样添加，一个自定义主机名对应一个自定义源服务器。如果你将源服务器设为默认，则源服务器是回退源指定的服务器，即 xlog.acofork.cn&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://imghub.legspcpd.indevs.in/file/image/f6170f009c43f7c6bee4c2d29e2db7498fa1d0dc.webp&quot; alt=&quot;f6170f009c43f7c6bee4c2d29e2db7498fa1d0dc.webp&quot; /&gt;&lt;/p&gt;
&lt;p&gt;继续在你的辅助域名添加一条解析。CNAME到优选节点：如cloudflare.182682.xyz，不开启cf代理
&lt;img src=&quot;https://imghub.legspcpd.indevs.in/file/image/4f9f727b0490e0b33d360a2363c1026003060b29.webp&quot; alt=&quot;4f9f727b0490e0b33d360a2363c1026003060b29.webp&quot; /&gt;&lt;/p&gt;
&lt;p&gt;最后在你的主力域名添加解析。域名为之前在辅助域名的自定义主机名（onani.cn），目标为刚才的cdn.acofork.cn，不开启cf代理
&lt;img src=&quot;https://imghub.legspcpd.indevs.in/file/image/6f51cb2a42140a9bf364f88a5715291be616a254.webp&quot; alt=&quot;6f51cb2a42140a9bf364f88a5715291be616a254.webp&quot; /&gt;&lt;/p&gt;
&lt;p&gt;优选完毕，确保优选有效后尝试访问
&lt;img src=&quot;https://imghub.legspcpd.indevs.in/file/image/cf-fastip-10.webp&quot; alt=&quot;cf-fastip-10.webp&quot; /&gt;&lt;/p&gt;
&lt;p&gt;（可选）你也可以将cdn子域的NS服务器更改为阿里云\华为云\腾讯云云解析做线路分流解析&lt;/p&gt;
&lt;p&gt;优选工作流：用户访问 -&amp;gt; 由于最终访问的域名设置了CNAME解析，所以实际上访问了cdn.acofork.cn，并且携带 源主机名：onani.cn -&amp;gt; 到达优选域名进行优选 -&amp;gt; 优选结束，cf边缘节点识别到了携带的 源主机名：onani.cn 查询发现了回退源 -&amp;gt; 回退到回退源内容（xlog.acofork.cn） -&amp;gt; 访问成功&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;针对于Cloudflare Page&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;你可以直接将你绑定到Page的子域名直接更改NS服务器到阿里云\华为云\腾讯云云解析做线路分流解析&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;将您的Page项目升级为Worker项目，使用Worker优选方案（更简单）。详细方法见：【CF Page一键迁移到Worker？好处都有啥？-哔哩哔哩】 &lt;a href=&quot;https://www.bilibili.com/video/BV1wBTEzREcb&quot;&gt;https://www.bilibili.com/video/BV1wBTEzREcb&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;针对于Cloudflare Workers&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;在Workers中添加路由，然后直接将你的路由域名从指向xxx.worker.dev改为优选域名即可&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;如果是外域，SaaS后再添加路由即可，就像：
&lt;img src=&quot;https://imghub.legspcpd.indevs.in/file/image/cf-fastip-12.webp&quot; alt=&quot;cf-fastip-12.webp&quot; /&gt;
&lt;img src=&quot;https://imghub.legspcpd.indevs.in/file/image/cf-fastip-13.webp&quot; alt=&quot;cf-fastip-13.webp&quot; /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;针对于使用了各种CF规则的网站&lt;/h1&gt;
&lt;p&gt;你只需要让规则针对于你的 &lt;strong&gt;最终访问域名&lt;/strong&gt; ，因为CF的规则是看主机名的，而不是看是由谁提供的。&lt;/p&gt;
&lt;h1&gt;针对于虚拟主机&lt;/h1&gt;
&lt;p&gt;保险起见，建议将源站和优选域名同时绑定到你的虚拟主机，保证能通再一个个删。&lt;/p&gt;
</content:encoded></item><item><title>日记</title><link>https://fuwari.vercel.app/posts/day/</link><guid isPermaLink="true">https://fuwari.vercel.app/posts/day/</guid><pubDate>Tue, 06 May 1997 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;感觉有点累啊...&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;推荐歌曲:&lt;/p&gt;
&lt;p&gt;Zeraphym - Lifeline
这首歌对我心灵造成的震撼，使我无法用语言来描述，因为我不觉得世界上有哪个词能形容这首歌的完美！！！&lt;/p&gt;
</content:encoded></item><item><title>记录</title><link>https://fuwari.vercel.app/posts/qilu/</link><guid isPermaLink="true">https://fuwari.vercel.app/posts/qilu/</guid><pubDate>Mon, 01 Jan 1900 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Github反向代理：&lt;a href=&quot;https://v-gh.legspcpd.de5.net/&quot;&gt;https://v-gh.legspcpd.de5.net/&lt;/a&gt;&lt;/p&gt;
</content:encoded></item></channel></rss>