ReYuki
1
What is the name of the domain?
reyuki.site
What is the issue you’re encountering
documentation issue
What are the steps to reproduce the issue?
How to fetch readable information on 1.1.1.1 — One of the Internet’s Fastest, Privacy-First DNS Resolver with command line? tried using curl but can’t find the data I was looking for
curl -s https://one.one.one.one/help | grep help
is there any api end-point that provide readable json format?
micky
2
Hey there,
You can query 1.1.1.1 using curl by calling the DoH URL to get information from 1.1.1.1 using curl.
https://cloudflare-dns.com/dns-query
For more information on this, I would recommend taking a look at the following document:
1 Like
ReYuki
3
it provides different data in response tho.
ReYuki
4
What I need is information that includes JSON data, similar to what’s shown in a base64 string sample:
[hemlo@asus ~]$ curl -s --http2 --header "accept: application/dns-json" "https://1.1.1.1/dns-query?name=cloudflare.com" | xargs -0 -I {} node -pe 'JSON.parse(JSON.stringify({}))'
{
Status: 0,
TC: false,
RD: true,
RA: true,
AD: true,
CD: false,
Question: [ { name: 'cloudflare.com', type: 1 } ],
Answer: [
{
name: 'cloudflare.com',
type: 1,
TTL: 232,
data: '104.16.132.229'
},
{
name: 'cloudflare.com',
type: 1,
TTL: 232,
data: '104.16.133.229'
}
]
}
[hemlo@asus ~]$ echo "eyJpc0NmIjoiTm8iLCJpc0RvdCI6Ik5vIiwiaXNEb2giOiJObyIsInJlc29sdmVySXAtMS4xLjEuMSI6IlllcyIsInJlc29sdmVySXAtMS4wLjAuMSI6IlllcyIsInJlc29sdmVySXAtMjYwNjo0NzAwOjQ3MDA6OjExMTEiOiJObyIsInJlc29sdmVySXAtMjYwNjo0NzAwOjQ3MDA6OjEwMDEiOiJObyIsImRhdGFjZW50ZXJMb2NhdGlvbiI6IkNHSyIsImlzV2FycCI6Ik5vIiwiaXNwTmFtZSI6IkNsb3VkZmxhcmUiLCJpc3BBc24iOiIxMzMzNSJ9" | base64 -d - | xargs -0 -I {} node -pe 'JSON.parse(JSON.stringify({}))'
{
isCf: 'No',
isDot: 'No',
isDoh: 'No',
'resolverIp-1.1.1.1': 'Yes',
'resolverIp-1.0.0.1': 'Yes',
'resolverIp-2606:4700:4700::1111': 'No',
'resolverIp-2606:4700:4700::1001': 'No',
datacenterLocation: 'CGK',
isWarp: 'No',
ispName: 'Cloudflare',
ispAsn: '13335'
}
ReYuki
5
if the thread get locked and someone know the answer, please email me on [email protected]