This file documents recent notable changes to this project. The format of this file is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.8.1 - 2024-11-15
- The server side should call
server::handle
to handle incoming requests from a client. This function takes a handler, which should implement theHandler
trait. The handler currently handles the following requests:GetDataSource
GetTidbPatterns
- Types required in the requests handled by
Handler
:DataSourceKey
,DataType
,DataSource
client::Connection
provides the following functions to send requests to the server:get_data_source
get_pretrained_model
renew_certificate
server::send_trusted_domain_list
is deprecated. The server should now callserver::Connection::send_trusted_domain_list
to send the list of trusted domains to the client.server::respond_with_tidb_patters
is deprecated.server::handle
should be used to handle incoming requests from the client.
0.8.0 - 2024-10-11
server::Connection
encapsulates the QUIC connection from a client and provides a protocol-specific connection. This change improves encapsulation and makes the API more idiomatic to review-protocol. Currently it provides the following APIs:send_allowlist
send_trusted_domain_list
- Reverted the format change of
EventCategory
in the previous release to maintain compatibility with applications with their own deserialization logic.
0.7.0 - 2024-09-28
GetTidbPatterns
is handled byclient::get_tidb_patterns
at the client side andserver::respond_with_tidb_patterns
at the server side.
- Removed the following config-related items:
Config
,HogConfig
,PigletConfig
andCrusherConfig
Handler::get_config
andRequestCode::GetConfig
0.6.0 - 2024-09-18
client::handshake
was deprecated in version 0.4.1 and has been removed in this version. Applications using review-protocol should now create aConnection
instance usingConnectionBuilder
instead.
- Fixed the
request::Handler::trusted_domain_list
function to correctly parse the argument (#39).
0.5.0 - 2024-09-05
- Implemented new client API methods:
get_allow_list
: Retrieves the list of allowed networksget_block_list
: Retrieves the list of blocked networksget_internal_network_list
: Retrieves the list of internal networksget_tor_exit_node_list
: Retrieves the list of Tor exit nodesget_trusted_domain_list
: Retrieves the list of trusted domainsget_trusted_user_agent_list
: Retrieves the list of trusted user agents
- Implemented a new server API method:
notify_config_update
: Notifies the client that its configuration has been updated
Handler::set_config
is removed. The server should no longer sends a message that invokes this method. Instead, the server should sends a message that invokesHandler::update_config
.
send_trusted_domain_list
no longer tries to receive a response twice, causing the "unexpected end of file" error.
0.4.2 - 2024-07-31
- Introduced a new method
open_uni
in theConnection
struct. This method initiates an outgoing unidirectional stream and directly corresponds to theopen_uni
method of the underlyingquinn::Connection
. This addition is for backward-compatibility and will be removed when this crate provides all the necessary features without exposing quinn's types.
0.4.1 - 2024-07-30
-
The
ConnectionBuilder
struct has been enhanced to allow for the setting of certificates, private keys, and root certificates. This includes new methods to set and replace these components:ConnectionBuilder::cert
sets the client certificate for the connection.ConnectionBuilder::key
sets the client's private key for the connection.root_certs
sets the root certificates for the connection.
These additions provide more flexibility in managing secure connections by allowing certificates and keys to be updated dynamically.
-
The
update_config
is added to therequest::Handler
trait. This function allows the server to notify agents to take actions to update their configuration.
- The
handshake
function in theclient
module is deprecated. This function will be removed in the next major/minor release. Applications using review-protocol should now create aConnection
instance usingConnectionBuilder
instead of callingquinn::Endpoint::connect
andclient::handshake
separately. - The
reload_config
function in therequest::Handler
trait is deprecated. This function will be removed in the next major/minor release. Applications using review-protocol should now use theupdate_config
function in the client API to make agents update their configuration.
0.4.0 - 2024-07-22
- New
ConnectionBuilder
struct in theclient
module for creating customized connections. This allows for more flexible configuration of TLS settings and root certificates.ConnectionBuilder::new
function to create a new builder with given remote and local configurations.ConnectionBuilder::add_root_certs
method to add root certificates to the endpoint's certificate store.ConnectionBuilder::local_addr
method to set a specific local address for binding.ConnectionBuilder::connect
method to construct the finalConnection
instance. This combinesquinn::Endpoint::connect
andreview-protocol::client::handshake
. This simplifies the connection process for applications using review-protocol, reducing code duplication. Applications using review-protocol should now create aConnection
instance usingConnectionBuilder
instead of callingquinn::Endpoint::connect
andclient::handshake
separately.
Connection
struct in theclient
module. This provides a protocol-specific connection, improving encapsulation and making the API more idiomatic to review-protocol.- Methods like
local_addr
,remote_addr
,close_reason
,open_bi
, andaccept_bi
to interact with the connection.
- Methods like
- Introduced
EventCategory
enum to categorize security events. - New client API
get_config()
to fetch configuration from the server. This method allows clients to request and receive configuration data from the server. The format of the configuration is left to the caller to interpret.
- The
handshake
function in theclient
module no longer returns theSendStream
andRecvStream
handles. These values were previously returned but not used by the caller, so they have been removed to simplify the function's return type. - Minimized dependencies when only default features are used.
- Made several dependencies optional and tied them to specific features.
anyhow
,async-trait
,num_enum
,semver
, andthiserror
are now optional dependencies. - Modified
unary_request
function to returnstd::io::Result
instead ofanyhow::Result
.
- Made several dependencies optional and tied them to specific features.
- Direct dependency on
quinn::Connection
in the public API. TheConnection
struct now encapsulates thequinn::Connection
andquinn::Endpoint
. - Removed unused configurations and fields to streamline the crate and improve
maintainability. These removals are based on the observation that these items
were not being utilized by any applications depending on review-database.
ReconvergeConfig
has been eliminated.review_address
field has been removed fromHogConfig
,PigletConfig
, andCrusherConfig
.
0.3.0 - 2024-05-28
- Added a public API that provides
frame
functionality to avoid exposingoinq
'sframe
. This change improves the modularity of thereview-protocol
. server::send_trusted_domain_list
to facilitate sending the trusted domain list from the server to the client.
HandshakeError::ReadError
now provides the underlying error asstd::io::Error
, which is more informative than the previous custom error type.- Update
oinq
to version0.13.0
. Updating to this version results in the following changes.- Bump dependencies.
- Update quinn to version 0.11.
- Update rustls to version 0.23.
- Update rcgen to version 0.13.
- Fixed the handling of the error types provided by
oinq
.oinq
has changed from providing theRecvError
/SendError
error type to providing thestd::io::Error
error type. As a result,review-protocol
has also been modified tostd::io::Error
or convert to the correct internally defined error type.
- Bump dependencies.
0.2.0 - 2024-04-04
AgentInfo
to represent the agent's information during the handshake process.request::Handler
,request::handle
, and other related types needed to implement a request handler.
SendError::MessageTooLarge
no longer contains the underlying error,std::num::TryFromIntError
, since it does not provide any useful information.- Merge
SendError
'sMessageTooLarge
andSerializationFailure
, andHandshakeError
'sMessageTooLarge
andSerializationFailure
intoMessageTooLarge
, since serialization into a memory buffer fails only when the message is too large.
0.1.2 - 2024-03-25
- Types used in the protocol:
Process
TrafficFilterRule
client::send_ok
andclient::send_err
methods to facilitate sending responses from the client to the server.
0.1.1 - 2024-03-21
- Types used in the protocol:
Config
CrusherConfig
HogConfig
HostNetworkGroup
PigletConfig
ReconvergeConfig
ResourceUsage
HandshakeError
for the handshake process.frame
module for low-level protocol communication. This module provides the necessary communication primitives and ensures compatibility with theoinq
crate until the protocol's full implementation.client::send_request
method to facilitate initiating requests from the client to the server.
0.1.0 - 2024-03-15
unary_request
exchanges RPC-like messages between agents.- The
request
module provides request handlers that an agent needs to implement. client::handshake
implements the application-level handshake process for the client after a QUIC connection is established.