Everlasting Summer 20 Posted February 13 (edited) Here is a super simple JavaScript code you could use on all websites which are using Cloudflare CDN. It allows you to quickly retrieve some connection data, such as IP, location, CF server, whether or not the user uses WARP VPN, etc. async function getCloudflareTraceJSON() { try { const response = await fetch(`https://${location.hostname}/cdn-cgi/trace`); const traceData = await response.text(); const traceEntries = traceData.trim().split('\n').map(e => e.split('=')); return Object.fromEntries(traceEntries); } catch (error) { console.error(error); return null; } } getCloudflareTraceJSON().then(console.log); Usage example: getCloudflareTraceJSON().then( traceData => { if (traceData.loc === 'US') { console.log('Location: USA'); } else { console.log('Location: Not USA'); } } ); Edited February 13 by Everlasting Summer Share this post Link to post Share on other sites