diff --git a/src/worker.ts b/src/worker.ts index 1306989..6a24d22 100644 --- a/src/worker.ts +++ b/src/worker.ts @@ -105,9 +105,15 @@ app.use('*', logger(customLogger)); app.use('*', async (c, next) => { if (c.req.raw.cf) { - console.log(`Hello from β›… ${c.req.raw.cf.colo ?? 'UNK'}`); + const cf = c.req.raw.cf; + console.log(`Hello from β›… ${cf.colo ?? 'UNK'}`); + console.log(`πŸ“Ά ${cf.httpProtocol ?? 'Unknown HTTP Protocol'} πŸ“ ${cf.clientTcpRtt ?? 'N/A'} ms RTT πŸ”’ ${cf.tlsVersion ?? 'Unencrypted Connection'} (${cf.tlsCipher ?? ''})`) + console.log(`πŸ—ΊοΈ ${cf.city ?? 'Unknown City'}, ${cf.regionCode ? (cf.regionCode + ', ') : ''}${cf.country ?? 'Unknown Country'} ${cf.isEUCountry ? '(EU)' : ''}`); + console.log(`🌐 ${c.req.header('x-real-ip') ?? ''} (${cf.asn ? ('AS' + cf.asn) : 'Unknown ASN'}, ${cf.asOrganization ?? 'Unknown Organization'})`); + } else { + console.log(`🌐 ${c.req.header('x-real-ip') ?? ''}`); } - console.log('userAgent', c.req.header('user-agent')); + console.log('πŸ•΅οΈβ€β™‚οΈ', c.req.header('user-agent')); await next(); });