async function getCloudflareJSON(){
let data = await fetch('https://1.0.0.1/cdn-cgi/trace').then(res=>res.text())
let arr = data.trim().split('\n').map(e=>e.split('='))
return Object.fromEntries(arr)
}
getCloudflareJSON().then(console.log)
Output:
{fl: "202f225", h: "1.0.0.1", ip: "47.37.137.777", ts: "1625581799.09", visit_scheme: "https", …}
Output: