Add TTL to /api/v0/dns #5884
Labels
exp/expert
Having worked on the specific codebase is important
good first issue
Good issue for new contributors
help wanted
Seeking public contribution on this issue
Version information:
0.4.18
Type:
enhancement
Description:
DNS query API at
/api/v0/dns
resolves FQDN to IPFS path (if DNSLink exists).It is heavily used by ipfs-companion however we don't know for how long DNSLink (DNS
TXT
record) is valid and use a static cache expiration value, which has its downsides.Ideally, we would add an opt-in
--ttl
flag to extend response of/api/v0/dns
and use actual TTL in cache expiration logic.A response with
--ttl
could look like this:For what its worth I did a quick check and
go-ipfs/namesys
usesnet.LookupTXT
which returns strings with text, but no TTL, so I imagine standard library is not enough, and we would have to introduce more advanced DNS library to make this work.Does this sound feasible on go-ipfs end?
What would be the next step?
The text was updated successfully, but these errors were encountered: