Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Charon API

Charon is the relay backend of the Veil project. It lets clients running different messenger apps exchange messages with each other by acting as a neutral, anonymous relay: the server routes messages between addresses, but it never has access to their plaintext content.

What it does

  • Registration — a client connects over WebTransport and registers with an address (token) and a device_id. The server keeps a live session (Client) for that pair for as long as the connection is open.
  • Message relaying — a client sends a message addressed to a destination address (srcdst). Charon looks up all currently connected sessions for that destination and forwards the message to them directly.
  • Offline storage — if the destination has no active session, the message is queued in in-memory storage and delivered once that address reconnects.

Privacy model

Message payloads are treated as opaque bytes (Vec<u8>) end to end — Charon never parses or inspects their content, it only reads the src/dst addresses needed to route them.

Architecture

  • Transport: WebTransport, via the internal wt-server / wt-client crates.
  • Routes (src/routes):
    • register — client registration (AuthorizationRoute).
    • message — message send/relay (MessageRoute).
  • Services (src/services):
    • authorization — registers a client's wt-client session under a CId { token, device_id }.
    • clients_manager — in-memory registry of live client sessions, keyed by CId, looked up by destination address.
    • message — decides whether to forward a message to a live session or queue it in storage.
    • message_storage — in-memory store of undelivered messages per destination address.
    • veil_client — the outbound side, used to push a message over an existing session and get back a response.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages