I’ve been working on a new protocol called P⁴ (Persistent Point-to-Point Protocol).
It persists the point-to-point protocol by using tor onion-style rendezvous for cross-network reconnects, but otherwise relies on the normal webRTC data channel for direct communication. (like PPP)
The result is that it lets apps talk directly (desktop ↔ mobile) without servers, accounts, or cloud infra.
I first thought of this when building an open source social media scheduler app where your content is on your desktop (or mobile) but you want to access the scheduler on your phone (or desktop). A server is an obvious choice but since this is open source, I wanted to avoid the need for users to setup a server or vpn, etc.
However this also has applications beyond just that:
- Personal file sync (Dropbox alternative)
- Password manager cross-device sync
- Notes/tasks syncing (offline-first apps)
- Home automation control (phone to local hub)
- Game state sync (local-host multiplayer)
- Camera/IoT monitoring without cloud
- Clipboard sharing between devices
- Local-first databases (CRDT peer sync)
- Encrypted chat without central servers
- Dev tools: logs/metrics between local machines
I personally tested this for windows and linux with the python bindings, but would like people to test this out on macOS if possible.
This supports:
- Windows
- Linux
- macOS
Language options:
- JavaScript/TypeScript
- Python
- C++
- PHP
- Java
- Rust
Why didn't I just use tor's onion relays fully for traffic if I am using it for rendezvous? Because tor's relays are optimized for low-bandwidth traffic and have high latency, which is not ideal for real-time communication. By using tor only for the initial rendezvous, I can establish a direct peer-to-peer connection using webRTC, which is much faster and more efficient for ongoing communication.
The protocol is still in early stages, but the core features are working. I’m looking for feedback on the design and implementation, as well as help with testing and documentation.
PythonicIT•1h ago
It persists the point-to-point protocol by using tor onion-style rendezvous for cross-network reconnects, but otherwise relies on the normal webRTC data channel for direct communication. (like PPP)
The result is that it lets apps talk directly (desktop ↔ mobile) without servers, accounts, or cloud infra.
I first thought of this when building an open source social media scheduler app where your content is on your desktop (or mobile) but you want to access the scheduler on your phone (or desktop). A server is an obvious choice but since this is open source, I wanted to avoid the need for users to setup a server or vpn, etc.
However this also has applications beyond just that: - Personal file sync (Dropbox alternative) - Password manager cross-device sync - Notes/tasks syncing (offline-first apps) - Home automation control (phone to local hub) - Game state sync (local-host multiplayer) - Camera/IoT monitoring without cloud - Clipboard sharing between devices - Local-first databases (CRDT peer sync) - Encrypted chat without central servers - Dev tools: logs/metrics between local machines
I personally tested this for windows and linux with the python bindings, but would like people to test this out on macOS if possible.
This supports: - Windows - Linux - macOS
Language options: - JavaScript/TypeScript - Python - C++ - PHP - Java - Rust
Why didn't I just use tor's onion relays fully for traffic if I am using it for rendezvous? Because tor's relays are optimized for low-bandwidth traffic and have high latency, which is not ideal for real-time communication. By using tor only for the initial rendezvous, I can establish a direct peer-to-peer connection using webRTC, which is much faster and more efficient for ongoing communication.
The protocol is still in early stages, but the core features are working. I’m looking for feedback on the design and implementation, as well as help with testing and documentation.