<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Andrew</title>
    <description>The latest articles on DEV Community by Andrew (@casablanque).</description>
    <link>https://dev.to/casablanque</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3952987%2F2ff2213e-26a5-4280-ab44-d1a027ff62b8.png</url>
      <title>DEV Community: Andrew</title>
      <link>https://dev.to/casablanque</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/casablanque"/>
    <language>en</language>
    <item>
      <title>Building a Zero-Server Network Forensics Suite with Rust and WebAssembly</title>
      <dc:creator>Andrew</dc:creator>
      <pubDate>Sat, 06 Jun 2026 16:59:27 +0000</pubDate>
      <link>https://dev.to/casablanque/building-a-zero-server-network-forensics-suite-with-rust-and-webassembly-4mnk</link>
      <guid>https://dev.to/casablanque/building-a-zero-server-network-forensics-suite-with-rust-and-webassembly-4mnk</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjj9d2jtevis3y0t609gj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjj9d2jtevis3y0t609gj.png" alt=" " width="800" height="489"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Imagine you have a 50MB+ network capture (&lt;code&gt;.pcap&lt;/code&gt;) from a critical infrastructure crash. You need to quickly find out why the network didn't converge. You could spin up Wireshark, or you could drop the file into a browser tab and get a full visual root-cause analysis in under 100ms. &lt;/p&gt;

&lt;p&gt;That’s why I built &lt;strong&gt;Post-Mortem&lt;/strong&gt; — an open-source suite of serverless web tools for network forensics.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Problem with Traditional PCAP Parsing
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Desktop Overhead:&lt;/strong&gt; Launching heavy desktop clients for quick triage is annoying.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security Risks:&lt;/strong&gt; Uploading corporate network captures containing sensitive internal IPs and payloads to cloud-based parsers is a massive security compliance violation.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The Architecture: Rust + WASM to the Rescue
&lt;/h3&gt;

&lt;p&gt;To achieve zero-server parsing with native-like performance, I paired Rust with WebAssembly. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Engine (Rust):&lt;/strong&gt; Handles raw byte slicing of pcap/pcapng structures and executes state machines for complex networking protocols.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Bridge (&lt;code&gt;wasm-pack&lt;/code&gt;):&lt;/strong&gt; Compiles the Rust binary into a WebAssembly module (&lt;code&gt;.wasm&lt;/code&gt;) with automated JavaScript glue-code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The UI (Vanilla JS + CSS):&lt;/strong&gt; A lightweight, ultra-fast dashboard that renders timelines, charts, and graphs instantly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What it analyzes right now:
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. OSPF Post-Mortem (IP Protocol 89)
&lt;/h4&gt;

&lt;p&gt;Tracks OSPF adjacency states. It automatically flags severe errors like &lt;strong&gt;Duplicate Router-IDs&lt;/strong&gt;, &lt;strong&gt;MTU mismatches&lt;/strong&gt; (which stall DBD exchanges), and &lt;strong&gt;Hello timer mismatches&lt;/strong&gt;. It even simulates a force-directed layout to draw the live OSPF topology map using pure SVG.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. DHCP Post-Mortem (UDP 67/68)
&lt;/h4&gt;

&lt;p&gt;Deconstructs the classic &lt;strong&gt;DORA&lt;/strong&gt; (Discover, Offer, Request, Acknowledge) sequence, mapping transaction IDs and tracking address allocation anomalies.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. STP / RSTP / Rapid-PVST+ Post-Mortem
&lt;/h4&gt;

&lt;p&gt;Analyzes Spanning Tree Protocol variants. It pinpoints exactly which bridge became the Root Bridge, captures Topology Change Notifications (TCNs), and tracks down loops and blocked ports.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Power of Local-First Web Tools
&lt;/h3&gt;

&lt;p&gt;Because the app relies entirely on WASM running in the browser thread, it is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;100% Private:&lt;/strong&gt; Your packets never leave your computer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Insanely Fast:&lt;/strong&gt; Parses thousands of packets in milliseconds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Portable:&lt;/strong&gt; You can download the single &lt;code&gt;index.html&lt;/code&gt; file along with the &lt;code&gt;pkg&lt;/code&gt; directory, and run it completely offline in the middle of a data center with no internet access.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Next Steps &amp;amp; Open Source
&lt;/h3&gt;

&lt;p&gt;The project is entirely open-source. I’m currently looking for feedback from fellow systems/network engineers and web developers. &lt;/p&gt;

&lt;p&gt;Check out the repos here: &lt;strong&gt;&lt;a href="https://github.com/stars/casablanque-code/lists/network-forensics" rel="noopener noreferrer"&gt;https://github.com/stars/casablanque-code/lists/network-forensics&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What protocol do you think I should tackle next? BGP, QUIC, or maybe a deep-dive TLS handshake analyzer? &lt;br&gt;
I would like to get your feedback and test results. &lt;/p&gt;

