Skip to content

Commit

Permalink
chore: deprecate /api/v0/dns (#8893)
Browse files Browse the repository at this point in the history
Closes #8607
  • Loading branch information
lidel committed Apr 21, 2022
1 parent fd7af6a commit 76ae33a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 33 deletions.
37 changes: 7 additions & 30 deletions core/commands/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
`,
},

Expand Down
5 changes: 2 additions & 3 deletions core/commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 76ae33a

Please sign in to comment.