mirror of
https://github.com/lgcosta/pf-linux-port.git
synced 2026-11-12 23:48:06 -03:00
O problema da primeira serie era a sensacao de 'quadro a quadro': a captura era a saida de um script despejada em blocos. Agora cada video e uma sessao shell de verdade. - record.py: abre um pty, faz SSH no firewall e digita os comandos tecla a tecla (~34 c/s, com jitter). O tty remoto ecoa, o kernel responde ao vivo; a captura e asciicast v2 com timestamps. 'bash --noediting' evita que o editor de linha redesenhe o comando e o tty o repita (a linha aparecia duplicada). - record.py --pace: segura a tela enquanto a voz fala - cada batida dura o trecho de audio que a acompanha, de modo que uma unica captura serve as duas versoes de idioma. - record.py --ensure-pf: garante pf.ko carregado antes de gravar. Sem isso uma fase que roda 'rmmod' (ativacao) pode derrubar o /dev/pf de outra gravacao concorrentes - foi exatamente o que quebrou a fase de roteamento na primeira tentativa. - make_audio.py: geracao da narracao pelo MiniMax TTS, uma voz feminina por idioma (English_ConfidentWoman / Portuguese_ConfidentWoman), um arquivo por segmento. A API devolve o audio em hexadecimal, nao base64. - render_video.py: reproduz a captura por um emulador de terminal e escreve os frames direto no ffmpeg como RGB bruto (um PNG por frame era uma ordem de grandeza mais lento). Desenha o diagrama de rede do lab por cima do terminal nas fases de roteamento e balanceamento, destacando o caminho em discussao, e queima a legenda da narracao. - assemble.py: mixa os segmentos de audio na linha do tempo. - join.py: emenda as fases com crossfade sobre um cartao de capitulo e sincroniza o audio na mesma linha do tempo. - build-all.sh: roda o pipeline inteiro. Arte de fundo e audio vem do MiniMax; a geracao de video do MiniMax nao esta habilitada nesta conta (erro 2068 em todos os modelos), entao as transicoes sao renderizadas localmente com ffmpeg. 16 videos: 7 fases + filme completo, em ingles e portugues, com legenda queimada.
43 lines
2.0 KiB
JSON
43 lines
2.0 KiB
JSON
{
|
|
"phase": "00-ambiente",
|
|
"lang": "en",
|
|
"voice": "English_ConfidentWoman",
|
|
"title": "The lab environment",
|
|
"subtitle": "Four Alpine VMs under libvirt, running a kernel built from source",
|
|
"segments": [
|
|
{
|
|
"beat": "b1",
|
|
"text": "Welcome to the PF on Linux demonstration. Before we look at the firewall itself, let me show you the environment where everything runs. These are four virtual machines managed by libvirt, all of them Alpine Linux, and the machine you are looking at is the firewall: a kernel we compiled from source, version seven point three point four, with our port of the OpenBSD packet filter built in as a module."
|
|
},
|
|
{
|
|
"beat": "b2",
|
|
"text": "The firewall has four interfaces. The management interface on the virtual network the hypervisor uses to reach us. Then three transit networks: ten point zero point one, where the client lives; ten point zero point two, where the server lives; and ten point zero point three, a second gateway we use to demonstrate routing decisions.",
|
|
"highlight": [
|
|
"cli",
|
|
"pf0",
|
|
"srv",
|
|
"gw2"
|
|
],
|
|
"diagram_caption": "three transit networks, four interfaces"
|
|
},
|
|
{
|
|
"beat": "b3",
|
|
"text": "The OpenBSD tools are installed on this machine exactly as they ship: the original pfctl, a pflog daemon and our divert tool. The module is not loaded yet, which is where we will start.",
|
|
"highlight": [
|
|
"pf0"
|
|
],
|
|
"diagram_caption": "pfctl, pflogd and pdivert, straight from OpenBSD"
|
|
},
|
|
{
|
|
"beat": "b4",
|
|
"text": "And from the firewall we can reach the other machines directly. The client is on ten point zero point one point ten, the server on ten point zero point two point twenty, and the second gateway on ten point zero point three point two. Every command in this demonstration is real traffic crossing real interfaces.",
|
|
"highlight": [
|
|
"cli",
|
|
"pf0",
|
|
"srv",
|
|
"gw2"
|
|
],
|
|
"diagram_caption": "cli, srv and gw2 reachable from pf0"
|
|
}
|
|
]
|
|
} |