Files
horizon-airdef/crates/horizon-friends/Cargo.toml
T
Ludovic Marie 5d29f31663 Play with friends: Join a friend in game and in the launcher
The game joins `friend:CODE` addresses: the network thread resolves the code
through the relay, agrees on the key, settles on a direct or relayed stream
and connects the client to the tunnel's loopback port; everything after is
an ordinary join. Errors (unknown or ended code, wrong secret, host not
answering, version mismatch, rate limits) end on the Disconnected screen in
plain words. Shown and logged addresses hide the code's secret half.

Horizon's multiplayer page gains "Join a friend" (a code field); the classic
screens keep vanilla's buttons. The launcher's Play page gains a "Join a
friend" row (paste works) that starts the game straight into the join;
`horizon-launcher play --join CODE` does the same.

tools/test_friends.py runs a relay, a host Horizon sharing a world and a
guest Horizon, over plain LAN (--baseline), the direct path and the forced
relay path: chat, movement and blocks both ways, then the ended invite.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 03:08:07 +02:00

24 lines
774 B
TOML

[package]
name = "horizon-friends"
version = "0.1.0"
edition = "2024"
license = "MIT"
description = "Play with friends: invite codes, the relay protocol, the end-to-end encrypted tunnel between a host's integrated server and its guests"
[dependencies]
# The key exchange keyed by the code's secret, then the frames.
spake2 = { version = "0.4", features = ["getrandom"] }
chacha20poly1305 = "0.10"
hkdf = "0.12"
sha2 = "0.10"
getrandom = "0.3"
# SO_REUSEADDR/SO_REUSEPORT for the direct socket (TCP simultaneous open).
socket2 = { version = "0.5", features = ["all"] }
# This machine's addresses (LAN, VPNs such as Tailscale or ZeroTier, IPv6) for the code.
if-addrs = "0.13"
serde = { version = "1", features = ["derive"] }
serde_json = "1.0.151"
[lints]
workspace = true