DEV Community

Marin Dedić
Marin Dedić

Posted on

A P2P messenger with dual network modes (Fast + Tor)

Hello dev community,

I have been working on a desktop P2P messenger called Kiyeovo for the last ~8 months, and I just published its beta version.

Quick backstory: It started out as a CLI application for my Graduate Thesis, where I tried to make the most secure and private messenger application possible. Then, I transformed it into a desktop application, gave it "clearnet" support and added a bunch of features.

The app runs in 2 completely isolated modes:

  • fast mode: relay/DCUtR -> lower latency, calls support
  • anonymous mode: Tor message routing -> slower, anonymous

These modes use different protocol IDs, DHT namespaces, pubsub topics and storage scopes so there’s no data crossover between them.

Messaging works peer-to-peer when possible, but falls back to DHT “offline buckets” when peers are offline. Messages are acknowledged and pruned after delivery.

Group chat uses: - GossipSub for realtime delivery - control messages over offline buckets - ACK/republish cycles for reliability - key rotation with epoch-based topics - encrypted group metadata stored in DHT records

Other: - E2E direct chat - file transfer with chunked encrypted streams - 1:1 audio/video calls (fast mode only, WebRTC)

Some tradeoffs: - Tor mode has noticeable latency - mode switching requires restart - offline delivery is "eventual consistency" - no group calls yet (coming)

I’d appreciate feedback, that's why I posted this as a beta version!

Repo: https://github.com/Realman78/Kiyeovo

Thank you!

Top comments (0)