chore: rename quicproquo → quicprochat in Rust workspace
Rename all crate directories, package names, binary names, proto package/module paths, ALPN strings, env var prefixes, config filenames, mDNS service names, and plugin ABI symbols from quicproquo/qpq to quicprochat/qpc.
This commit is contained in:
47
crates/quicprochat-sdk/src/config.rs
Normal file
47
crates/quicprochat-sdk/src/config.rs
Normal file
@@ -0,0 +1,47 @@
|
||||
//! Client configuration.
|
||||
|
||||
use std::net::SocketAddr;
|
||||
use std::path::PathBuf;
|
||||
|
||||
/// Configuration for a `QpqClient` instance.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct ClientConfig {
|
||||
/// Server address (host:port).
|
||||
pub server_addr: SocketAddr,
|
||||
|
||||
/// Server hostname for TLS SNI.
|
||||
pub server_name: String,
|
||||
|
||||
/// Path to the local conversation database.
|
||||
pub db_path: PathBuf,
|
||||
|
||||
/// Password for encrypting the local database (SQLCipher).
|
||||
/// If `None`, the database is stored unencrypted.
|
||||
pub db_password: Option<String>,
|
||||
|
||||
/// Path to the local state file (identity key, MLS state).
|
||||
pub state_path: PathBuf,
|
||||
|
||||
/// Whether to accept self-signed TLS certificates (dev mode only).
|
||||
pub accept_invalid_certs: bool,
|
||||
|
||||
/// ALPN protocol identifier for the RPC service.
|
||||
pub alpn: Vec<u8>,
|
||||
}
|
||||
|
||||
impl Default for ClientConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
server_addr: std::net::SocketAddr::new(
|
||||
std::net::IpAddr::V4(std::net::Ipv4Addr::new(127, 0, 0, 1)),
|
||||
7000,
|
||||
),
|
||||
server_name: "localhost".to_string(),
|
||||
db_path: PathBuf::from("conversations.db"),
|
||||
db_password: None,
|
||||
state_path: PathBuf::from("client-state.bin"),
|
||||
accept_invalid_certs: false,
|
||||
alpn: b"qpc/2".to_vec(),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user