89 lines
4.7 KiB
XML
89 lines
4.7 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 860 360" role="img" aria-label="Fluxo bidirecional de solicitação e download sob demanda de arquivos do host para o app mobile via WebSocket">
|
|
<title>Download de Arquivos do Terminal para o App Mobile via Relay</title>
|
|
<style>
|
|
svg { --bg:#ffffff; --fg:#1f2328; --muted:#59636e; --line:#8c959f; --box:#f6f8fa; --lane:#f3f5f7; --accent:#0a7d55; --accentbg:#e6f4ee; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
|
|
@media (prefers-color-scheme: dark) {
|
|
svg { --bg:#0d1117; --fg:#e6edf3; --muted:#9198a1; --line:#6e7681; --box:#161b22; --lane:#11161d; --accent:#3fb98a; --accentbg:#12291f; }
|
|
}
|
|
.bg { fill: var(--bg); }
|
|
.lane { fill: var(--lane); }
|
|
.lanet { fill: var(--muted); font-size: 11px; letter-spacing: .12em; font-weight: 600; }
|
|
.box { fill: var(--box); stroke: var(--line); stroke-width: 1.2; }
|
|
.acc { fill: var(--accentbg); stroke: var(--accent); stroke-width: 1.8; }
|
|
.t { fill: var(--fg); font-size: 13.5px; font-weight: 600; text-anchor: middle; }
|
|
.s { fill: var(--muted); font-size: 11px; text-anchor: middle; }
|
|
.ta { fill: var(--accent); }
|
|
.w { fill: none; stroke: var(--line); stroke-width: 1.4; }
|
|
.wa { fill: none; stroke: var(--accent); stroke-width: 1.6; }
|
|
.d { stroke-dasharray: 5 4; }
|
|
.l { fill: var(--muted); font-size: 10.5px; }
|
|
.la { fill: var(--accent); font-size: 10.5px; font-weight: 600; }
|
|
.m { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 10px; fill: var(--muted); text-anchor: middle; }
|
|
.hd { fill: var(--line); }
|
|
.hda { fill: var(--accent); }
|
|
</style>
|
|
<defs>
|
|
<marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="hd" d="M0 0L10 5L0 10z"/></marker>
|
|
<marker id="aa" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="hda" d="M0 0L10 5L0 10z"/></marker>
|
|
</defs>
|
|
|
|
<!-- Fundo geral -->
|
|
<rect class="bg" width="860" height="360"/>
|
|
|
|
<!-- Faixas das 3 Camadas / Atores -->
|
|
<rect class="lane" x="15" y="20" width="260" height="320" rx="10"/>
|
|
<text class="lanet" x="30" y="42">SMARTPHONE (APP MOBILE / PWA)</text>
|
|
|
|
<rect class="lane" x="290" y="20" width="260" height="320" rx="10"/>
|
|
<text class="lanet" x="305" y="42">RELAY SERVER (K3S CLUSTER)</text>
|
|
|
|
<rect class="lane" x="565" y="20" width="280" height="320" rx="10"/>
|
|
<text class="lanet" x="580" y="42">ESTAÇÃO HOST (GATEWAY DAEMON)</text>
|
|
|
|
<!-- Componentes Raia 1 (Smartphone) -->
|
|
<rect class="box" x="35" y="70" width="220" height="68" rx="8"/>
|
|
<text class="t" x="145" y="98">Parser de Texto e Chips</text>
|
|
<text class="s" x="145" y="118">Detecta paths e gera chip 📄</text>
|
|
|
|
<rect class="acc" x="35" y="235" width="220" height="72" rx="8"/>
|
|
<text class="t ta" x="145" y="263">Modal Preview & Download</text>
|
|
<text class="s" x="145" y="283">Renderiza imagem/código e salva</text>
|
|
|
|
<!-- Componentes Raia 2 (Relay Server) -->
|
|
<rect class="box" x="310" y="145" width="220" height="85" rx="8"/>
|
|
<text class="t" x="420" y="175">Roteador WebSocket</text>
|
|
<text class="s" x="420" y="195">Canal reverso autenticado</text>
|
|
<text class="m" x="420" y="213">/ws/client ⇄ /ws/gateway</text>
|
|
|
|
<!-- Componentes Raia 3 (Gateway Daemon) -->
|
|
<rect class="box" x="585" y="70" width="240" height="68" rx="8"/>
|
|
<text class="t" x="705" y="98">Sandbox & Teto 20 MB</text>
|
|
<text class="s" x="705" y="118">Valida CWD e rejeita path traversal</text>
|
|
|
|
<rect class="acc" x="585" y="235" width="240" height="72" rx="8"/>
|
|
<text class="t ta" x="705" y="263">Leitura & Encode Base64</text>
|
|
<text class="s" x="705" y="283">Lê buffer no host e detecta MIME</text>
|
|
|
|
<!-- Conexões / Fluxo de Solicitação (Ida: topo) -->
|
|
<!-- 1. Do Parser para o Relay -->
|
|
<path class="w" d="M255 104H380V143" marker-end="url(#a)"/>
|
|
<text class="l" x="317" y="97" text-anchor="middle">FILE_READ_REQ</text>
|
|
|
|
<!-- 2. Do Relay para o Sandbox -->
|
|
<path class="w" d="M460 143V104H583" marker-end="url(#a)"/>
|
|
<text class="l" x="522" y="97" text-anchor="middle">encaminha req</text>
|
|
|
|
<!-- 3. Do Sandbox para a Leitura Local -->
|
|
<path class="w" d="M705 138V233" marker-end="url(#a)"/>
|
|
<text class="l" x="710" y="185">autorizado (<= 20MB)</text>
|
|
|
|
<!-- Conexões / Fluxo de Resposta (Volta: base) -->
|
|
<!-- 4. Da Leitura no Daemon para o Relay -->
|
|
<path class="wa" d="M585 271H460V232" marker-end="url(#aa)"/>
|
|
<text class="la" x="522" y="263" text-anchor="middle">FILE_READ_RESP</text>
|
|
|
|
<!-- 5. Do Relay para o Modal Preview no Smartphone -->
|
|
<path class="wa" d="M380 232V271H257" marker-end="url(#aa)"/>
|
|
<text class="la" x="317" y="263" text-anchor="middle">broadcast base64</text>
|
|
</svg>
|