1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! Stealth rendezvous over UDP ("knock"), a puressh-only extension.
//!
//! The server keeps no TCP port visibly open. A client sends one signed UDP
//! datagram (a KNOCK) naming a user and key; if the key is authorized for that
//! user, the server opens a short-lived TCP listener for that client alone
//! and replies with an ACCEPT signed by its host key. The client connects,
//! proves it holds the ephemeral X25519 secret from the knock, and then runs
//! an ordinary SSH session, including full user authentication. Invalid
//! knocks are never answered.
//!
//! The protocol is specified in `docs/knock.md`. Layers:
//!
//! - [`wire`]: datagram encode/parse, signatures, key derivation.
//! - [`KnockState`]: sans-IO server logic (filtering, replay protection,
//! rate limits).
//! - [`KnockServer`]: the UDP socket and rendezvous listeners.
//! - [`knock`] / [`connect_or_knock`]: the client.
//!
//! This is not SSH and is not understood by other implementations.
pub use ;
pub use ;
pub use ;