<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Workers &#8211; 95博客</title>
	<atom:link href="https://95bok.cn/tag/workers/feed/" rel="self" type="application/rss+xml" />
	<link>https://95bok.cn</link>
	<description>云烟</description>
	<lastBuildDate>Thu, 09 Apr 2026 10:23:49 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://95bok.cn/wp-content/uploads/2025/11/cropped-1740116058152-32x32.jpg</url>
	<title>Workers &#8211; 95博客</title>
	<link>https://95bok.cn</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Cloudflare 免费节点方案：Workers + Tunnel + 优选 IP 完整教程</title>
		<link>https://95bok.cn/cloudflare-free-node-workers-tunnel/</link>
					<comments>https://95bok.cn/cloudflare-free-node-workers-tunnel/#respond</comments>
		
		<dc:creator><![CDATA[云烟]]></dc:creator>
		<pubDate>Thu, 09 Apr 2026 06:52:11 +0000</pubDate>
				<category><![CDATA[IPv6/远程访问]]></category>
		<category><![CDATA[未分类]]></category>
		<category><![CDATA[甲骨文云]]></category>
		<category><![CDATA[Cloudflare]]></category>
		<category><![CDATA[Tunnel]]></category>
		<category><![CDATA[Workers]]></category>
		<category><![CDATA[优选IP]]></category>
		<category><![CDATA[免费节点]]></category>
		<guid isPermaLink="false">https://95bok.cn/cloudflare-free-node-workers-tunnel/</guid>

					<description><![CDATA[Cloudflare 免费套餐功能很强，Workers、Tunnel、DNS 都能白嫖。这篇写怎么用它搭节点。 ... <a title="Cloudflare 免费节点方案：Workers + Tunnel + 优选 IP 完整教程" class="read-more" href="https://95bok.cn/cloudflare-free-node-workers-tunnel/" aria-label="阅读 Cloudflare 免费节点方案：Workers + Tunnel + 优选 IP 完整教程">阅读更多</a>]]></description>
										<content:encoded><![CDATA[<p>Cloudflare 免费套餐功能很强，Workers、Tunnel、DNS 都能白嫖。这篇写怎么用它搭节点。</p>
<hr />
<h2>方案一：Workers Agent</h2>
<p>原理：Workers 相当于一个运行在 Cloudflare 边缘的反代。请求先到 CF，CF 转发到你的源站。</p>
<p>创建 Worker → 部署以下代码：</p>
<pre><code class="language-javascript">const whitelist = new Set(['/v1/chat/completions', '/api/chat', '/health']);

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

async function handleRequest(request) {
  const url = new URL(request.url);
  if (!whitelist.has(url.pathname)) {
    return new Response('Not Found', { status: 404 });
  }

  const target = new URL('http://你的源站IP:11434' + url.pathname + url.search);

  const headers = new Headers(request.headers);
  headers.set('Host', target.host);

  return fetch(target, {
    method: request.method,
    headers: headers,
    body: request.method !== 'GET' ? request.body : null,
  });
}</code></pre>
<p>绑定自定义域名（Workers → 触发器 → 添加自定义域名），比如 <code>ai-proxy.yourdomain.com</code>。</p>
<p>这样你的本地 Ollama API 就能通过 CF 的 CDN 访问了。免费 Workers 每天 10 万次请求，个人用够了。</p>
<hr />
<h2>方案二：Cloudflare Tunnel</h2>
<p>Tunnel 不需要开端口，不需要公网 IP，内网机器也能暴露。适合家里 NAS、公司电脑跑 Ollama 但没公网 IP 的情况。</p>
<p>在 Cloudflare 网页上 → Zero Trust → Networks → Tunnels → 创建 Tunnel → 选 Docker 安装方式：</p>
<pre><code class="language-bash">docker run -d --name cloudflared 
  cloudflare/cloudflared:latest tunnel --no-autoupdate run 
  --token 你的TOKEN</code></pre>
<p>然后配置路由：Tunnel 设置 → Public Hostname → 添加：</p>
<ul>
<li>Subdomain: ai</li>
<li>Domain: yourdomain.com</li>
<li>Service: http://localhost:11434</li>
</ul>
<p>访问 <code>https://ai.yourdomain.com</code> 就能到你的本地 Ollama。</p>
<p>Tunnel 的好处：不需要服务器有公网 IP，不需要开端口，不需要搞证书。坏处是走 CF 中转，速度比直连慢一些。</p>
<hr />
<h2>方案三：优选 IP</h2>
<p>CF 的节点 IP 在国内速度差异很大。手动找一个快的：</p>
<pre><code class="language-bash"># 用 ipip 或类似工具扫描，找一个延迟低的 CF IP
# 然后直接访问 https://你的域名 --resolve yourdomain.com:443:优选IP</code></pre>
<p>或者用 <code>cf-checker</code> 之类的工具批量扫。找到后改 hosts 文件或路由器 DNS 指定。</p>
<p>优选 IP 不稳定，CF 会换。建议加 cron 定期扫描，或者用自动优选脚本。</p>
<hr />
<h2>方案对比</h2>
<table>
<thead>
<tr>
<th>方案</th>
<th>需要公网 IP</th>
<th>需要域名</th>
<th>免费</th>
<th>延迟</th>
</tr>
</thead>
<tbody>
<tr>
<td>Workers Agent</td>
<td>源站要有</td>
<td>是</td>
<td>是</td>
<td>看源站位置</td>
</tr>
<tr>
<td>Tunnel</td>
<td>不需要</td>
<td>是</td>
<td>是</td>
<td>较高（中转）</td>
</tr>
<tr>
<td>优选 IP</td>
<td>不需要</td>
<td>是</td>
<td>是</td>
<td>看选到的 IP</td>
</tr>
</tbody>
</table>
<p>三个方案可以叠加使用。Tunnel + 优选 IP 是目前内网穿透最稳的组合。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://95bok.cn/cloudflare-free-node-workers-tunnel/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
