Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/change-dev-port'
Browse files Browse the repository at this point in the history
  • Loading branch information
Frando committed Apr 8, 2024
2 parents bca7034 + e6e54f1 commit a2ce9df
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion iroh-dns-server/config.dev.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cert_mode = "self_signed"
letsencrypt_prod = false

[dns]
port = 5353
port = 5300
default_soa = "dns1.irohdns.example hostmaster.irohdns.example 0 10800 3600 604800 3600"
default_ttl = 900
origin = "irohdns.example."
Expand Down
2 changes: 1 addition & 1 deletion iroh-dns-server/examples/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ async fn main() -> Result<()> {
Env::Dev => {
println!("cargo run --example resolve -- --env dev node {}", node_id);
println!(
"dig @localhost -p 5353 {} TXT",
"dig @localhost -p 5300 {} TXT",
fmt_domain(&node_id, EXAMPLE_ORIGIN)
)
}
Expand Down
6 changes: 3 additions & 3 deletions iroh-dns-server/examples/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ use iroh_net::dns::node_info::lookup_by_domain;
use iroh_net::dns::node_info::lookup_by_id;
use iroh_net::NodeId;

const LOCALHOST_DNS: &str = "127.0.0.1:5353";
const LOCALHOST_DNS: &str = "127.0.0.1:5300";
const EXAMPLE_ORIGIN: &str = "irohdns.example";

#[derive(ValueEnum, Clone, Debug, Default)]
pub enum Env {
/// Use cloudflare and the irohdns test server at testdns.iroh.link
/// Use the system's nameservers with origin testdns.iroh.link
#[default]
Default,
/// Use a localhost domain server listening on port 5353
/// Use a localhost DNS server listening on port 5300
Dev,
}

Expand Down
2 changes: 1 addition & 1 deletion iroh-dns-server/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl Default for Config {
"irohdns.example hostmaster.irohdns.example 0 10800 3600 604800 3600"
.to_string(),
origin: "irohdns.example.".to_string(),
port: 5353,
port: 5300,
default_ttl: 900,
additional_origins: vec![".".to_string()],
ipv4_addr: Some(Ipv4Addr::LOCALHOST),
Expand Down
1 change: 1 addition & 0 deletions iroh-dns-server/src/dns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ pub async fn serve(
TcpListener::bind(sock_addr).await?,
TCP_TIMEOUT, // Duration::from_millis(settings.timeout_ms),
);
tracing::info!("DNS server listening on {}", sock_addr);

tokio::select! {
_ = server.block_until_done() => {
Expand Down

0 comments on commit a2ce9df

Please sign in to comment.