mirror of
https://github.com/afoim/fuwari.git
synced 2026-01-31 09:03:18 +08:00
posts: 添加Cloudflare SaaS文章及相关图片资源
This commit is contained in:
BIN
src/content/assets/images/cf-saas-1.png
Normal file
BIN
src/content/assets/images/cf-saas-1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 112 KiB |
BIN
src/content/assets/images/cf-saas-2.png
Normal file
BIN
src/content/assets/images/cf-saas-2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 72 KiB |
BIN
src/content/assets/images/cf-saas-3.png
Normal file
BIN
src/content/assets/images/cf-saas-3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 130 KiB |
BIN
src/content/assets/images/cf-saas-4.png
Normal file
BIN
src/content/assets/images/cf-saas-4.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
BIN
src/content/assets/images/cf-saas.png
Normal file
BIN
src/content/assets/images/cf-saas.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 63 KiB |
35
src/content/posts/cf-saas.md
Normal file
35
src/content/posts/cf-saas.md
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
title: 你真的玩懂了Cloudflare SaaS吗?为什么经由SaaS的流量可以做优选?
|
||||
published: 2026-01-16T20:16:09
|
||||
description: 我们都知道,可以通过SaaS来做优选,但是为什么用SaaS就能做优选呢,为什么直接CNAME就不能优选呢?这篇文章带你一窥真相!
|
||||
image: ../assets/images/cf-saas.png
|
||||
draft: false
|
||||
lang: ""
|
||||
---
|
||||
# 前言
|
||||
Cloudflare SaaS是一个不需要你改变一个域名的NS服务器,就可以让其受益于Cloudflare网络
|
||||
|
||||
# 原理
|
||||
首先我们要知道CDN是如何通过不同域名给不同内容的
|
||||
|
||||
我们可以将其抽象为2层,规则层和解析层。当我们普通的在Cloudflare添加一条开启了小黄云的解析。Cloudflare会为我们做两件事,1是帮我们写一条DNS解析指向Cloudflare,2是在Cloudflare创建一条路由规则
|
||||
|
||||
如果说你想要优选,实际上你是要手动更改这个DNS解析,使其指向一个更快的Cloudflare节点
|
||||
|
||||
但是,一旦你将小黄云关闭,路由规则也会被删除,再访问就会显示DNS直接指向IP
|
||||
|
||||
再但是,如果你使用SaaS,你就会发现Cloudflare不再帮你做这两件事了,这两件事你都可以自己做了
|
||||
|
||||
写一条SaaS规则+你自己写一条CNAME解析到优选节点,完全就可以做到优选了
|
||||
|
||||
具体如何创建一个SaaS规则可以前往 [Cloudflare 优选](/posts/cf-fastip/) 查看
|
||||
|
||||
# SaaS后,就是一家人了
|
||||
如果一个域名已经被SaaS到一个已经在Cloudflare的域名,将完整受益所有Cloudflare服务
|
||||
|
||||
如我将 umami.acofork.com SaaS 到 2x.nz ,我就可以在 2x.nz 里为 umami.acofork.com 写规则了
|
||||

|
||||

|
||||

|
||||
Worker中的路由规则也适用
|
||||

|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
import Analytics from "@vercel/analytics/astro";
|
||||
import "@fontsource/roboto/400.css";
|
||||
import "@fontsource/roboto/500.css";
|
||||
import "@fontsource/roboto/700.css";
|
||||
@@ -248,41 +247,6 @@ const bannerOffset =
|
||||
<link rel="alternate" type="application/rss+xml" title={profileConfig.name} href={`${Astro.site}rss.xml`}/>
|
||||
<!-- Umami分析(自建) -->
|
||||
<script defer src="https://umami.acofork.com/script.js" data-website-id="5d710dbd-3a2e-43e3-a553-97b415090c63" data-swup-ignore-script></script>
|
||||
{/* - Umami分析(云-备用)
|
||||
<script defer src="https://cloud.umami.is/script.js" data-website-id="5d710dbd-3a2e-43e3-a553-97b415090c63" data-swup-ignore-script></script> */}
|
||||
<!-- 超级吊的Umami eop -->
|
||||
<script defer src="https://eo-umami.acofork.com/script.js" data-website-id="3f525363-5e81-4653-9491-1bd205c2a571"></script>
|
||||
<!-- 百度统计 -->
|
||||
<script data-swup-ignore-script>
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "https://hm.baidu.com/hm.js?b219eaad631b87d273cfe72148b2138b";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
<!-- clarity 分析 -->
|
||||
<script type="text/javascript" data-swup-ignore-script>
|
||||
(function(c,l,a,r,i,t,y){
|
||||
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
|
||||
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
|
||||
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
|
||||
})(window, document, "clarity", "script", "t8f0gmcwtx");
|
||||
</script>
|
||||
|
||||
<!-- 谷歌分析 -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-9Z4LT4H8KH" data-swup-ignore-script></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'G-9Z4LT4H8KH');
|
||||
</script>
|
||||
|
||||
<!-- Cloudflare Web Analytics --><script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "15fe148e91b34f10a15652e1a74ab26c"}' data-swup-ignore-script></script><!-- End Cloudflare Web Analytics -->
|
||||
</head>
|
||||
<body class=" min-h-screen transition " class:list={[{"lg:is-home": isHomePage, "enable-banner": enableBanner}]}
|
||||
data-overlayscrollbars-initialize
|
||||
@@ -356,7 +320,6 @@ var _hmt = _hmt || [];
|
||||
checkDomain();
|
||||
}
|
||||
</script>
|
||||
<Analytics />
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user