mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
* 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 |
||
|---|---|---|
| .. | ||
| serialize | ||
| addresses.go | ||
| api_test.go | ||
| api.go | ||
| autoconf_client.go | ||
| autoconf_test.go | ||
| autoconf.go | ||
| autonat.go | ||
| autotls.go | ||
| bitswap.go | ||
| bootstrap_peers_test.go | ||
| bootstrap_peers.go | ||
| config_test.go | ||
| config.go | ||
| datastore.go | ||
| discovery.go | ||
| dns.go | ||
| experiments.go | ||
| gateway.go | ||
| http_retrieval.go | ||
| identity.go | ||
| import_test.go | ||
| import.go | ||
| init_test.go | ||
| init.go | ||
| internal.go | ||
| ipns.go | ||
| migration_test.go | ||
| migration.go | ||
| mounts.go | ||
| peering.go | ||
| plugins.go | ||
| profile.go | ||
| provide_test.go | ||
| provide.go | ||
| provider.go | ||
| pubsub.go | ||
| remotepin.go | ||
| reprovider.go | ||
| routing_test.go | ||
| routing.go | ||
| swarm.go | ||
| types_test.go | ||
| types.go | ||
| version.go | ||