feat(cli): select transport in config; server MultiServer + client dial handover

- aura-cli config gains [transport] (order + per-transport ports + obfuscate/
  masquerade); server binds all enabled transports via MultiServer, client uses
  dial() with UDP->TCP->QUIC handover. Config examples updated; backward-compatible
  (defaults to udp,tcp,quic). 21 cli tests incl. a real-UDP-transport loopback.
- docs/sing-box.md: integration approach note (process-bridge now; native Go
  outbound for phones, with crypto-library mapping + KAT requirement).
- Normalize rustfmt across the v2 transport files (tcp/dial/udp contract).

Whole workspace: 97 tests pass, clippy -D warnings clean, fmt clean. Deploy flow
(pki init/issue-server/issue-client) validated with the release binary.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
xah30
2026-05-25 21:41:59 +03:00
parent d72fbe8d68
commit d5b9a8611d
15 changed files with 682 additions and 94 deletions
+1 -3
View File
@@ -49,9 +49,7 @@ pub mod session;
pub use conn::PacketConnection;
pub use frame::{Frame, MsgType};
pub use handshake::{client_handshake, server_handshake};
pub use session::{
DatagramReceiver, DatagramSender, Session, SessionReceiver, SessionSender,
};
pub use session::{DatagramReceiver, DatagramSender, Session, SessionReceiver, SessionSender};
use thiserror::Error;
+3 -1
View File
@@ -404,7 +404,9 @@ impl DatagramReceiver {
/// * [`ProtoError::MalformedFrame`] — datagram too short or undecodable frame.
pub fn open(&mut self, datagram: &[u8]) -> Result<Frame, ProtoError> {
if datagram.len() < SEQ_LEN {
return Err(ProtoError::MalformedFrame("datagram shorter than seq prefix"));
return Err(ProtoError::MalformedFrame(
"datagram shorter than seq prefix",
));
}
let mut seq_be = [0u8; SEQ_LEN];
seq_be.copy_from_slice(&datagram[..SEQ_LEN]);