<svg viewBox="0 0 960 500" xmlns="http://www.w3.org/2000/svg">
<defs>
<style>
.bg { fill: #0f172a; }
.card { fill: #1e293b; rx: 12; ry: 12; stroke: #334155; stroke-width: 1.5; }
.card-sub { fill: #0f172a; rx: 8; ry: 8; stroke: #334155; stroke-width: 1; }
.text-title { fill: #f8fafc; font-family: system-ui, sans-serif; font-weight: 700; font-size: 22px; }
.text-subtitle { fill: #94a3b8; font-family: system-ui, sans-serif; font-size: 14px; }
.text-header { fill: #38bdf8; font-family: system-ui, sans-serif; font-weight: 600; font-size: 16px; }
.text-body { fill: #e2e8f0; font-family: system-ui, sans-serif; font-size: 13px; }
.text-muted { fill: #64748b; font-family: system-ui, sans-serif; font-size: 12px; }
</style>
</defs>
<rect class="bg" height="500" width="960"></rect>
<text class="text-title" y="45" x="40">图 2.3：RFC 5780 三种地址映射行为 (Mapping Behavior) 对比</text>
<text class="text-subtitle" y="70" x="40">展示内网同一套 (IP:Port) 发往不同公网目标时，NAT 外部映射端口的变化规律</text>
<rect stroke="#10b981" class="card" height="320" width="280" y="100" x="40"></rect>
<text fill="#10b981" class="text-header" y="130" x="60">EIM (Endpoint-Independent)</text>
<text class="text-muted" y="150" x="60">端点无关型 (Full Cone 标配)</text>
<rect class="card-sub" height="60" width="240" y="170" x="60"></rect>
<text class="text-body" y="195" x="70">访问 A (8.8.8.8:443)</text>
<text fill="#6ee7b7" class="text-body" y="215" x="70">映射端口 ➔ 40000</text>
<rect class="card-sub" height="60" width="240" y="240" x="60"></rect>
<text class="text-body" y="265" x="70">访问 B (1.1.1.1:80)</text>
<text fill="#6ee7b7" class="text-body" y="285" x="70">映射端口 ➔ 40000 (保持不变)</text>
<text fill="#10b981" class="text-body" y="325" x="60">打洞难度：极易 (可预测端口)</text>
<rect stroke="#eab308" class="card" height="320" width="280" y="100" x="340"></rect>
<text fill="#eab308" class="text-header" y="130" x="360">ADM (Address-Dependent)</text>
<text class="text-muted" y="150" x="360">地址相关型</text>
<rect class="card-sub" height="60" width="240" y="170" x="360"></rect>
<text class="text-body" y="195" x="370">访问 IP-A (8.8.8.8:443)</text>
<text fill="#fef08a" class="text-body" y="215" x="370">映射端口 ➔ 40000</text>
<rect class="card-sub" height="60" width="240" y="240" x="360"></rect>
<text class="text-body" y="265" x="370">访问 IP-B (1.1.1.1:443)</text>
<text fill="#fef08a" class="text-body" y="285" x="370">映射端口 ➔ 40001 (更换IP变端口)</text>
<text fill="#eab308" class="text-body" y="325" x="360">打洞难度：中等 (需借助中转交换)</text>
<rect stroke="#ef4444" class="card" height="320" width="280" y="100" x="640"></rect>
<text fill="#ef4444" class="text-header" y="130" x="660">APDM (Address &amp; Port)</text>
<text class="text-muted" y="150" x="660">地址及端口相关型 (Symmetric)</text>
<rect class="card-sub" height="60" width="240" y="170" x="660"></rect>
<text class="text-body" y="195" x="670">访问 8.8.8.8:443</text>
<text fill="#fca5a5" class="text-body" y="215" x="670">映射端口 ➔ 40000</text>
<rect class="card-sub" height="60" width="240" y="240" x="660"></rect>
<text class="text-body" y="265" x="670">访问 8.8.8.8:80</text>
<text fill="#fca5a5" class="text-body" y="285" x="670">映射端口 ➔ 40002 (更换端口即变)</text>
<text fill="#ef4444" class="text-body" y="325" x="660">打洞难度：极难 / 失败 (端口随机)</text>
<rect stroke-width="1" stroke="#10b981" rx="8" fill="#022c22" height="45" width="880" y="435" x="40"></rect>
<text fill="#6ee7b7" class="text-body" y="463" x="60">💡 核心引导：EIM (Endpoint-Independent Mapping) 是 P2P 联机的理想状态，打洞成功率最高！</text>
</svg>
