Live
Black Hat USADark ReadingBlack Hat AsiaAI BusinessFaraday Future Founder and Co-CEO YT Jia Shares Weekly Investor Update: FF to Establish the First Scaled EAI Education System in the United States With Deployment of Its EAI Robotics Products and Technology - The AI JournalGoogle News - AI roboticsThe Missing Guide: Configuring OpenClaw on AWS Lightsail in Under 30 MinutesTowards AIAIが再定義するエンタープライズのデータセンター要件ーー稼働率99.999%では不足の時代へCIO MagazineAgentic AI in Beauty: How ChatGPT Is Reshaping Discovery, Trust, and Conversion - beautymatter.comGoogle News: ChatGPTAI can make cyberattacks faster and smarter - Yahoo News CanadaGNews AI CanadaUnmathematical features of mathlesswrong.comRecent Advances in Algorithmic High-Dimensional Robust StatisticsDev.to AIIntroducing GEN-1 [video]Hacker News TopOpenAI Operations Chief Changes Jobs Amid IPO Preparations - PYMNTS.comGoogle News: OpenAINew: Elektor's robotics and automation special ... - eeNews EuropeGoogle News - AI roboticsAnthropic Copied OpenClaw’s Features, Then Banned OpenClaw. Here’s the Proof.Towards AIIs Apple’s New Apple Business Platform Recasting Its Services Ambitions For Apple (AAPL)? - simplywall.stGNews AI AppleBlack Hat USADark ReadingBlack Hat AsiaAI BusinessFaraday Future Founder and Co-CEO YT Jia Shares Weekly Investor Update: FF to Establish the First Scaled EAI Education System in the United States With Deployment of Its EAI Robotics Products and Technology - The AI JournalGoogle News - AI roboticsThe Missing Guide: Configuring OpenClaw on AWS Lightsail in Under 30 MinutesTowards AIAIが再定義するエンタープライズのデータセンター要件ーー稼働率99.999%では不足の時代へCIO MagazineAgentic AI in Beauty: How ChatGPT Is Reshaping Discovery, Trust, and Conversion - beautymatter.comGoogle News: ChatGPTAI can make cyberattacks faster and smarter - Yahoo News CanadaGNews AI CanadaUnmathematical features of mathlesswrong.comRecent Advances in Algorithmic High-Dimensional Robust StatisticsDev.to AIIntroducing GEN-1 [video]Hacker News TopOpenAI Operations Chief Changes Jobs Amid IPO Preparations - PYMNTS.comGoogle News: OpenAINew: Elektor's robotics and automation special ... - eeNews EuropeGoogle News - AI roboticsAnthropic Copied OpenClaw’s Features, Then Banned OpenClaw. Here’s the Proof.Towards AIIs Apple’s New Apple Business Platform Recasting Its Services Ambitions For Apple (AAPL)? - simplywall.stGNews AI Apple
AI NEWS HUBbyEIGENVECTOREigenvector

Building a Decentralized Mesh Network in Rust — Lessons from the Global South

DEV Communityby Michael MuriithiApril 5, 20264 min read0 views
Source Quiz

The Problem 2.6 billion people lack reliable internet access. When disasters strike, infrastructure fails, or communities are remote — traditional communication breaks down precisely when coordination is most critical. I'm a cybersecurity student in Nairobi, Kenya. I've seen what happens when communities lose connectivity: families can't check on each other after floods, rescue teams can't coordinate, and activists can't organize safely. So I built GhostWire — a decentralized, censorship-resistant mesh communication platform that works without any central servers. What Is GhostWire? GhostWire is a peer-to-peer encrypted communication platform written in Rust. Instead of connecting to a server, devices connect directly to each other. Messages hop from node to node through whatever path is a

The Problem

2.6 billion people lack reliable internet access. When disasters strike, infrastructure fails, or communities are remote — traditional communication breaks down precisely when coordination is most critical.

I'm a cybersecurity student in Nairobi, Kenya. I've seen what happens when communities lose connectivity: families can't check on each other after floods, rescue teams can't coordinate, and activists can't organize safely.

So I built GhostWire — a decentralized, censorship-resistant mesh communication platform that works without any central servers.

What Is GhostWire?

GhostWire is a peer-to-peer encrypted communication platform written in Rust. Instead of connecting to a server, devices connect directly to each other. Messages hop from node to node through whatever path is available.

If a node goes offline, the mesh routes around it. If the internet goes down, GhostWire switches to WiFi Direct, Bluetooth, or even LoRa radio.

Live site: https://phantomojo.github.io/GhostWire-secure-mesh-communication/ GitHub: https://github.com/Phantomojo/GhostWire-secure-mesh-communication

The Architecture

Networking: libp2p

