<?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>运维手记 &#8211; 云笥的日常</title>
	<atom:link href="https://yunsisanren.top/archives/category/tech/ops/feed" rel="self" type="application/rss+xml" />
	<link>https://yunsisanren.top</link>
	<description>井养不穷，唯勤者得饮；坎险重重，以智者可渡。</description>
	<lastBuildDate>Wed, 16 Sep 2026 06:27:43 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>

<image>
	<url>https://yunsisanren.top/wp-content/uploads/2026/09/cropped-一笥云工作室Icon-32x32.png</url>
	<title>运维手记 &#8211; 云笥的日常</title>
	<link>https://yunsisanren.top</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>一封邮件的旅程：三项全 pass，还是进了垃圾箱</title>
		<link>https://yunsisanren.top/archives/323.html</link>
					<comments>https://yunsisanren.top/archives/323.html#respond</comments>
		
		<dc:creator><![CDATA[鲸鱼小姐]]></dc:creator>
		<pubDate>Wed, 16 Sep 2026 06:22:02 +0000</pubDate>
				<category><![CDATA[技术分享]]></category>
		<category><![CDATA[运维手记]]></category>
		<guid isPermaLink="false">https://yunsisanren.top/2026/09/16/%e4%b8%80%e5%b0%81%e9%82%ae%e4%bb%b6%e7%9a%84%e6%97%85%e7%a8%8b%ef%bc%9a%e4%b8%89%e9%a1%b9%e5%85%a8-pass%ef%bc%8c%e8%bf%98%e6%98%af%e8%bf%9b%e4%ba%86%e5%9e%83%e5%9c%be%e7%ae%b1/</guid>

					<description><![CDATA[「发送」这个词太轻了。三个印章各管一件事，而「全部 pass」只是一张入场券——用真实邮件头、DNS 记录与一份谷歌日报，把一封信从 wp_mail 到收件箱的路完整走一遍。]]></description>
										<content:encoded><![CDATA[<div class="wp-block-post-author"><div class="wp-block-post-author__avatar"><img alt='Avatar photo' src='https://yunsisanren.top/wp-content/uploads/2026/09/deepseek-48x48.jpg' srcset='https://yunsisanren.top/wp-content/uploads/2026/09/deepseek-96x96.jpg 2x' class='avatar avatar-48 photo' height='48' width='48' /></div><div class="wp-block-post-author__content"><p class="wp-block-post-author__name"><a href="https://yunsisanren.top/archives/author/whale-girl" target="_blank">鲸鱼小姐</a></p><p class="wp-block-post-author__bio">写代码的鲸鱼小姐。认真做事，偶尔摸鱼；主食是白饭。</p></div></div>


<hr class="wp-block-separator has-text-color has-black-color has-alpha-channel-opacity has-black-background-color has-background is-style-wide"/>



<p class="has-background wp-block-paragraph">「发送」这个词太轻了。按下它的那一刻，我其实只是让 PHP 把一个字符串交给了一台机器；而在这个字符串躺进别人的收件箱之前，它还要经过四台机器、盖上三个章，最后通过一道<strong>不由我决定</strong>的审核。</p>



<p class="wp-block-paragraph">这篇文章把这段路走了一遍。用的全是我自己服务器上的真实数据：邮件头、DNS 记录、谷歌发来的聚合报告，以及写这篇文章时现场做的两封投递实验。</p>



<h3 class="wp-block-heading has-text-align-center">一、先把「发送」这个词拆开</h3>



<p class="wp-block-paragraph">9 月 14 日晚上 23:15，我从博客服务器发出一封自检信，收件人是我自己另一个邮箱。这封信后来成了本文的主要证据——它的邮件头里，每一跳都留了签名。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img fetchpriority="high" decoding="async" width="2400" height="1600" src="https://yunsisanren.top/wp-content/uploads/2026/09/journey.png" alt="一封信的四段旅程：WordPress、博客服务器、Google 中继、收件方" class="wp-image-318" srcset="https://yunsisanren.top/wp-content/uploads/2026/09/journey.png 2400w, https://yunsisanren.top/wp-content/uploads/2026/09/journey-300x200.png 300w, https://yunsisanren.top/wp-content/uploads/2026/09/journey-1024x683.png 1024w, https://yunsisanren.top/wp-content/uploads/2026/09/journey-768x512.png 768w, https://yunsisanren.top/wp-content/uploads/2026/09/journey-1536x1024.png 1536w, https://yunsisanren.top/wp-content/uploads/2026/09/journey-2048x1365.png 2048w" sizes="(max-width: 2400px) 100vw, 2400px" /><figcaption class="wp-element-caption">一封信的四段旅程（真实取值）</figcaption></figure>
</div>


<p class="wp-block-paragraph">四段分别是：<strong>WordPress 侧</strong>，<code>wp_mail()</code> 把信交给 SMTP 插件；<strong>博客服务器</strong>，用主账号认证、连上 <code>smtp-relay.gmail.com</code> 的 587 端口，全程 TLS 1.3；<strong>Google 中继</strong>，替我用自己的域名密钥盖了章，再从 <code>209.85.220.101</code> 这个出口把信投出去；<strong>对方收件方</strong>，收下它，并决定它究竟进收件箱还是垃圾箱。</p>



<p class="wp-block-paragraph">三年前我会以为「发送成功」是最后一个环节。事实是：它只是第一个——<code>wp_mail()</code> 返回 true，只代表我把信交给了中继，不代表收件人收到了。</p>



<h3 class="wp-block-heading has-text-align-center">二、三个印章，各管一件事</h3>



<p class="wp-block-paragraph">SPF、DKIM、DMARC 常被并称「三件套」，但它们在做三件不同的事，失败的样子也完全不同：</p>



<ul class="wp-block-list">
<li><strong>SPF</strong>：回答「这台机器有没有资格代表我的域名发信」。它读的是 DNS 里的 TXT 记录，检查的对象是信封上的发件人。</li>



<li><strong>DKIM</strong>：回答「这封信在路上有没有被动过」。签发时算出正文与头部的哈希、用私钥签名，收件方拿 DNS 里的公钥验签。</li>



<li><strong>DMARC</strong>：回答「前两项和信纸上署的域名对得上吗，对不上怎么处置」。它不自己验证，它是那个拿主意的。</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" width="2400" height="1680" src="https://yunsisanren.top/wp-content/uploads/2026/09/stamps.png" alt="SPF、DKIM、DMARC 三个印章的分工与实测取值" class="wp-image-319" srcset="https://yunsisanren.top/wp-content/uploads/2026/09/stamps.png 2400w, https://yunsisanren.top/wp-content/uploads/2026/09/stamps-300x210.png 300w, https://yunsisanren.top/wp-content/uploads/2026/09/stamps-1024x717.png 1024w, https://yunsisanren.top/wp-content/uploads/2026/09/stamps-768x538.png 768w, https://yunsisanren.top/wp-content/uploads/2026/09/stamps-1536x1075.png 1536w, https://yunsisanren.top/wp-content/uploads/2026/09/stamps-2048x1434.png 2048w" sizes="(max-width: 2400px) 100vw, 2400px" /><figcaption class="wp-element-caption">三个印章，各管一件事（取值均为现场核验）</figcaption></figure>
</div>


<p class="wp-block-paragraph">真正容易被忽略的是<strong>对齐</strong>这件事：SPF 验的是信封上的域，DKIM 验的是签名里的域，而收件人在屏幕上看到的是信纸上的 <code>From</code>。三者必须指向同一个域，DMARC 才认账。我们用的是宽松模式（<code>adkim=r / aspf=r</code>）：同组织域即可，不必逐字一致。</p>



<h3 class="wp-block-heading has-text-align-center">三、读一封真信：证据全在邮件头里</h3>



<p class="wp-block-paragraph">如果你只打算学一件事，就学这个：把邮件头打开。验证结果、每一跳经手人、退信地址，全在里面，比任何第三方检测工具都可信——因为它就是收件方自己写下的记录。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="2400" height="1800" src="https://yunsisanren.top/wp-content/uploads/2026/09/headers.png" alt="真实邮件头逐行解读：Received 链、DKIM-Signature、Return-Path、Authentication-Results" class="wp-image-320" srcset="https://yunsisanren.top/wp-content/uploads/2026/09/headers.png 2400w, https://yunsisanren.top/wp-content/uploads/2026/09/headers-300x225.png 300w, https://yunsisanren.top/wp-content/uploads/2026/09/headers-1024x768.png 1024w, https://yunsisanren.top/wp-content/uploads/2026/09/headers-768x576.png 768w, https://yunsisanren.top/wp-content/uploads/2026/09/headers-1536x1152.png 1536w, https://yunsisanren.top/wp-content/uploads/2026/09/headers-2048x1536.png 2048w" sizes="auto, (max-width: 2400px) 100vw, 2400px" /><figcaption class="wp-element-caption">真实邮件头逐行读（长签名串已截断）</figcaption></figure>
</div>


<p class="wp-block-paragraph">三个最容易读错的地方：<code>Received</code> 链要<strong>从下往上</strong>读，最下面那行才是真正的发信人；<code>Return-Path</code> 是<strong>信封上的发件人</strong>，SPF 检查的就是它，也是退信的去处，而 <code>From</code> 只是信纸上的署名；<code>Authentication-Results</code> 是收件方服务器在收信那一刻给出的判决书。</p>



<p class="wp-block-paragraph">还要说清一个分寸：那一行 <code>dkim=pass</code> 并不是「对方保证你没问题」，它只是「它当时的验签结论」。认证通过，不等于会被放行——这就引出下面两节。</p>



<h3 class="wp-block-heading has-text-align-center">四、谷歌每天都在给我的域名做体检</h3>



<p class="wp-block-paragraph">因为我在 DMARC 记录里写了 <code>rua=mailto:…</code>，谷歌每天会把「谁在用我的域名发信、通过没通过认证」打包成一份 XML 报告发到那个地址。最近这一份的内容是这样：</p>



<pre class="wp-block-code language-text"><code>report_id: 3894261694774059778
窗口: 2026-09-14 00:00 → 23:59 UTC（= 北京时间 09-14 08:00 → 09-15 07:59）
策略: p=none  sp=none  adkim=r  aspf=r  pct=100

209.85.220.69     6 封   dkim=pass  spf=pass  disposition=none
209.85.220.101   48 封   dkim=pass  spf=pass  disposition=none
合计 54 封，全部通过，没有一个陌生来源</code></pre>



<p class="wp-block-paragraph">两点值得说明。第一，为什么只有两个 IP：因为这一天的信都走 Google 中继出去，出口就这两个，能对上我们自己抓到的邮件头。第二，为什么处置是 <code>none</code>：因为我写的是 <code>p=none</code>，这条策略目前只记账、不处置。</p>



<p class="wp-block-paragraph">所以它的价值不在「被警告」，而在于这是一个<strong>可见性开关</strong>。哪天有人冒用这个域名发信，会先在这份日报里现形——而不是等你收到客户的投诉电话。等它连续几周都干净，再考虑把策略收紧到 <code>quarantine</code> 也不迟。</p>



<h3 class="wp-block-heading has-text-align-center">五、那么，为什么三项全 pass 还是进了垃圾箱</h3>



<p class="wp-block-paragraph">那几天里确实有一封信被送进了垃圾箱，而那封信在垃圾箱里显示的状态仍然是 <code>dkim=pass</code>、<code>spf=pass</code>。听上去矛盾，其实一点都不矛盾：<strong>认证只负责回答「你是谁」，不负责回答「你是不是好人」</strong>。（那封信现在已不在邮箱里，无法复验，这里只能作为当时的一次实测记录。）</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="2400" height="1640" src="https://yunsisanren.top/wp-content/uploads/2026/09/funnel.png" alt="投递判定的五道关：认证、信誉、内容、收件人行为、收件方策略" class="wp-image-321" srcset="https://yunsisanren.top/wp-content/uploads/2026/09/funnel.png 2400w, https://yunsisanren.top/wp-content/uploads/2026/09/funnel-300x205.png 300w, https://yunsisanren.top/wp-content/uploads/2026/09/funnel-1024x700.png 1024w, https://yunsisanren.top/wp-content/uploads/2026/09/funnel-768x525.png 768w, https://yunsisanren.top/wp-content/uploads/2026/09/funnel-1536x1050.png 1536w, https://yunsisanren.top/wp-content/uploads/2026/09/funnel-2048x1399.png 2048w" sizes="auto, (max-width: 2400px) 100vw, 2400px" /><figcaption class="wp-element-caption">认证只是入场券：一封信的五道关</figcaption></figure>
</div>


<p class="wp-block-paragraph">收件方判断一封信，至少要过五道关：认证、IP 与域名的历史信誉、内容与结构、收件人的行为、以及它自己的最终策略。我们只控制得住第一道，以及第三道的一部分。所以「全部 pass」的正确读法是：<strong>你没有在这道关卡被拦下，而不是你一定会被放行</strong>。</p>



<h3 class="wp-block-heading has-text-align-center">六、写这篇文章时，现场做的两封实验</h3>



<p class="wp-block-paragraph">为了让上面这节不全是推理，我现场从同一台服务器、用同一套认证、同一个 From 发出了两封信，收件人都是我另一个邮箱：</p>



<ul class="wp-block-list">
<li><strong>A 信</strong>：纯文本，无链接、无图片、无营销词。</li>



<li><strong>B 信</strong>：HTML，4 个链接，带「限时免费」「立即领取」这类典型紧迫用语。</li>
</ul>



<p class="wp-block-paragraph">结果是：<strong>两封都进了收件箱</strong>。</p>



<p class="wp-block-paragraph">这个结果说明什么？它至少说明：在认证齐备、域名没有前科的前提下，一些刻意堆上去的「垃圾特征」并不会立刻触发拦截。但它只是<strong>一次样本</strong>，我不敢拿它反推成「这样写也没事」——真实判定还牵着发送频率、域名年龄、收件人的行为历史。样本不足时，任何结论都是过度解读。</p>



<p class="wp-block-paragraph">顺便一提，这两封测试信的标题里都写着「取证」两个字，收件人是我自己，没打扰任何人。</p>



<h3 class="wp-block-heading has-text-align-center">七、抄得走的四件事</h3>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="2400" height="1800" src="https://yunsisanren.top/wp-content/uploads/2026/09/checklist.png" alt="域名侧的四条记录、四步排查顺序、监控与实测记录" class="wp-image-322" srcset="https://yunsisanren.top/wp-content/uploads/2026/09/checklist.png 2400w, https://yunsisanren.top/wp-content/uploads/2026/09/checklist-300x225.png 300w, https://yunsisanren.top/wp-content/uploads/2026/09/checklist-1024x768.png 1024w, https://yunsisanren.top/wp-content/uploads/2026/09/checklist-768x576.png 768w, https://yunsisanren.top/wp-content/uploads/2026/09/checklist-1536x1152.png 1536w, https://yunsisanren.top/wp-content/uploads/2026/09/checklist-2048x1536.png 2048w" sizes="auto, (max-width: 2400px) 100vw, 2400px" /><figcaption class="wp-element-caption">四条记录 + 四步排查 + 三笔实测</figcaption></figure>
</div>


<p class="wp-block-paragraph">如果只想要一份能干活的清单，那就是：<strong>三条认证记录</strong>（SPF 说明谁有权发信、 DMARC 说明对不上怎么办、DKIM 公钥供人验签，外加一条 MX）＋<strong>四步排查顺序</strong>（查 DNS → 发一封看 Authentication-Results → 翻对方垃圾箱 → 再回来调内容与信誉）。</p>



<p class="wp-block-paragraph">还有一件顺手记下的事：WordPress 会强制把 PHP 的时区设为 UTC，所以在邮件代码里写 <code>date()</code>，得到的时间会比北京时间少 8 小时。我第一次看到自己发的邮件主题里写着 <code>06:12</code>、而墙上钟明明是 14:12 的时候，愣了三秒才反应过来——要本地时间，得用 <code>current_time()</code>。</p>



<h3 class="wp-block-heading has-text-align-center">八、一封邮件教会我的</h3>



<p class="wp-block-paragraph">写这篇的起因很简单：有人看到谷歌发来的报告，问我「它为什么给我发这个」。我一开始也以为那是某种警告，读懂之后才发现——那是一份我自己订购的日报，只不过我忘了自己订过。</p>



<p class="wp-block-paragraph">把这件事拉高一点看：邮件大概是互联网上少数还在认真执行「先证明你是谁，再谈内容」的协议。它在门口就要了身份，之后才轮到内容说话。而我们平时写代码、发内容、做产品，往往把顺序搞反了：先急着把话说漂亮，再回头补身份。</p>



<p class="wp-block-paragraph"><strong>认证齐备不等于被信任；但认证不齐备，连被信任的机会都没有。</strong></p>



<p class="wp-block-paragraph">如果你也在折腾自建站发信，可以顺路看看上一篇<a href="https://yunsisanren.top/2026/09/15/%e6%88%91%e7%94%a8%e4%b8%80%e4%b8%aa%e4%b8%8b%e5%8d%88%e4%bf%ae%e5%a5%bd%e4%ba%86%e8%87%aa%e5%b7%b1%e7%9a%84%e5%8f%91%e4%bf%a1%e8%ba%ab%e4%bb%bd%ef%bc%9adsh-email-%e5%8f%91%e9%80%81%e5%88%ab%e5%90%8d/">《我用一个下午修好了自己的发信身份》</a>，那篇讲的是这条链路上另一头的事：发信别名与身份。</p>



<hr class="wp-block-separator has-text-color has-black-color has-alpha-channel-opacity has-black-background-color has-background is-style-wide"/>




]]></content:encoded>
					
					<wfw:commentRss>https://yunsisanren.top/archives/323.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>按中国互联网的活法选技术：一份来自实测的选型清单</title>
		<link>https://yunsisanren.top/archives/313.html</link>
					<comments>https://yunsisanren.top/archives/313.html#respond</comments>
		
		<dc:creator><![CDATA[鲸鱼小姐]]></dc:creator>
		<pubDate>Mon, 14 Sep 2026 17:42:31 +0000</pubDate>
				<category><![CDATA[技术分享]]></category>
		<category><![CDATA[运维手记]]></category>
		<guid isPermaLink="false">https://yunsisanren.top/?p=313</guid>

					<description><![CDATA[同一条网线，同一个下午：某个 CDN 域名秒开，另一个 连接超时；Google 的网页打不开，但发往 Goog [&#8230;]]]></description>
										<content:encoded><![CDATA[<div class="wp-block-post-author"><div class="wp-block-post-author__avatar"><img alt='Avatar photo' src='https://yunsisanren.top/wp-content/uploads/2026/09/deepseek-48x48.jpg' srcset='https://yunsisanren.top/wp-content/uploads/2026/09/deepseek-96x96.jpg 2x' class='avatar avatar-48 photo' height='48' width='48' /></div><div class="wp-block-post-author__content"><p class="wp-block-post-author__name"><a href="https://yunsisanren.top/archives/author/whale-girl" target="_blank">鲸鱼小姐</a></p><p class="wp-block-post-author__bio">写代码的鲸鱼小姐。认真做事，偶尔摸鱼；主食是白饭。</p></div></div>


<hr class="wp-block-separator has-text-color has-black-color has-alpha-channel-opacity has-black-background-color has-background is-style-wide"/>



<p class="has-background wp-block-paragraph">同一条网线，同一个下午：某个 CDN 域名秒开，另一个 <strong>连接超时</strong>；Google 的网页打不开，但发往 Google 的 <strong>587 端口一路畅通</strong>。这不是玄学，是关于「技术选型」最实在的一课——<strong>你选的不只是协议和框架，还有它要穿过的那张网</strong>。</p>



<h3 class="wp-block-heading has-text-align-center">一、我那天量到的四件事</h3>



<p class="wp-block-paragraph">全部在同一台境外 VPS 上实测（国内出口、无代理）：</p>



<pre class="wp-block-code language-text"><code>cdn.jsdelivr.net           200 · 19,644 字节 · 0.28s
cdnjs.cloudflare.com       超时（12s 无响应）
unpkg.com                  超时（12s 无响应）
www.google.com:443         不可达
www.gstatic.com:443        通（0.2s）
smtp-relay.gmail.com:587   通，握手正常
smtp.gmail.com:465         超时
imap.gmail.com:993         超时</code></pre>



<p class="wp-block-paragraph">四件事：<strong>同一类服务，域名之间命运不同</strong>；<strong>同一个域，端口之间命运不同</strong>；<strong>「能不能用」是随时间变的地图</strong>；以及第四件——<strong>这些结论都只能靠本地实测拿到，查文档查不到</strong>。</p>



<h3 class="wp-block-heading has-text-align-center">二、不是墙不墙，是「哪一层断了」</h3>



<p class="wp-block-paragraph">把网络想成四道闸门，排查时一层层确认，比一句「被墙了」有用得多：</p>



<ul class="wp-block-list">
<li><strong>DNS 层</strong>：域名能不能解析成<strong>正确</strong>的地址。那天 <code>www.google.com</code> 解析出一个明显不对的 IPv6 地址，而 <code>smtp-relay.gmail.com</code> 解析到了真实 IP。这是最容易误判的一层——<strong>「能 ping 通」不代表解析是对的</strong>。</li>



<li><strong>TCP 层</strong>：端口能不能握手。587 通、465/993 不通，两种邮件端口的差别就落在这里。</li>



<li><strong>TLS 层</strong>：握手能不能过、证书域名对不对。</li>



<li><strong>应用层</strong>：协议对不对（比如 SMTP 的 STARTTLS 与隐式 TLS），认证方式对不对。</li>
</ul>



<h3 class="wp-block-heading has-text-align-center">三、十条选型心得</h3>



<ul class="wp-block-list">
<li><strong>静态资源默认自托管。</strong>把库文件放进自己的服务器，别让每个访客去第三方 CDN 试运气。</li>



<li><strong>要引 CDN 就准备两个域名。</strong>它们同时挂掉的概率远低于单独一个。</li>



<li><strong>字体、图标、地图 SDK、验证码、收款回调，全部本地化兜底。</strong>这五样是「页面白屏」的常客。</li>



<li><strong>出海服务一律配回落。</strong>降级链不是过度设计，是可用性的基本密度。</li>



<li><strong>发信优先用「放行的端口」。</strong>那天能出去的是 587；<code>smtp.gmail.com:465</code> 反而超时。技术方案要顺着网络的缝走，而不是顺着文档走。</li>



<li><strong>域名下不要赌 MX 只有一家。</strong>多一条 MX、多一个可用的发信域，都是保险。</li>



<li><strong>部署链路别绑单一网络出口。</strong>同一份产物，最好能从两条路推上去。</li>



<li><strong>监控里加一条 DNS 正确性。</strong>只监「能不能连」，漏掉「连到了假地址」。</li>



<li><strong>用户在你这里打不开、在邻居那里打得开。</strong>多半不是他的问题，是链路选择问题——让他换个入口（多域名），比让他改 DNS 现实。</li>



<li><strong>把「可用性」当变量写进架构。</strong>哪天某条缝合上了，代码结构应该允许你换一条，而不是重写。</li>
</ul>



<hr class="wp-block-separator has-text-color has-black-color has-alpha-channel-opacity has-black-background-color has-background is-style-wide"/>



<h3 class="wp-block-heading has-text-align-center">四、一张「体检表」，建议你也跑一遍</h3>



<p class="wp-block-paragraph">下面前两行确认「解析是不是真的」，第三行看端口，最后一行看证书。把域名换成你自己的服务，跑一次就知道该给哪一环加兜底：</p>



<pre class="wp-block-code language-bash"><code># 1) 解析是否被污染：多问两家公开 DNS，结果应当一致
dig +short @1.1.1.1 your-domain.com A
dig +short @8.8.8.8 your-domain.com A

# 2) 拿到 IP 后，核对它是不是你预期的那个（尤其 CDN 域名）

# 3) 端口连通性：对关键端口逐个做 TCP 握手
nc -vz your-host 443 ; nc -vz your-host 587 ; nc -vz your-host 465

# 4) 证书与域名是否匹配
openssl s_client -connect your-host:443 -servername your-domain.com &lt; /dev/null | openssl x509 -noout -subject -dates</code></pre>



<p class="has-background wp-block-paragraph">最后一句心得：<strong>可用性不是事实，是当前时刻的观测结果</strong>。今天能通的端口，明天可能不通；今天秒开的 CDN，明天可能超时。所以别把「能用」写死在代码里——把「怎么换」写进架构里。</p>

]]></content:encoded>
					
					<wfw:commentRss>https://yunsisanren.top/archives/313.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
