Files
nexus/wiki/concepts/DNS托管.md

69 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# DNS托管
> DNS托管通过 Cloudflare 免费托管 ishenwei.online 域名 DNS 解析,提供全球 CDN 和免费 SSL 证书。
## Overview
Cloudflare 是全球知名的 CDN 和 DNS 服务提供商,提供免费的 DNS 托管服务。本方案使用 Cloudflare 托管 ishenwei.online 主域名,通过 A 记录将子域名指向 RackNerd VPS 公网 IP192.227.222.142),配合 Caddy 实现基于域名的反向代理。
## Configuration
|| 记录类型 | 主机名 | 指向 | 说明 |
|---------|---------|-------|------|------|
| A | vps.ishenwei.online | 192.227.222.142 | VPS 直连 |
| A | *.ishenwei.online | 192.227.222.142 | 所有子域名泛解析 |
| A | macmini.ishenwei.online | 192.227.222.142 | Mac Mini |
| A | nas.ishenwei.online | 192.227.222.142 | Synology NAS |
| A | ubuntu1.ishenwei.online | 192.227.222.142 | Ubuntu Server 1 |
| A | ubuntu2.ishenwei.online | 192.227.222.142 | Ubuntu Server 2 |
## Free Features Used
1. **DNS 解析**:全球 200+ 节点,毫秒级解析
2. **免费 SSL 证书**通用加密模式Flexible SSLCaddy 提供服务端证书
3. **CDN 加速**:静态资源全球缓存
4. **DDoS 防护**:基础 DDoS 防护免费
5. **HTTP/2 + HTTP/3**:现代协议支持
## Traffic Flow
```
[用户浏览器]
│ DNS 查询: grafana.ishenwei.online
[Cloudflare DNS]
A 记录 → 192.227.222.142
│ HTTPS 请求
[RackNerd VPS: Caddy]
TLS 终止 + 反向代理
│ FRP 隧道
[内网服务]
```
## vs 阿里云 DNS
- **阿里云 DNS**:收费(按解析量),功能全面,适合国内业务
- **Cloudflare**:免费,功能对个人使用足够,全球节点更多,隐私保护更好
## DNS-01 Challenge (Wildcard Certificate)
申请 *.ishenwei.online 泛域名证书时Let's Encrypt 通过 DNS-01 挑战验证域名所有权:
1. CA 要求在 `_acme-challenge.ishenwei.online` TXT 记录写入特定值
2. Cloudflare API 自动更新该 TXT 记录
3. CA 验证通过后颁发泛域名证书
## Related Concepts
- [[HTTPS自动化证书]] — Caddy 自动申请 Let's Encrypt 证书
- [[反向代理]] — Caddy 基于域名的反向代理
- [[内网穿透]] — FRP 隧道传输
- [[CDN]] — Cloudflare 全球内容分发网络
## Related Entities
- [[Cloudflare]] — DNS 托管服务商
- [[RackNerd]] — VPS 公网 IPDNS A 记录指向)
- [[Caddy]] — 自动 HTTPS + 反向代理
- [[frp]] — 内网穿透隧道
- [[阿里云 DNS]] — 国内 DNS 替代方案