We use libp2p — the same P2P networking stack used by IPFS and Ethereum. It handles peer discovery, connection establishment, and multiplexing. On top of that, we run a S/Kademlia-hardened DHT for routing and Gossipsub for message propagation.

// Simplified peer discovery let swarm = SwarmBuilder::with_new_identity()  .with_tokio()  .with_tcp(  tcp::Config::default(),  noise::Config::new,  yamux::Config::default,  )?  .with_behaviour(|_| Behaviour::new())?  .build();
_

Enter fullscreen mode

Exit fullscreen mode

Encryption: Defense in Depth

Every message is encrypted end-to-end before it leaves your device:

Layer Algorithm Purpose

Symmetric AES-256-GCM Message encryption + integrity

Key Exchange X25519 Perfect forward secrecy

Signatures Ed25519 Identity verification

Post-Quantum ML-KEM-768 Future-proof (planned)

No server, no relay, no intermediate node ever sees plaintext.

AI-Powered Routing

This is where GhostWire gets interesting. Instead of using fixed routing rules, we trained AI models on real mesh network data from Barcelona's GuifiSants — one of the world's largest community mesh networks.

  • L1 — LightGBM anomaly detector: AUC 1.0, 76.7μs inference, exported as ONNX and wired into Rust via ONNX Runtime

  • L3 — Graph Neural Network: Trained on 7,931 samples across 63 nodes over 31 days. Learns which paths work best in real conditions.

# Training pipeline (simplified) model = lgb.LGBMRegressor(  n_estimators=500,  learning_rate=0.05,  max_depth=7,  num_leaves=31 ) model.fit(X_train, y_train) onnx_model = convert_lightgbm(model, initial_types=initial_type) onnx.save(onnx_model, "ghostwire_routing.onnx")

Enter fullscreen mode

Exit fullscreen mode

The model runs in 76.7 microseconds — fast enough for real-time routing decisions on a Raspberry Pi.

7 Transport Layers

Transport Range Use Case

WiFi Direct ~100m Urban mesh, device-to-device

Bluetooth LE ~50m Indoor, low-power

LoRa ~15km Rural, long-range

WebRTC Internet Bridge across networks

TCP/IP Internet Standard connectivity

Reticulum Multi-hop Amateur radio mesh

Briar Bluetooth/WiFi Activist communication

GhostWire selects the best available path automatically. No internet? It falls back to RF mesh. No WiFi? Bluetooth. The mesh adapts.

Why Rust?

Three reasons:

  • Memory safety without GC — GhostWire runs on resource-constrained devices (Raspberry Pi, old laptops). We can't afford a garbage collector pause during emergency communication.

  • Fearless concurrency — The networking stack handles hundreds of simultaneous peer connections. Rust's ownership model means we don't worry about data races.

  • Performance — The LightGBM inference runs in 76.7μs. The crypto is hardware-accelerated. Rust lets us squeeze every microsecond out of the hardware.

The Human Side

GhostWire isn't just a technical project. It's built on a philosophy:

In Hindu and Buddhist cosmology, Indra's Net is an infinite web. At each intersection hangs a jewel. Each reflected in all others. No jewel is more important. The net has no center. The net has no edge.

The original internet architects independently rediscovered what African philosophy had encoded for millennia: systems built on mutual relationship rather than central authority are more resilient, more equitable, and more aligned with existence itself.

We're building this as part of the GCD4F 2026 competition (Global Climate Data for Future) under the "AI for Society" track, representing the Open University of Kenya.

We Need Contributors

GhostWire is AGPL-3.0 licensed and actively seeking contributors:

  • Rust developers — libp2p networking, transport layers, crypto

  • AI/ML engineers — GNN model training, routing optimization

  • Security researchers — independent audit, threat modeling

  • Frontend developers — React/TypeScript dashboard

  • Documentation writers — guides, tutorials, translations

Good first issues are labeled on GitHub. Our CONTRIBUTING.md has detailed setup instructions.

Links

Built in Nairobi, for the world. 🇰🇪

Was this article helpful?

Sign in to highlight and annotate this article

AI
Ask AI about this article
Powered by Eigenvector · full article context loaded
Ready

Conversation starters

Ask anything about this article…

Daily AI Digest

Get the top 5 AI stories delivered to your inbox every morning.

Knowledge Map

Knowledge Map
TopicsEntitiesSource
Building a …modelneural netw…trainingavailableplatformbillionDEV Communi…

Connected Articles — Knowledge Graph

This article is connected to other articles through shared AI topics and tags.

Knowledge Graph100 articles · 150 connections
Scroll to zoom · drag to pan · click to open

Discussion

Sign in to join the discussion

No comments yet — be the first to share your thoughts!