D E A D M E S H

readme

By thatch | 11/17/2025
2

Deadlight Meshtastic Proxy

Internet-over-LoRa: A practical bridge between Meshtastic mesh networks and the Internet

Overview

Deadlight Meshtastic Proxy transforms LoRa mesh networks into practical Internet gateways. Built on the Deadlight Proxy foundation, it adds transparent mesh networking capabilities that let any device on a Meshtastic mesh access standard Internet protocols—HTTP/HTTPS, email, DNS, and more—as if they had normal connectivity.

What makes this different from other mesh solutions:

Think of it as giving your Meshtastic network the capabilities of a satellite terminal, but running on $30 hardware and zero monthly fees.

Why This Exists

Meshtastic networks are incredible for messaging and telemetry, but they weren't designed for general Internet access. Each protocol (HTTP, SMTP, DNS) would need custom mesh-aware implementations. This creates a chicken-and-egg problem: applications won't add mesh support without users, users won't adopt mesh without applications.

Deadlight solves this by sitting in the middle:

  1. Mesh side: Speaks fluent Meshtastic (protobuf over LoRa serial)
  2. Internet side: Speaks every protocol your applications already use
  3. Bridges transparently: Fragments outgoing requests, reassembles incoming responses

Result: Your mesh network suddenly works with everything, email clients, web browsers, update tools, API services, all without modifying a single line of application code.

Critical Scenarios This Enables

Features

Getting Started

Prerequisites

Software:

Hardware (see Hardware section for details):

Quick Install

  1. Clone and build:

    git clone https://github.com/gnarzilla/meshtastic.deadlight.git
    cd meshtastic.deadlight
    make clean && make UI=1
  2. Install CA certificate (for HTTPS interception):

    # The proxy generates these on first run:
    # /etc/deadlight/ca.crt (install on clients)
    # /etc/deadlight/ca.key (keep secret)
    
    # Debian/Ubuntu
    sudo cp /etc/deadlight/ca/ca.crt /usr/local/share/ca-certificates/deadlight-mesh.crt
    sudo update-ca-certificates
  3. Connect your Meshtastic radio:

    # Most devices appear as /dev/ttyACM0 or /dev/ttyUSB0
    ls -l /dev/tty*
    
    # Give yourself permission (or run as root)
    sudo usermod -a -G dialout $USER
  4. Run the proxy:

    sudo ./bin/deadlight -c meshtastic.conf
  5. Configure mesh clients to use the gateway's mesh address as their proxy (see Usage).

Hardware

Recommended Gateway Setup

Option 1: Raspberry Pi Gateway (most versatile)

Option 2: ESP32-S3 All-in-One (compact)

Option 3: Industrial/Outdoor

Client Devices

Any Meshtastic-compatible device works:

Radio Configuration

For best Internet gateway performance:

# In Meshtastic app or CLI
meshtastic --set lora.region US --set lora.modem_preset LONG_FAST
meshtastic --set lora.tx_power 30  # Maximum (check local regulations)
meshtastic --set lora.hop_limit 3  # Adjust for network size

Usage

Basic Configuration

Edit meshtastic.conf:

[core]
port = 8080
max_connections = 50
log_level = info

[meshtastic]
enabled = true
serial_port = /dev/ttyACM0
baud_rate = 115200
mesh_node_id = 0x12345678  # Your gateway's Meshtastic ID
fragment_size = 220        # Max payload per packet
ack_timeout = 30000        # 30 seconds for mesh ACKs
max_retries = 3

[ssl]
enable_interception = true
ca_cert = /etc/deadlight/ca/ca.crt
ca_key = /etc/deadlight/ca/ca.key

[network]
pool_max_per_host = 5      # Reuse connections aggressively
pool_idle_timeout = 600    # Keep idle connections longer
upstream_timeout = 120000  # Allow slow mesh responses

Client Setup

On mesh client devices, configure proxy settings:

# Linux/Mac
export http_proxy=mesh://gateway-node-id:8080
export https_proxy=mesh://gateway-node-id:8080

# Or in applications:
# HTTP Proxy: gateway-node-id port 8080
# SOCKS5: gateway-node-id port 8080

On Android (using Meshtastic app + ProxyDroid):

  1. Install ProxyDroid
  2. Set proxy to gateway node's mesh ID
  3. Connect Meshtastic app via Bluetooth

Testing

# From mesh client node
curl -x mesh://gateway:8080 http://example.com

# Send email via mesh
curl -x mesh://gateway:8080 \
  --mail-from sender@example.com \
  --mail-rcpt recipient@example.com \
  --upload-file message.txt \
  smtp://smtp.gmail.com:587

# SOCKS5 for SSH over mesh
ssh -o ProxyCommand="nc -X 5 -x gateway:8080 %h %p" user@remote-server

Configuration

Optimizing for Mesh Performance

Bandwidth Conservation:

[plugins]
# Enable aggressive compression
compressor.enabled = true
compressor.min_size = 512
compressor.algorithms = gzip,brotli

# Cache aggressively to reduce mesh traffic
cache.enabled = true
cache.max_size_mb = 500
cache.ttl_hours = 24

