Phase 2: PostgreSQL, E2EE, channel CRUD, voice signaling, Slint migration
Server: - PostgreSQL backend (Pool enum over Sqlite/PgPool, all storage methods dual-dialect) - E2EE for DM (4 new protobuf packets, handlers, storage of ciphertext only) - ChannelEdit packet + server-authoritative channel create/delete - Gateway → voice-node membership signaling via broadcast channel Client: - E2EE crypto (X25519 from Ed25519, HKDF, ChaCha20-Poly1305) + UI lock icons - E2EE net layer (PID 0x0071-0x0074, JSON payloads, dispatch, session handlers) - Slint migration: all .slint files, bridge.rs, update.rs, main.rs rewritten - Removed egui UI (~50 files) and all dead code (clean clippy -D warnings)
This commit is contained in:
parent
c34ed2a192
commit
742cf03a5f
31 changed files with 2203 additions and 639 deletions
|
|
@ -11,7 +11,7 @@ use crate::{
|
|||
},
|
||||
};
|
||||
|
||||
use super::{Ctx, channel, content, direct_message, friends, guild};
|
||||
use super::{Ctx, channel, content, direct_message, e2ee, friends, guild};
|
||||
|
||||
pub async fn dispatch<S: AsyncRead + AsyncWrite + Unpin>(
|
||||
ctx: &mut Ctx<'_, S>,
|
||||
|
|
@ -43,6 +43,7 @@ pub async fn dispatch<S: AsyncRead + AsyncWrite + Unpin>(
|
|||
&m.channel_id,
|
||||
ctx.crypto,
|
||||
ctx.state,
|
||||
addr,
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
|
|
@ -70,6 +71,12 @@ pub async fn dispatch<S: AsyncRead + AsyncWrite + Unpin>(
|
|||
)
|
||||
.await?;
|
||||
}
|
||||
PacketId::ChannelEdit => {
|
||||
channel::handle_channel_edit(
|
||||
ctx.stream, ctx.seq, session_id, payload, ctx.crypto, ctx.state,
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
PacketId::ChannelList => {
|
||||
channel::handle_channel_list(ctx.stream, ctx.seq, session_id, ctx.crypto, ctx.state)
|
||||
.await?;
|
||||
|
|
@ -275,6 +282,30 @@ pub async fn dispatch<S: AsyncRead + AsyncWrite + Unpin>(
|
|||
)
|
||||
.await?;
|
||||
}
|
||||
PacketId::E2eeDmKeyExchange => {
|
||||
e2ee::handle_e2ee_key_exchange(
|
||||
ctx.stream, ctx.seq, session_id, payload, ctx.crypto, ctx.state,
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
PacketId::E2eeDmKeyExchangeAck => {
|
||||
e2ee::handle_e2ee_key_exchange_ack(
|
||||
ctx.stream, ctx.seq, session_id, payload, ctx.crypto, ctx.state,
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
PacketId::E2eeDmMessage => {
|
||||
e2ee::handle_e2ee_dm_message(
|
||||
ctx.stream, ctx.seq, session_id, payload, ctx.crypto, ctx.state,
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
PacketId::E2eeDmHistory => {
|
||||
e2ee::handle_e2ee_dm_history(
|
||||
ctx.stream, ctx.seq, session_id, payload, ctx.crypto, ctx.state,
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
PacketId::Disconnect => debug!("{addr} DISCONNECT"),
|
||||
other => debug!("{addr} unhandled {:?}", other),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue