multi_fix: harden peer/session handling, tighten foreign-network trust, and improve web client metadata (#1999)

* machine-id should be scoped unbder same user-id
* feat: report device os metadata to console
* fix sync root key cause packet loss
* fix tun packet not invalid
* fix faketcp cause lat jitter
* fix some packet not decrypt
* fix peer info patch, improve performance of update self info
* fix foreign credential identity mismatch handling
This commit is contained in:
KKRainbow
2026-03-21 21:06:07 +08:00
committed by GitHub
parent 77966916c4
commit 2bfdd44759
24 changed files with 1381 additions and 358 deletions
+8 -7
View File
@@ -278,13 +278,9 @@ impl PeerMap {
pub async fn list_peers_with_conn(&self) -> Vec<PeerId> {
let mut ret = Vec::new();
let peers = self.list_peers();
for peer_id in peers.iter() {
let Some(peer) = self.get_peer_by_id(*peer_id) else {
continue;
};
if !peer.list_peer_conns().await.is_empty() {
ret.push(*peer_id);
for item in self.peer_map.iter() {
if item.value().has_live_conns() {
ret.push(*item.key());
}
}
ret
@@ -308,6 +304,11 @@ impl PeerMap {
.and_then(|p| p.get_peer_identity_type())
}
pub fn get_peer_public_key(&self, peer_id: PeerId) -> Option<Vec<u8>> {
self.get_peer_by_id(peer_id)
.and_then(|p| p.get_peer_public_key())
}
pub async fn close_peer_conn(
&self,
peer_id: PeerId,