IvoryValley
Status: Under Heavy Development - This project is in early development. APIs and features may change without notice.
A transparent deduplication proxy for Mastodon and the Fediverse.
The Problem
Following users across multiple Fediverse accounts often results in seeing the same posts repeatedly due to boosts/reposts. Your timeline can show the same content 10+ times.
The Solution
IvoryValley sits between your Mastodon client and the upstream server, filtering out duplicate posts before they reach you. It tracks seen post URIs and removes duplicates from timeline responses.
┌─────────────┐ ┌─────────────────┐ ┌──────────────┐
│ Client │────▶│ IvoryValley │────▶│ Mastodon │
│ (Tusky, │◀────│ │◀────│ Instance │
│ etc.) │ │ - Filter dupes │ │ │
└─────────────┘ │ - Store URIs │ └──────────────┘
│ - Pass auth │
└─────────────────┘
Features
- Transparent proxying - Works with any Mastodon-compatible client
- Deduplication - Filters duplicate posts and boosts from timelines
- WebSocket streaming - Real-time filtering for streaming connections
- OAuth passthrough - No credential handling, tokens are forwarded directly
- SQLite storage - Lightweight local database for tracking seen URIs
- Configurable - CLI args, environment variables, or config file
Installation
From Source
The binary will be at target/release/ivoryvalley.
Usage
# Basic usage
# With custom port
# With environment variables
IVORYVALLEY_UPSTREAM=https://mastodon.social
Then configure your Mastodon client to use http://localhost:8080 (or your chosen port) as the server URL instead of your actual instance.
Configuration
IvoryValley supports configuration via:
- CLI arguments (highest priority)
- Environment variables (prefixed with
IVORYVALLEY_) - Config file (
ivoryvalley.toml)
Options
| Option | Env Variable | Default | Description |
|---|---|---|---|
--upstream |
IVORYVALLEY_UPSTREAM |
- | Upstream Mastodon instance URL (required) |
--host |
IVORYVALLEY_HOST |
127.0.0.1 |
Address to bind to |
--port |
IVORYVALLEY_PORT |
3000 |
Port to listen on |
--database |
IVORYVALLEY_DATABASE |
ivoryvalley.db |
SQLite database path |
How It Works
- Client sends request to IvoryValley
- IvoryValley forwards request to upstream Mastodon instance
- For timeline endpoints, IvoryValley:
- Extracts post URIs (globally unique across federation)
- Checks each URI against the seen-URI database
- Filters out duplicates
- Records new URIs as seen
- Returns filtered response to client
Development
This project uses just as a command runner. Install with cargo install just.
# List all available commands
# Run the proxy in development mode
# Run all tests
# Run all quality checks before committing
Testing with Mastodon Clients
Most Mastodon clients require HTTPS for OAuth. Use the built-in HTTPS proxy:
# Start proxy with HTTPS (available at https://localhost:8443)
This uses a Python HTTPS reverse proxy with a self-signed certificate. You'll need to accept the certificate warning in your client.
Then configure your Mastodon client to use https://localhost:8443 as the server.
Compatible clients:
| Client | Platform | Notes |
|---|---|---|
| Tuba | Linux (GTK) | flatpak install flathub dev.geopjr.Tuba |
| Tokodon | Linux (KDE) | apt install tokodon |
| Whalebird | Linux | Electron-based, AppImage available |
| Tusky | Android | Works with HTTPS proxy |
Manual Commands
# Run with logging
RUST_LOG=ivoryvalley=debug
# Check code quality
# Format code
Contributing
See CONTRIBUTING.md for guidelines.
License
MIT