kubo/test
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
..
3nodetest feat(fuse): Expose MFS as FUSE mount point (#10781) 2025-05-06 21:55:53 +02:00
api-startup misc: Remove some dead code 2018-03-21 01:34:04 +01:00
bench fix: error during config when running benchmarks (#10495) 2024-08-28 18:21:16 +02:00
bin Replace go-random with random-data from go-test package (#10731) 2025-02-24 13:42:39 -08:00
cli feat(dns): skip DNS lookups for AutoTLS hostnames (#11140) 2026-01-30 17:20:56 +01:00
dependencies Upgrade to Boxo v0.36.0 (#11175) 2026-01-27 15:51:01 -08:00
integration feat(pubsub): persistent validation and diagnostic commands (#11110) 2026-01-16 00:27:09 +01:00
sharness Upgrade to Boxo v0.36.0 (#11175) 2026-01-27 15:51:01 -08:00
unit fix(ci): parallelize gotest, cleanup output, flakiness (#11113) 2026-01-08 05:07:08 +01:00
.gitignore test: add IPFS-BUILD-OPTIONS to .gitignore 2015-04-06 18:06:24 +02:00
ipfs-test-lib.sh test: fix Docker tests in GH Actions (#9812) 2023-04-12 09:03:11 +02:00
README.md test/README: update sharness test coverage 2015-04-02 11:56:49 +02:00
Rules.mk ci: Coverage and Junit xmls in one run 2018-10-29 18:44:49 +01:00
sharness_test_coverage_helper.sh Fix typos and cleanup 2020-04-20 22:00:01 +03:00

Sharness test command coverage

Module Online Test Offline Test
object t0051 t0051
ls t0045 t0045
cat t0040
dht
bitswap
block t0050
daemon t0030 N/A
init N/A t0020
add t0040
config t0021 t0021
version t0060 t0010
ping
diag
mount t0030
name t0110 t0100
pin t0080
get t0090 t0090
refs t0080
repo gc t0080
id
bootstrap t0120 t0120
swarm
update
commands