Skip to content

feat: Add configurable bind address + Github Workflow improvements#82

Merged
SeverinAlexB merged 15 commits intomainfrom
feat/bind_address
Feb 5, 2026
Merged

feat: Add configurable bind address + Github Workflow improvements#82
SeverinAlexB merged 15 commits intomainfrom
feat/bind_address

Conversation

@SeverinAlexB
Copy link
Contributor

@SeverinAlexB SeverinAlexB commented Feb 4, 2026

Bind address

  • Add bind_address() method to DhtBuilder to configure which network interface DHT nodes bind to (defaults to 0.0.0.0)
  • Add Testnet::builder() with a TestnetBuilder that defaults to 127.0.0.1 for better cross-platform compatibility (especially macOS)
  • Update all tests to use localhost binding to avoid firewall prompts on macOS

The key user-facing changes are:

  1. New Dht::builder().bind_address(Ipv4Addr::LOCALHOST) API
  2. New Testnet::builder(count).bind_address(...).build() pattern that defaults to localhost
  3. The existing Testnet::new() methods still bind to 0.0.0.0 for backwards compatibility

This fixes #83

PR Github Workflow Improvements

  • Split up existing jobs to run in parallel. This increases test speed substaintially
  • Clippy check + some code fixes
  • Minimal Rust Version check
  • Run tests on Ubuntu, Windows, and Mac

@SeverinAlexB SeverinAlexB changed the title feat: Add configurable bind address feat: Add configurable bind address + Github Workflow improvements Feb 4, 2026
src/dht.rs Outdated
Comment on lines 736 to 738
pub async fn build_async(&self) -> Result<Testnet, std::io::Error> {
self.build()
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this? This looks like its just doing sync stuff

Copy link
Contributor

@afterburn afterburn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SeverinAlexB small nit but feel free to merge if you think its okay

@SeverinAlexB SeverinAlexB merged commit 73e953f into main Feb 5, 2026
9 checks passed
@afterburn afterburn deleted the feat/bind_address branch February 5, 2026 09:15
This was referenced Feb 5, 2026
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.

[BUG] Test fail - Binding to 0.0.0.0 not working flawlessly anymore on new MacOS 26 Tahoe

2 participants