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

fix: change default dns port #7

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -77,7 +77,7 @@ async fn main() -> Result<()> {
match args.env {
Env::IrohTest => println!("dig {} TXT", node_domain(&node_id, N0_TESTDNS_NODE_ORIGIN)),
Env::LocalDev => println!(
"dig @localhost -p 5353 {} TXT",
"dig @localhost -p 5300 {} TXT",
node_domain(&node_id, EXAMPLE_ORIGIN)
),
}
Expand Down
4 changes: 2 additions & 2 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
#[default]
IrohTest,
/// Use a localhost domain server listening on port 5353
/// Use a localhost domain server listening on port 5300
LocalDev,
}

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 {
"dns1.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!["iroh.".to_string(), ".".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
Loading