# WANSAW Relay

> WANSAW Relay is an enterprise-grade, high-performance ActivityPub public relay server engineered for the decentralized Fediverse. Operating at `https://relay.wansaw.com`, it delivers ultra-low latency, parallelized federated fan-out of public notes, boosts, and announcements across independent servers including Mastodon, Sharkey, Misskey, Akkoma, Pleroma, GoToSocial, Pixelfed, Lemmy, and Threads.

Built in Rust with Actix-web, Tokio, MongoDB, and asynchronous worker pools for non-blocking HTTP signature generation and verification (`rsa-sha256`, `hs2019`).

## Core Metadata

- **Service Name**: WANSAW Relay
- **Canonical Host**: https://relay.wansaw.com
- **Protocol**: W3C ActivityPub / ActivityStreams 2.0
- **Version**: 2.3.0
- **Primary Public Actor**: https://relay.wansaw.com/actor
- **Public Inbox**: https://relay.wansaw.com/inbox
- **NodeInfo Endpoint**: https://relay.wansaw.com/nodeinfo/2.0.json
- **Source Code**: https://github.com/amjiddader/activityPub-relay
- **Maintainer**: Amjid Dader (@amjiddader)

## Primary Capabilities

- **High-Throughput Fan-Out**: Efficiently propagates public activities across hundreds of connected Fediverse instances with sub-second latency.
- **Asynchronous Crypto Pipeline**: Dedicated CPU worker pools for non-blocking RSA-SHA256 signature verification and background HTTP delivery.
- **Live In-Memory Telemetry**: Atomic real-time monitoring of incoming activities, delivery throughput, success ratios, and 120-minute rolling sparkline traffic analysis.
- **Abuse & Spam Mitigation**: Cryptographic HTTP signature authentication, digest validation, and configurable domain policies (allow-list, block-list).
- **Universal Fediverse Compatibility**: Mastodon, Sharkey, Misskey, Akkoma, Pleroma, GoToSocial, Pixelfed, Lemmy, Firefish, NodeBB, Friendica, PeerTube, BookWyrm, and Threads.

## Key Endpoints

- [https://relay.wansaw.com/](https://relay.wansaw.com/): Real-time live dashboard, throughput stats, connected peers, and software breakdown.
- [https://relay.wansaw.com/actor](https://relay.wansaw.com/actor): ActivityPub Service actor profile, public RSA key, and inbox endpoints.
- [https://relay.wansaw.com/inbox](https://relay.wansaw.com/inbox): Receives signed ActivityPub activities (`Follow`, `Undo`, `Create`, `Announce`) via HTTP POST.
- [https://relay.wansaw.com/nodeinfo/2.0.json](https://relay.wansaw.com/nodeinfo/2.0.json): Standard NodeInfo 2.0 telemetry for federated network crawlers.
- [https://relay.wansaw.com/following](https://relay.wansaw.com/following): Collection of federated instances followed by the relay.
- [https://relay.wansaw.com/followers](https://relay.wansaw.com/followers): Collection of subscribed Fediverse instances.
- [https://relay.wansaw.com/llms-full.txt](https://relay.wansaw.com/llms-full.txt): Detailed architecture, protocol specification, and integration manual for LLMs.

## How Fediverse Instances Connect

### Mastodon
Navigate to `Administration -> Relays` and add:
`https://relay.wansaw.com/inbox`
Or via CLI:
`tootctl relay follow https://relay.wansaw.com/inbox`

### Sharkey & Misskey
Navigate to `Settings -> Control Panel -> Relays` and add:
`https://relay.wansaw.com/inbox`

### Pleroma & Akkoma
In AdminFE or via CLI:
`mix pleroma.relay follow https://relay.wansaw.com/actor`

### GoToSocial
Configure in environment or admin settings with relay inbox target `https://relay.wansaw.com/inbox`.
