feat: multi-network namespace multiplexing

Multiplex all networks onto a single client connection using /network
suffixes on channels and nicks. PASS is now just the password (no
network prefix). Channels appear as #channel/network, foreign nicks as
nick/network, own nicks stay bare.

New namespace.py module with pure encode/decode functions. Router
tracks clients globally (not per-network), namespaces messages before
delivery. Client attaches to all networks on connect, sends synthetic
JOIN/TOPIC/NAMES for every channel across all networks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
user
2026-02-20 19:03:58 +01:00
parent ab7603f638
commit 8cc57a7af4
13 changed files with 512 additions and 131 deletions

View File

@@ -4,12 +4,12 @@ IRC bouncer with SOCKS5 proxy support and persistent message backlog.
## Features
- Connect to multiple IRC networks simultaneously
- **Multi-network multiplexing**: single client connection sees all networks via `/network` suffixes
- All outbound connections routed through SOCKS5 proxy
- Stealth connect: registers with a random pronounceable nick and generic identity
- Probation window: waits 15s after registration to detect K-lines before revealing real nick
- Persistent message backlog (SQLite) with replay on reconnect
- Multiple clients can attach to the same network session
- Multiple clients can attach simultaneously
- Password authentication
- TLS support for IRC server connections
- Automatic reconnection with exponential backoff
@@ -32,10 +32,18 @@ bouncer -c config/bouncer.toml -v
From your IRC client, connect to `127.0.0.1:6667` with:
```
PASS networkname:yourpassword
PASS yourpassword
```
Where `networkname` matches a `[networks.NAME]` section in your config.
A single connection gives you all configured networks. Channels and nicks
appear with a `/network` suffix:
```
Client sees: Server sends/receives:
#libera/libera <-> #libera (on libera network)
#debian/oftc <-> #debian (on oftc network)
user123/libera <-> user123 (on libera network)
```
## How It Works