Latency Tolerance:

[meshtastic]
# Longer timeouts for multi-hop paths
ack_timeout = 60000
max_retries = 5

[network]
# Don't timeout on slow mesh responses
upstream_timeout = 300000  # 5 minutes
connection_timeout = 180000  # 3 minutes

Priority Shaping:

[plugins]
ratelimiter.enabled = true
# Reserve bandwidth for critical services
ratelimiter.priority_high = smtp,imap,dns
ratelimiter.priority_low = http_video,http_images

Advanced: Multi-Gateway Setup

For redundancy, run multiple gateways:

[meshtastic]
gateway_mode = true
announce_interval = 300  # Announce availability every 5 min
prefer_local = true      # Route via nearest gateway
load_balance = true      # Distribute across gateways

How It Works

Architecture Overview

┌─────────────┐                  ┌──────────────┐                ┌──────────┐
│ Mesh Client │                  │   Deadlight  │                │ Internet │
│   (Phone)   │  LoRa Packets    │   Gateway    │   TCP/IP       │ Services │
│             ├─────────────────>│              ├───────────────>│          │
│ Meshtastic  │  (868/915 MHz)   │ - Fragment   │                │  HTTP    │
│     App     │                  │ - Reassemble │                │  SMTP    │
│             │<─────────────────┤ - TLS Proxy  │<───────────────┤  IMAP    │
└─────────────┘                  └──────────────┘                └──────────┘
                                         │
                                         │ Also bridges:
                                         ├─> Other mesh nodes
                                         ├─> Offline message store
                                         └─> Satellite uplink (if available)

Packet Flow

  1. Request Fragmentation:

    HTTP GET request (1500 bytes)
    └─> Split into 7 Meshtastic packets (~220 bytes each)
    └─> Each tagged with sequence number + session ID
    └─> Sent hop-by-hop through mesh to gateway
  2. Gateway Reassembly:

    Gateway receives packets out-of-order
    └─> Buffers and sorts by sequence number
    └─> Detects missing packets, requests retransmit
    └─> Reassembles into original HTTP request
    └─> Proxies to Internet normally
  3. Response Fragmentation:

    HTTP response (50KB HTML)
    └─> Gateway fragments into ~230 packets
    └─> Sends with flow control (wait for ACKs)
    └─> Client reassembles and delivers to application

Protocol Detection

Deadlight auto-detects protocols by inspecting initial bytes:

Security Model

Encryption layers:

  1. LoRa PHY: AES-256 encryption at Meshtastic layer
  2. TLS: End-to-end between client and final destination
  3. Proxy MITM (optional): Deadlight can terminate TLS for caching/inspection

Trust model:

Privacy: Mesh node IDs are pseudonymous. For operational security in sensitive deployments, use throwaway node IDs and rotate channel keys.

Real-World Use Cases

Disaster Response Network

Scenario: Earthquake destroys cell infrastructure

Setup:

Result: Teams stay connected across 50+ square km with zero functioning infrastructure.

Rural Community Internet

Scenario: Village 30km from nearest fiber connection

Setup:

Result: 100+ households share single Internet connection. Cost: ~$50 per household for radio, no monthly fees.

Protest/Festival Network

Scenario: Large gathering needs coordination without relying on government-controlled networks

Setup:

Result: Thousands communicate freely. Network evaporates forensically when disassembled.

Journalist in Blackout Zone

Scenario: Government shuts down Internet during protests

Setup:

Result: Censorship bypassed. Reports reach editors despite blackout.

Performance

Throughput Expectations

LoRa Physical Layer (LONG_FAST preset):

Real-World Application Performance:

Optimization tips:

Scaling Considerations

Single Gateway:

Multi-Gateway Mesh:

Bottlenecks:

  1. LoRa duty cycle (legal limit on transmission time)
  2. Mesh hop count (>4 hops = diminishing returns)
  3. Gateway uplink bandwidth (satellite is typically the constraint)

Roadmap

v1.1 (Q1 2026)

v1.2 (Q2 2026)

v2.0 (Future)

Contributing

This is a specialized fork of Deadlight Proxy. Contributions welcome:

See CONTRIBUTING.md for guidelines.

Support & Community

Legal & Safety

Radio Regulations: LoRa operates in license-free ISM bands, but transmission power and duty cycle are regulated. Ensure compliance with your local regulations (FCC Part 15 in US, ETSI EN 300-220 in EU).

Encryption Export: This software includes strong cryptography. Check export restrictions if deploying internationally.

Responsible Use: This tool can bypass censorship and provide communication in emergencies. It can also be misused. Use ethically and legally. The authors are not responsible for misuse.

Privacy Notice: Meshtastic mesh networks are pseudonymous, not anonymous. For operational security in high-risk environments, use proper opsec practices (rotate node IDs, use ephemeral keys, avoid PII in mesh metadata).

License

MIT License – see LICENSE

Includes:


Status: testing-ready v1.0.0 | Maintained by: @gnarzilla

Previous: meshtastic-deadlight | LoRa Internet Bridging Next: Getting started

Comments

sick gnar bruh

This is a lot of word salad Ap short video or simplified Quick Start might be easier to digest