<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>安全 on 桃语苑</title><link>https://www.whitepeach.top/tags/%E5%AE%89%E5%85%A8/</link><description>Recent content in 安全 on 桃语苑</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Thu, 02 Jan 2025 09:28:39 +0000</lastBuildDate><atom:link href="https://www.whitepeach.top/tags/%E5%AE%89%E5%85%A8/index.xml" rel="self" type="application/rss+xml"/><item><title>同时使用国内CDN与Cloudflare分线解析提升全球访问速度与安全性</title><link>https://www.whitepeach.top/post/double-line-cdn/</link><pubDate>Thu, 02 Jan 2025 09:28:39 +0000</pubDate><guid>https://www.whitepeach.top/post/double-line-cdn/</guid><description>&lt;img src="https://www.whitepeach.top/post/double-line-cdn/cover.png" alt="Featured image of post 同时使用国内CDN与Cloudflare分线解析提升全球访问速度与安全性" />&lt;p>知周所众，我们的大善人Cloudflare在国内没有服务器，因此被称为减速器，那么如何优雅的同时使用Cloudflare**(以下简称为CF)**和其他国内CDN呢？&lt;/p>
&lt;p>🛒材料准备：&lt;/p>
&lt;ul class="wp-block-list">
&lt;li>
需要托管的网站&lt;s>(废话&lt;/s>)
&lt;/li>
&lt;li>
一个主域名、一个闲置域名（能托管CF即可）
&lt;/li>
&lt;li>
一个CF账号、一个其他CDN账号
&lt;/li>
&lt;/ul>
&lt;h2 id="一将闲置域名托管至cf">一、将闲置域名托管至CF
&lt;/h2>&lt;p>一些免费的域名也可以托管至CF，这里不作推荐，可以自行查阅&lt;figure class="wp-block-image size-large">&lt;/p>
&lt;p>&lt;img loading="lazy" decoding="async" width="1024" height="503" src="https://img.whitepeach.top/1735805821-image-1024x503.png" alt="" class="wp-image-85" srcset="https://img.whitepeach.top/1735805821-image-1024x503.png 1024w, https://img.whitepeach.top/1735805821-image-300x147.png 300w, https://img.whitepeach.top/1735805821-image-768x377.png 768w, https://img.whitepeach.top/1735805821-image.png 1202w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /> &lt;/figure>&lt;/p>
&lt;p>随后添加DNS记录至要加速的网站，也就是网站的源IP地址&lt;br>
这里以CNAME.xxx.xxx为例&lt;figure class="wp-block-image size-large">&lt;/p>
&lt;p>&lt;img loading="lazy" decoding="async" width="1024" height="330" src="https://img.whitepeach.top/1735806995-ee75380b5d825e56b5cea7feafe4f74e-1024x330.png" alt="" class="wp-image-87" srcset="https://img.whitepeach.top/1735806995-ee75380b5d825e56b5cea7feafe4f74e-1024x330.png 1024w, https://img.whitepeach.top/1735806995-ee75380b5d825e56b5cea7feafe4f74e-300x97.png 300w, https://img.whitepeach.top/1735806995-ee75380b5d825e56b5cea7feafe4f74e-768x248.png 768w, https://img.whitepeach.top/1735806995-ee75380b5d825e56b5cea7feafe4f74e-1536x495.png 1536w, https://img.whitepeach.top/1735806995-ee75380b5d825e56b5cea7feafe4f74e.png 2034w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /> &lt;/figure>&lt;/p>
&lt;p>然后去到_&lt;strong>SSL/TLS-&amp;gt;自定义主机&lt;/strong>_名下，将你的主域名添加为自定义主机，回退源设置为你刚才配置的闲置域名DNS记录，按照引导完成验证即可，如图所示&lt;/p>
&lt;div class="warning shortcodestyle">
&lt;i class="fa-solid fa-triangle-exclamation">&lt;/i>这里需要你添加支付方式，但是无需付费！！！
&lt;/div>&lt;figure class="wp-block-image size-large">
&lt;p>&lt;img loading="lazy" decoding="async" width="1024" height="746" src="https://img.whitepeach.top/1735807678-7BBAF7595B-D63D-423e-98FD-05332B2FC6847D-1024x746.png" alt="" class="wp-image-89" srcset="https://img.whitepeach.top/1735807678-7BBAF7595B-D63D-423e-98FD-05332B2FC6847D-1024x746.png 1024w, https://img.whitepeach.top/1735807678-7BBAF7595B-D63D-423e-98FD-05332B2FC6847D-300x219.png 300w, https://img.whitepeach.top/1735807678-7BBAF7595B-D63D-423e-98FD-05332B2FC6847D-768x560.png 768w, https://img.whitepeach.top/1735807678-7BBAF7595B-D63D-423e-98FD-05332B2FC6847D.png 1283w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /> &lt;/figure>&lt;/p>
&lt;p>到这里就已经完成了大半了🎉&lt;/p>
&lt;div class="task shortcodestyle">
&lt;i class="fa-solid fa-clipboard-list">&lt;/i>后续Cloudflare的配置网上都有很多教程，这里就不再赘述了，正常配置即可
&lt;/div>
&lt;h2 id="二添加其他cdn">二、添加其他CDN
&lt;/h2>&lt;p>这里以本站使用的又拍云为例，其他CDN同理，只要能达到加速的目的即可&lt;br>
自行注册登录后创建服务，不同产品的使用方式各不相同，可以自行查阅文档&lt;/p>
&lt;figure class="wp-block-image size-large">
&lt;p>&lt;img loading="lazy" decoding="async" width="1024" height="832" src="https://img.whitepeach.top/1735808144-image-1024x832.png" alt="" class="wp-image-90" srcset="https://img.whitepeach.top/1735808144-image-1024x832.png 1024w, https://img.whitepeach.top/1735808144-image-300x244.png 300w, https://img.whitepeach.top/1735808144-image-768x624.png 768w, https://img.whitepeach.top/1735808144-image.png 1307w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /> &lt;/figure>&lt;/p>
&lt;p>添加好后会获得一个CNAME解析地址，这就是一会分流要用到的地址了&lt;/p>
&lt;h2 id="三分线解析">三、分线解析
&lt;/h2>&lt;p>这里使用阿里云的解析为例，其他家的DNS解析服务同理&lt;br>
找到DNS解析选择要解析的域名，点击添加记录，选择CNAME解析&lt;/p>
&lt;figure class="wp-block-image size-full">
&lt;p>&lt;img loading="lazy" decoding="async" width="853" height="552" src="https://img.whitepeach.top/1735808593-image.png" alt="" class="wp-image-91" srcset="https://img.whitepeach.top/1735808593-image.png 853w, https://img.whitepeach.top/1735808593-image-300x194.png 300w, https://img.whitepeach.top/1735808593-image-768x497.png 768w" sizes="auto, (max-width: 853px) 100vw, 853px" /> &lt;/figure>&lt;/p>
&lt;p>分别添加两条解析，一条解析请求来源设置为默认，记录值为国内CDN的CNAME域名，另一条解析请求来源设置为境外，记录值设置为**&lt;code>CNAME.闲置域名.xxx&lt;/code>**(你刚才设置的域名)，这样境外的请求就会通过CF代理了&lt;figure class="wp-block-image size-large">&lt;/p>
&lt;p>&lt;img loading="lazy" decoding="async" width="1024" height="69" src="https://img.whitepeach.top/1735809040-QQ截图20250102171021-1024x69.png" alt="" class="wp-image-92" srcset="https://img.whitepeach.top/1735809040-QQ截图20250102171021-1024x69.png 1024w, https://img.whitepeach.top/1735809040-QQ截图20250102171021-300x20.png 300w, https://img.whitepeach.top/1735809040-QQ截图20250102171021-768x52.png 768w, https://img.whitepeach.top/1735809040-QQ截图20250102171021.png 1303w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /> &lt;/figure>&lt;/p>
&lt;hr class="wp-block-separator has-alpha-channel-opacity" />
&lt;p>最后我们可以用工具检验一下设置的是否正确&lt;br>
&lt;a href="https://zhale.me/dns/" target="_blank" rel="nofollow" >&lt;a class="link" href="https://zhale.me/dns/" target="_blank" rel="noopener"
>https://zhale.me/dns/&lt;/a>&lt;/a>&lt;figure class="wp-block-image size-large">&lt;/p>
&lt;p>&lt;img loading="lazy" decoding="async" width="1024" height="683" src="https://img.whitepeach.top/1735809359-image-1024x683.png" alt="" class="wp-image-93" srcset="https://img.whitepeach.top/1735809359-image-1024x683.png 1024w, https://img.whitepeach.top/1735809359-image-300x200.png 300w, https://img.whitepeach.top/1735809359-image-768x512.png 768w, https://img.whitepeach.top/1735809359-image-1536x1025.png 1536w, https://img.whitepeach.top/1735809359-image.png 1538w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /> &lt;/figure>&lt;/p>
&lt;p>如果像我一样解析没有源站IP，解析出来的IP是CDN的IP那就是成功了&lt;br>
那么有人就要问了：啊？我怎么知道这是不是CDN的IP呢？&lt;br>
答：可以直接去CDN的官网查一下网段是多少噢，例如CF的 &lt;a href="https://www.cloudflare-cn.com/ips/" target="_blank" rel="noreferrer noopener" rel="nofollow" >&lt;a href="https://www.cloudflare-cn.com/ips/" target="_blank" rel="nofollow" >IP 地址范围 | Cloudflare&lt;/a>&lt;/a>&lt;br>
也可以直接查询IP所属地&lt;/p>
&lt;p>总之，只要不是在互联网上裸奔就行了，切记在网络上暴露自身IP是一件极度危险的事情！&lt;br>
有问题欢迎留言讨论噢&lt;/p></description></item></channel></rss>