kubo/core/node
Marcin Rataj 7de7af0820
feat(dns): skip DNS lookups for AutoTLS hostnames (#11140)
* feat(dns): resolve libp2p.direct addresses locally without network I/O

p2p-forge hostnames encode IP addresses directly (e.g., 1-2-3-4.peerID.libp2p.direct -> 1.2.3.4),
so DNS queries are wasteful. kubo now parses these IPs in-memory.

- applies to both default libp2p.direct and custom AutoTLS.DomainSuffix
- TXT queries still delegate to network for ACME DNS-01 compatibility

- https://github.com/ipfs/kubo/pull/11140#discussion_r2683477754
  use fallback to network DNS instead of returning errors when local
  parsing fails, ensuring forward compatibility with future DNS records

- https://github.com/ipfs/kubo/pull/11140#discussion_r2683512408
  add peerID validation using peer.Decode(), matching libp2p.direct
  server behavior, with fallback on invalid peerID

- https://github.com/ipfs/kubo/pull/11140#discussion_r2683521930
  document interaction with DNS.Resolvers in config.md

- https://github.com/ipfs/kubo/pull/11140#discussion_r2683526647
  add AutoTLS.SkipDNSLookup config flag to disable local resolution
  (useful for debugging or custom DNS override scenarios)

- https://github.com/ipfs/kubo/pull/11140#discussion_r2683533462
  add E2E test verifying libp2p.direct resolves locally even when
  DNS.Resolvers points to a broken server

additional improvements:
- use madns.BasicResolver interface instead of custom basicResolver
- add compile-time interface checks for p2pForgeResolver and madns.Resolver
- refactor tests: merge IPv4/IPv6, add helpers, use config.DefaultDomainSuffix
- improve changelog to explain public good benefit (reducing DNS load)

Fixes #11136
2026-01-30 17:20:56 +01:00
..
helpers collection of typo fixes (#10647) 2024-12-29 21:27:41 -08:00
libp2p feat(pubsub): persistent validation and diagnostic commands (#11110) 2026-01-16 00:27:09 +01:00
bitswap.go fix: Provide according to Reprovider.Strategy (#10886) 2025-08-08 10:56:44 +02:00
builder.go feat(config): AutoConf with "auto" placeholders (#10883) 2025-08-20 05:59:11 +02:00
core.go feat(mfs): chroot command to change the root (#8648) 2026-01-13 21:47:36 +01:00
dns.go feat(dns): skip DNS lookups for AutoTLS hostnames (#11140) 2026-01-30 17:20:56 +01:00
groups.go feat(config): optional Gateway.MaxRangeRequestFileSize (#10997) 2025-11-11 18:54:43 -08:00
helpers.go refactor: remove goprocess (#10872) 2025-08-06 00:33:45 +02:00
identity.go chore: bump go-libp2p v0.22.0 & go1.18&go1.19 2022-09-09 17:09:38 +02:00
ipns.go refactor: update to boxo without goprocess (#10567) 2024-11-19 18:04:22 +01:00
p2pforge_resolver_test.go feat(dns): skip DNS lookups for AutoTLS hostnames (#11140) 2026-01-30 17:20:56 +01:00
p2pforge_resolver.go feat(dns): skip DNS lookups for AutoTLS hostnames (#11140) 2026-01-30 17:20:56 +01:00
peering.go chore: migrate peering to ipfs/boxo (#10157) 2023-10-31 13:45:51 +00:00
provider.go feat(provider): info log AcceleratedDHTClient crawl (#11143) 2026-01-15 17:11:35 +01:00
storage.go fix: provide Filestore nodes (#10990) 2025-09-26 00:49:02 +02:00