Expand description
ADNL transport for ton-net: the encrypted link to a liteserver.
ADNL is the transport TON nodes speak. This crate opens and runs a liteserver session over it, split along the sans-I/O seam of NET-ADR-002:
- The protocol core is pure.
client_handshakebuilds the 256-byte handshake packet and derives the session ciphers, andSessionCiphersseals and opens the stream frames. These are synchronous functions over bytes, tested against fixed vectors, with no socket and no clock. - I/O lives behind the
Transportseam. It moves ordered bytes and nothing more;TcpTransportimplements it over TCP. A browser transport is added later without touching the core. AdnlConnectionis the async surface. It draws the per-session randomness from a CSPRNG, completes the handshake over a transport, and runs a query to its answer.
AdnlConnection speaks the ADNL message layer: it wraps a query with an id and
matches the answer. The liteserver methods that build the query and decode the answer
live in ton-net-lite.
This is an internal crate of the ton-net client.
Re-exports§
pub use connection::AdnlConnection;pub use connection::AdnlError;pub use frame::FrameError;pub use frame::SessionCiphers;pub use handshake::client_handshake;pub use handshake::Handshake;pub use handshake::HandshakeError;pub use handshake::HandshakeSecrets;pub use transport::TcpTransport;pub use transport::Transport;pub use transport::TransportError;
Modules§
- connection
- The async connection driver: a liteserver session over a transport.
- frame
- ADNL stream framing: sealing and opening one frame.
- handshake
- The ADNL handshake: opening an encrypted session with a liteserver.
- transport
- The transport seam and its native TCP implementation.