Configuration we may use
There are many configurations, but I think there only 5 we may use
max_idle_timeout
: the maximum duration of inactivity in ms to accept before timing out the connection. We may use this to control how long a connection will be kept alive.
max_idle_timeout
is 10s, and we only receive keep-alive messages in this 10s, then after 10s, the connection will be closed.keep_alive_interval
: Period of inactivety before sending a keep-alive packet. Must be set lower than the max_idle_timeout
of both peers to be effective.max_concurrent_stream_limit
: Maximum number of incoming bidirectional streams that may be open
concurrently by the remote peer.
client_tls_config
: set client TLS configurationserver_tls_config
: set server TLS configurationTransport implementation details:
Listener
struct Listener {
endpoint: quinn::Endpoint,
// Cloned from the socket used to create a Endpoint.
// Use for hole punching, support NAT.
socket: UdpSocket,
...
}
Transport
struct Transport {
listeners: SelectAll<Listener>
...
}
In summary, for mixnet V1, libp2p's QUIC is good enough. And it also help us solve the NAT problem.