</description>
      <category>rust</category>
      <category>webassembly</category>
      <category>networking</category>
      <category>analytics</category>
    </item>
    <item>
      <title>CLI wrapper for Cloudflare Tunnel with Zero Trust</title>
      <dc:creator>Andrew</dc:creator>
      <pubDate>Tue, 26 May 2026 17:34:57 +0000</pubDate>
      <link>https://dev.to/casablanque/cli-wrapper-for-cloudflare-tunnel-with-zero-trust-16h4</link>
      <guid>https://dev.to/casablanque/cli-wrapper-for-cloudflare-tunnel-with-zero-trust-16h4</guid>
      <description>&lt;p&gt;I got tired of configuring Cloudflare Zero Trust manually, so I built a 15s CLI wrapper. &lt;br&gt;
Every time I wanted to expose a new local service (like Grafana or a dev API) securely, the routine was always the same:&lt;br&gt;
Open Cloudflare Dashboard.&lt;br&gt;
Create a new Tunnel.&lt;br&gt;
Configure Ingress rules.&lt;br&gt;
Add a DNS CNAME record.&lt;br&gt;
Switch to the Zero Trust panel.&lt;br&gt;
Create an Access Application.&lt;br&gt;
Set up an Access Policy to restrict access to my email.&lt;/p&gt;

&lt;p&gt;It’s an amazing, enterprise-grade security stack, but doing this manually for the 10th time just to test something is an absolute UX nightmare.&lt;br&gt;
I wanted something as simple as ngrok, but with Cloudflare's Zero Trust protection under the hood. Since I couldn't find a lightweight tool that does exactly this, I wrote zt in Go.&lt;/p&gt;

&lt;p&gt;How it works&lt;br&gt;
Now, when I need to share or expose a local service, I just run:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;zt up grafana 3000&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In about 15 seconds, it automatically handles the whole chain:&lt;/p&gt;

&lt;p&gt;Creates the Cloudflare Tunnel.&lt;br&gt;
Sets up DNS and Ingress.&lt;br&gt;
Locks it behind Cloudflare Access (asks for email OTP by default).&lt;br&gt;
Fires up cloudflared in the background and saves the state locally.&lt;/p&gt;

&lt;p&gt;If I need it to be completely public (like an webhook endpoint), I just pass a flag: &lt;code&gt;zt up api 8080 --public&lt;/code&gt;. If I want to share it with specific colleagues: &lt;code&gt;--allow mail@example.com&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;When I'm done, zt down grafana wipes everything clean and stops the process.&lt;/p&gt;

&lt;p&gt;The Stack&lt;br&gt;
It’s a single binary written in Go, using the official Cloudflare API package. Configuration and state are kept locally in ~/.zt-config.json and ~/.zt-state.json (secured with 0600 permissions).&lt;/p&gt;

&lt;p&gt;I’ve been using it daily in my home lab and dev environment, and it has saved me hours of clicking through web UIs.&lt;/p&gt;

&lt;p&gt;The project is completely open-source (MIT). If you're managing self-hosted apps or often need to expose local ports securely, feel free to check it out, open an issue, or drop a star!&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/casablanque-code" rel="noopener noreferrer"&gt;
        casablanque-code
      &lt;/a&gt; / &lt;a href="https://github.com/casablanque-code/cfzt" rel="noopener noreferrer"&gt;
        cfzt
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      cloudflare tunnel zero trust UX
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;zt — Zero Trust tunnel manager&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;One command to expose a local service through Cloudflare Zero Trust.&lt;/p&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;zt up grafana 3000
# → https://grafana.yourdomain.com  (ZT-protected, running in 15s)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;What it does&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;&lt;code&gt;zt up &amp;lt;name&amp;gt; &amp;lt;port&amp;gt;&lt;/code&gt; automatically:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Creates a Cloudflare Tunnel&lt;/li&gt;
&lt;li&gt;Configures ingress rules&lt;/li&gt;
&lt;li&gt;Creates a CNAME DNS record&lt;/li&gt;
&lt;li&gt;Creates a Zero Trust Access application&lt;/li&gt;
&lt;li&gt;Starts &lt;code&gt;cloudflared&lt;/code&gt; in the background&lt;/li&gt;
&lt;li&gt;Saves state locally&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;code&gt;zt down &amp;lt;name&amp;gt;&lt;/code&gt; reverses all of the above.&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Prerequisites&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;A domain on Cloudflare&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/" rel="nofollow noopener noreferrer"&gt;&lt;code&gt;cloudflared&lt;/code&gt;&lt;/a&gt; installed and in PATH&lt;/li&gt;
&lt;li&gt;A Cloudflare API token with the following permissions:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Account / Cloudflare Tunnel / Edit&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Zone / DNS / Edit&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Account / Access: Apps and Policies / Edit&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Creating the API token&lt;/h3&gt;

&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Cloudflare dashboard → &lt;strong&gt;My Profile&lt;/strong&gt; → &lt;strong&gt;API Tokens&lt;/strong&gt; → &lt;strong&gt;Create Token&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;Custom token&lt;/strong&gt;, add the permissions above&lt;/li&gt;
&lt;li&gt;Set Account Resources → your account&lt;/li&gt;
&lt;li&gt;Set Zone Resources → your domain&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Install&lt;/h2&gt;

&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Option A — go install&lt;/h3&gt;

&lt;/div&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;go install&lt;/pre&gt;…
&lt;/div&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/casablanque-code/cfzt" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>go</category>
      <category>devops</category>
      <category>cloudflarechallenge</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
