From 76ae33a9f3f9abd166d1f6f23d6a8a0511510e3c Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Thu, 21 Apr 2022 23:49:51 +0200 Subject: [PATCH] chore: deprecate /api/v0/dns (#8893) Closes #8607 --- core/commands/dns.go | 37 +++++++------------------------------ core/commands/root.go | 5 ++--- 2 files changed, 9 insertions(+), 33 deletions(-) diff --git a/core/commands/dns.go b/core/commands/dns.go index 42a7c98c1a2..8fccadf6774 100644 --- a/core/commands/dns.go +++ b/core/commands/dns.go @@ -17,40 +17,17 @@ const ( ) var DNSCmd = &cmds.Command{ + Status: cmds.Deprecated, // https://github.com/ipfs/go-ipfs/issues/8607 Helptext: cmds.HelpText{ - Tagline: "Resolve DNS links.", + Tagline: "Resolve DNSLink records.", ShortDescription: ` -Multihashes are hard to remember, but domain names are usually easy to -remember. To create memorable aliases for multihashes, DNS TXT -records can point to other DNS links, IPFS objects, IPNS keys, etc. -This command resolves those links to the referenced object. -`, - LongDescription: ` -Multihashes are hard to remember, but domain names are usually easy to -remember. To create memorable aliases for multihashes, DNS TXT -records can point to other DNS links, IPFS objects, IPNS keys, etc. -This command resolves those links to the referenced object. - -Note: This command can only recursively resolve DNS links, -it will fail to recursively resolve through IPNS keys etc. -For general-purpose recursive resolution, use ipfs name resolve -r. - -For example, with this DNS TXT record: - - > dig +short TXT _dnslink.ipfs.io - dnslink=/ipfs/QmRzTuh2Lpuz7Gr39stNr6mTFdqAghsZec1JoUnfySUzcy - -The resolver will give: - - > ipfs dns ipfs.io - /ipfs/QmRzTuh2Lpuz7Gr39stNr6mTFdqAghsZec1JoUnfySUzcy +This command can only recursively resolve DNSLink TXT records. +It will fail to recursively resolve through IPNS keys etc. -The resolver can recursively resolve: +DEPRECATED: superseded by 'ipfs resolve' - > dig +short TXT recursive.ipfs.io - dnslink=/ipns/ipfs.io - > ipfs dns -r recursive.ipfs.io - /ipfs/QmRzTuh2Lpuz7Gr39stNr6mTFdqAghsZec1JoUnfySUzcy +For general-purpose recursive resolution, use 'ipfs resolve -r'. +It will work across multiple DNSLinks and IPNS keys. `, }, diff --git a/core/commands/root.go b/core/commands/root.go index 3fe31a8587a..b75c634f123 100644 --- a/core/commands/root.go +++ b/core/commands/root.go @@ -51,14 +51,13 @@ TEXT ENCODING COMMANDS ADVANCED COMMANDS daemon Start a long-running daemon process mount Mount an IPFS read-only mount point - resolve Resolve any type of name + resolve Resolve any type of content path name Publish and resolve IPNS names key Create and list IPNS name keypairs - dns Resolve DNS links pin Pin objects to local storage repo Manipulate the IPFS repository stats Various operational stats - p2p Libp2p stream mounting + p2p Libp2p stream mounting (experimental) filestore Manage the filestore (experimental) NETWORK COMMANDS