Skip to content

Refactor network layer, P2P handler, and update dependencies#6

Merged
ICKelin merged 12 commits intomainfrom
banyc/dev
Mar 25, 2026
Merged

Refactor network layer, P2P handler, and update dependencies#6
ICKelin merged 12 commits intomainfrom
banyc/dev

Conversation

@Banyc
Copy link
Copy Markdown
Collaborator

@Banyc Banyc commented Mar 22, 2026

Summary

Network Layer

  • Split Connection trait into ConnRead + ConnWrite + HasPeerAddr for future ownership split
  • Combined stun_ip + stun_port fields into StunAddr type
  • Replaced crate::Result with anyhow::Result throughout

P2P Handler

  • Removed Arc<RwLock<>> wrapping from PeerHandler, simplified to channel-based API
  • Restructured peer state into PeerSet with cleaner address tracking via LastActive wrapper
  • Simplified peer address storage: replaced separate ipv6/port with Option<SocketAddr>

Server

  • Flattened nested tokio::select! in server handler
  • Updated configuration watcher for notify 8.0 API

Dependencies

  • Replaced blocking ureq HTTP client with async reqwest
  • Upgraded axum 0.7 → 0.8, notify 7 → 8
  • Updated to Rust edition 2024 with inline format args
  • Bumped various crate versions

Internal

  • Moved binaries to src/bin/
  • Minor code cleanup and formatting fixes

@ICKelin ICKelin merged commit 3cb80f3 into main Mar 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants