Open‑source • Python

AISMixer — open-source AIS NMEA 0183 multiplexer and secure forwarder

AISMixer is an open-source Python service for AIVDM/AIVDO AIS NMEA 0183 streams. It ingests multiple receivers and apps, removes duplicates, reassembles multipart messages, normalizes meta headers, and forwards a clean unified stream. Stations can use nmea_sproxy for an authenticated, encrypted, NAT‑friendly secure UDP path to AISMixer.

TL;DR

  • UDP ingest from many AIS apps/devices
  • Zero‑copy parsing, multipart !AIVDM reassembly (g‑tags)
  • Deduplication and meta‑header cleaning/rewriting
  • Configurable c-tag time policy (preserve vs server time)
  • Forward to multiple targets (per user / per station)
  • AISMixer mixes, deduplicates, manages tags, and forwards
  • nmea_sproxy securely shovels one local UDP input to one SEC input
  • ECDSA authentication, AES‑GCM data, encrypted ping/pong, and reconnect recovery

Key features

🔁

Multiplex & Deduplicate

Merge many inputs, strip vendor meta, resolve duplicates, and keep the freshest message per MMSI/timestamp.

⚙️

Smart tags

Control c-tag policy and reassemble multipart via g-tags; handles glued lines and out-of-band headers.

🧭

Forwarding

Fan-out to multiple UDP/TCP targets; per-user isolation (vhost-like model) and per-station mapping.

🛡️

Implemented secure transport

ECDSA station authentication, AES‑GCM encrypted data and ping/pong liveness, replay checks, and NOSESSION/peer_timeout recovery for NAT, CGNAT, and mobile clients.

📦

Queues & performance

Independent queues per port (plain/secure), zero‑copy friendly parsing, and TTL cache tuning.

🌍

IPv4 + IPv6

Full dual‑stack UDP for ingress/egress; station naming station_private.pem/station_public.pem.

🔍

Observability

Planned metrics/health endpoints and test harness with known duplicate sets.

🚀

Cloud control

Future per‑user cloud panel to manage local stations remotely.

Architecture

High‑level flow

  1. AIS receiver/app → local UDP → nmea_sproxy → encrypted SEC input → AISMixer
  2. Direct plain UDP inputs can also feed AISMixer
  3. Tag parsing (c/g) and multipart reassembly
  4. Deduplication + meta cleaning (strip vendor headers)
  5. Optional meta add/normalize
  6. Fan‑out forwarding (per user / per target)

Focused roles

AISMixer is the mixer, deduplicator, tag‑aware normalizer, and fan‑out forwarder.

nmea_sproxy is a client‑side secure shovel/proxy: one process maps one local UDP input to one encrypted AISMixer SEC input. It does not mix streams.

Roadmap

  • Per‑user cloud control panel (manage local stations remotely)
  • Docker images
  • Metrics & health endpoints

Get started

Run AISMixer directly, run one manual nmea_sproxy relation, or start an installed singleton/template systemd service:

$ git clone https://github.com/iliyan85/aismixer
$ cd aismixer
$ python3 aismixer.py
$ cd nmea_sproxy && python3 nmea_sproxy.py
$ sudo systemctl start nmea_sproxy
$ sudo systemctl start nmea_sproxy@boat

Template instance names such as boat, yacht, or balchik_roof are operator‑chosen labels. Each instance config defines its own one‑input‑to‑one‑secure‑output relation.

Have an AIS feed to contribute or a dataset with pre‑labeled duplicates? Open an Issue.

Contact

Project home: https://github.com/iliyan85/aismixer

© 2025 AISMixer project