banner
Moraxyc

Moraxyc's Rhapsody

Passion Forever! 永远热爱!
twitter
telegram
github
medium
discord server

The blog displays the current Cloudflare CDN nodes, making the interface cooler.

Cloudflare Nodes

Update#

2023.04.09
The blog has migrated to xLog, the old blog will still be updated, but only for compatibility maintenance and archiving.

2023.03.03
Due to the blog using multi-platform and multi-line deployment, the footer has been changed to a CI platform prompt.

This article is based on the article published on huai.pub on 2020-03-13 17:55:26, following the Attribution-NonCommercial 4.0 International (CC BY-NC 4.0).

Preface#

Since the establishment of this blog, it has been hosted on Cloudflare Pages and Vercel. A few months ago, Vercel's A record IP was partially polluted by the GFW, and after testing nationwide, 15% of the regions were polluted1. I can't believe so many people can't see the blog I carefully completed How can I tolerate this!

So last week I switched the blog back to Cloudflare Pages. Although the latency is not as good as Vercel, with an average nationwide ping of 150ms2, Cloudflare has strong customizability and global availability, so I don't mind that little latency.

At this point, I saw this blog: Display Current Node Information in the Page with CloudFlare Enabled.

Since I have switched to Cloudflare, why not make it cool? Place it in the footer, and present the information after the overall rendering of the page, which does not affect performance while informing everyone of the connected nodeand show off a bit.

js Script#

Code#

I modified the return of the script in the original article to reduce a bit of codeand then added a lot of code.

The original script used indexOf() to match nodes, while the modified version replaced it with regex and changed it to a method of nesting JSON within an arraydefinitely not because I was annoyed by the original version's parentheses, making it more direct and less error-prone.

Formatted JavaScript script, too long, so I will fold it up here ```JavaScript $(document).ready( $.ajax({ url: "/cdn-cgi/trace", success: function (data, status) { let areas = [ '{"s":"TNR","l":"Antananarivo, Madagascar"}', '{"s":"CPT","l":"Cape Town, South Africa"}', '{"s":"CMN","l":"Casablanca, Morocco"}', '{"s":"DAR","l":"Dar Es Salaam, Tanzania"}', '{"s":"JIB","l":"Djibouti City, Djibouti"}', '{"s":"DUR","l":"Durban, South Africa"}', '{"s":"JNB","l":"Johannesburg, South Africa"}', '{"s":"KGL","l":"Kigali, Rwanda"}', '{"s":"LOS","l":"Lagos, Nigeria"}', '{"s":"LAD","l":"Luanda, Angola"}', '{"s":"MPM","l":"Maputo, MZ"}', '{"s":"MBA","l":"Mombasa, Kenya"}', '{"s":"MRU","l":"Port Louis, Mauritius"}', '{"s":"RUN","l":"Réunion, France"}', '{"s":"BLR","l":"Bangalore, India"}', '{"s":"BKK","l":"Bangkok, Thailand"}', '{"s":"BWN","l":"Bandar Seri Begawan, Brunei"}', '{"s":"CEB","l":"Cebu, Philippines"}', '{"s":"CTU","l":"Chengdu, 🇨🇳 China"}', '{"s":"MAA","l":"Chennai, India"}', '{"s":"CGP","l":"Chittagong, Bangladesh"}', '{"s":"CKG","l":"Chongqing, 🇨🇳 China"}', '{"s":"CMB","l":"Colombo, Sri Lanka"}', '{"s":"DAC","l":"Dhaka, Bangladesh"}', '{"s":"SZX","l":"Dongguan, 🇨🇳 China"}', '{"s":"FUO","l":"Foshan, 🇨🇳 China"}', '{"s":"FOC","l":"Fuzhou, 🇨🇳 China"}', '{"s":"CAN","l":"Guangzhou, 🇨🇳 China"}', '{"s":"HGH","l":"Hangzhou, 🇨🇳 China"}', '{"s":"HAN","l":"Hanoi, Vietnam"}', '{"s":"HNY","l":"Hengyang, 🇨🇳 China"}', '{"s":"SGN","l":"Ho Chi Minh City, Vietnam"}', '{"s":"HKG","l":"🇭🇰 Hong Kong"}', '{"s":"HYD","l":"Hyderabad, India"}', '{"s":"ISB","l":"Islamabad, Pakistan"}', '{"s":"CGK","l":"Jakarta, Indonesia"}', '{"s":"TNA","l":"Jinan, 🇨🇳 China"}', '{"s":"KHI","l":"Karachi, Pakistan"}', '{"s":"KTM","l":"Kathmandu, Nepal"}', '{"s":"CCU","l":"Kolkata, India"}', '{"s":"KUL","l":"Kuala Lumpur, Malaysia"}', '{"s":"LHE","l":"Lahore, Pakistan"}', '{"s":"NAY","l":"Langfang, 🇨🇳 China"}', '{"s":"LYA","l":"Luoyang, 🇨🇳 China"}', '{"s":"MFM","l":"🇲🇴 Macau"}', '{"s":"MLE","l":"Malé, Maldives"}', '{"s":"MNL","l":"Manila, Philippines"}', '{"s":"BOM","l":"Mumbai, India"}', '{"s":"NAG","l":"Nagpur, India"}', '{"s":"NNG","l":"Nanning, 🇨🇳 China"}', '{"s":"DEL","l":"New Delhi, India"}', '{"s":"KIX","l":"Osaka, Japan"}', '{"s":"PNH","l":"Phnom Penh, Cambodia"}', '{"s":"TAO","l":"Qingdao, 🇨🇳 China"}', '{"s":"ICN","l":"Seoul, South Korea"}', '{"s":"SHA","l":"Shanghai, 🇨🇳 China"}', '{"s":"SHE","l":"Shenyang, 🇨🇳 China"}', '{"s":"SJW","l":"Shijiazhuang, 🇨🇳 China"}', '{"s":"SIN","l":"Singapore, Singapore"}', '{"s":"SZV","l":"Suzhou, 🇨🇳 China"}', '{"s":"TPE","l":"Taipei, 🇨🇳 Taiwan"}', '{"s":"PBH","l":"Thimphu, Bhutan"}', '{"s":"TSN","l":"Tianjin, 🇨🇳 China"}', '{"s":"NRT","l":"Tokyo, Japan"}', '{"s":"ULN","l":"Ulaanbaatar, Mongolia"}', '{"s":"VTE","l":"Vientiane, Laos"}', '{"s":"WUH","l":"Wuhan, 🇨🇳 China"}', '{"s":"WUX","l":"Wuxi, 🇨🇳 China"}', '{"s":"XIY","l":"Xi'an, 🇨🇳 China"}', '{"s":"EVN","l":"Yerevan, Armenia"}', '{"s":"CGO","l":"Zhengzhou, 🇨🇳 China"}', '{"s":"CSX","l":"Zhuzhou, 🇨🇳 China"}', '{"s":"AMS","l":"Amsterdam, Netherlands"}', '{"s":"ATH","l":"Athens, Greece"}', '{"s":"BCN","l":"Barcelona, Spain"}', '{"s":"BEG","l":"Belgrade, Serbia"}', '{"s":"TXL","l":"Berlin, Germany"}', '{"s":"BRU","l":"Brussels, Belgium"}', '{"s":"OTP","l":"Bucharest, Romania"}', '{"s":"BUD","l":"Budapest, Hungary"}', '{"s":"KIV","l":"Chișinău, Moldova"}', '{"s":"CPH","l":"Copenhagen, Denmark"}', '{"s":"ORK","l":"Cork, Ireland"}', '{"s":"DUB","l":"Dublin, Ireland"}', '{"s":"DUS","l":"Düsseldorf, Germany"}', '{"s":"EDI","l":"Edinburgh, United Kingdom"}', '{"s":"FRA","l":"Frankfurt, Germany"}', '{"s":"GVA","l":"Geneva, Switzerland"}', '{"s":"GOT","l":"Gothenburg, Sweden"}', '{"s":"HAM","l":"Hamburg, Germany"}', '{"s":"HEL","l":"Helsinki, Finland"}', '{"s":"IST","l":"Istanbul, Turkey"}', '{"s":"KBP","l":"Kyiv, Ukraine"}', '{"s":"LIS","l":"Lisbon, Portugal"}', '{"s":"LHR","l":"London, United Kingdom"}', '{"s":"LUX","l":"Luxembourg City, Luxembourg"}', '{"s":"MAD","l":"Madrid, Spain"}', '{"s":"MAN","l":"Manchester, United Kingdom"}', '{"s":"MRS","l":"Marseille, France"}', '{"s":"MXP","l":"Milan, Italy"}', '{"s":"DME","l":"Moscow, Russia"}', '{"s":"MUC","l":"Munich, Germany"}', '{"s":"LCA","l":"Nicosia, Cyprus"}', '{"s":"OSL","l":"Oslo, Norway"}', '{"s":"CDG","l":"Paris, France"}', '{"s":"PRG","l":"Prague, Czech Republic"}', '{"s":"KEF","l":"Reykjavík, Iceland"}', '{"s":"RIX","l":"Riga, Latvia"}', '{"s":"FCO","l":"Rome, Italy"}', '{"s":"LED","l":"Saint Petersburg, Russia"}', '{"s":"SOF","l":"Sofia, Bulgaria"}', '{"s":"ARN","l":"Stockholm, Sweden"}', '{"s":"TLL","l":"Tallinn, Estonia"}', '{"s":"SKG","l":"Thessaloniki, Greece"}', '{"s":"VIE","l":"Vienna, Austria"}', '{"s":"VNO","l":"Vilnius, Lithuania"}', '{"s":"WAW","l":"Warsaw, Poland"}', '{"s":"ZAG","l":"Zagreb, Croatia"}', '{"s":"ZRH","l":"Zürich, Switzerland"}', '{"s":"ARI","l":"Arica, Chile"}', '{"s":"ASU","l":"Asunción, Paraguay"}', '{"s":"BOG","l":"Bogotá, Colombia"}', '{"s":"EZE","l":"Buenos Aires, Argentina"}', '{"s":"CWB","l":"Curitiba, Brazil"}', '{"s":"FOR","l":"Fortaleza, Brazil"}', '{"s":"GUA","l":"Guatemala City, Guatemala"}', '{"s":"LIM","l":"Lima, Peru"}', '{"s":"MDE","l":"Medellín, Colombia"}', '{"s":"PTY","l":"Panama City, Panama"}', '{"s":"POA","l":"Porto Alegre, Brazil"}', '{"s":"UIO","l":"Quito, Ecuador"}', '{"s":"GIG","l":"Rio de Janeiro, Brazil"}', '{"s":"GRU","l":"São Paulo, Brazil"}', '{"s":"SCL","l":"Santiago, Chile"}', '{"s":"CUR","l":"Willemstad, Curaçao"}', '{"s":"GND","l":"St. George‘s, Grenada"}', '{"s":"AMM","l":"Amman, Jordan"}', '{"s":"BGW","l":"Baghdad, Iraq"}', '{"s":"GYD","l":"Baku, Azerbaijan"}', '{"s":"BEY","l":"Beirut, Lebanon"}', '{"s":"DOH","l":"Doha, Qatar"}', '{"s":"DXB","l":"Dubai, United Arab Emirates"}', '{"s":"KWI","l":"Kuwait City, Kuwait"}', '{"s":"BAH","l":"Manama, Bahrain"}', '{"s":"MCT","l":"Muscat, Oman"}', '{"s":"ZDM","l":"Ramallah"}', '{"s":"RUH","l":"Riyadh, Saudi Arabia"}', '{"s":"TLV","l":"Tel Aviv, Israel"}', '{"s":"IAD","l":"Ashburn, VA, United States"}', '{"s":"ATL","l":"Atlanta, GA, United States"}', '{"s":"BOS","l":"Boston, MA, United States"}', '{"s":"BUF","l":"Buffalo, NY, United States"}', '{"s":"YYC","l":"Calgary, AB, Canada"}', '{"s":"CLT","l":"Charlotte, NC, United States"}', '{"s":"ORD","l":"Chicago, IL, United States"}', '{"s":"CMH","l":"Columbus, OH, United States"}', '{"s":"DFW","l":"Dallas, TX, United States"}', '{"s":"DEN","l":"Denver, CO, United States"}', '{"s":"DTW","l":"Detroit, MI, United States"}', '{"s":"HNL","l":"Honolulu, HI, United States"}', '{"s":"IAH","l":"Houston, TX, United States"}', '{"s":"IND","l":"Indianapolis, IN, United States"}', '{"s":"JAX","l":"Jacksonville, FL, United States"}', '{"s":"MCI","l":"Kansas City, MO, United States"}', '{"s":"LAS","l":"Las Vegas, NV, United States"}', '{"s":"LAX","l":"Los Angeles, CA, United States"}', '{"s":"MFE","l":"McAllen, TX, United States"}', '{"s":"MEM","l":"Memphis, TN, United States"}', '{"s":"MEX","l":"Mexico City, Mexico"}', '{"s":"MIA","l":"Miami, FL, United States"}', '{"s":"MSP","l":"Minneapolis, MN, United States"}', '{"s":"MGM","l":"Montgomery, AL, United States"}', '{"s":"YUL","l":"Montréal, QC, Canada"}', '{"s":"BNA","l":"Nashville, TN, United States"}', '{"s":"EWR","l":"Newark, NJ, United States"}', '{"s":"ORF","l":"Norfolk, VA, United States"}', '{"s":"OMA","l":"Omaha, NE, United States"}', '{"s":"PHL","l":"Philadelphia, United States"}', '{"s":"PHX","l":"Phoenix, AZ, United States"}', '{"s":"PIT","l":"Pittsburgh, PA, United States"}', '{"s":"PAP","l":"Port-Au-Prince, Haiti"}', '{"s":"PDX","l":"Portland, OR, United States"}', '{"s":"QRO","l":"Queretaro, MX, Mexico"}', '{"s":"RIC","l":"Richmond, Virginia"}', '{"s":"SMF","l":"Sacramento, CA, United States"}', '{"s":"SLC","l":"Salt Lake City, UT, United States"}', '{"s":"SAN","l":"San Diego, CA, United States"}', '{"s":"SJC","l":"San Jose, CA, United States"}', '{"s":"YXE","l":"Saskatoon, SK, Canada"}', '{"s":"SEA","l":"Seattle, WA, United States"}', '{"s":"STL","l":"St. Louis, MO, United States"}', '{"s":"TPA","l":"Tampa, FL, United States"}', '{"s":"YYZ","l":"Toronto, ON, Canada"}', '{"s":"YVR","l":"Vancouver, BC, Canada"}', '{"s":"TLH","l":"Tallahassee, FL, United States"}', '{"s":"YWG","l":"Winnipeg, MB, Canada"}', '{"s":"ADL","l":"Adelaide, SA, Australia"}', '{"s":"AKL","l":"Auckland, New Zealand"}', '{"s":"BNE","l":"Brisbane, QLD, Australia"}', '{"s":"MEL","l":"Melbourne, VIC, Australia"}', '{"s":"NOU","l":"Noumea, New Caledonia"}', '{"s":"PER","l":"Perth, WA, Australia"}', '{"s":"SYD","l":"Sydney, NSW, Australia"}' ]; let area = data.split("colo=")[1].split("\n")[0]; for (var i = 0; i < areas.length; i++) { const as = JSON.parse(areas[i]); if (as.s == area) { document.getElementById("cdn").innerHTML = as.l; break; }; } } } ) ); ```

The modified version adds national flag emojis to all Chinese nodes and replaces them with Chinese names. Interested students can also replace other nodes themselves.

However, Cloudflare's mainland nodes can only be used by Enterprise Plan users who have filed for record, I'm not that kind of big shot I don't think I will see the day when mainland nodes appear 😢.

Principle#

Cloudflare adds the /cdn-cgi/ endpoint for all customers. Any website using Cloudflare can access example.com/cdn-cgi/trace to return the user's current information, such as IP address, CDN node, whether WARP is enabled, TLS protocol version, etc.

So we can access this endpoint on the front end, parse it, and write the content into the corresponding ID tags in the front end, thus presenting the current relationship between the user and Cloudflare CDN.

Usage#

Prerequisites#

Since jQuery is used to access cdn-cgi, this script needs to include this library first. Blogs that have already referenced this library do not need to reference it again.

Currently, most blogs use the jQuery library, so there is a high probability that no code changes are needed. If not, you can simply rewrite the script for use.

Minimized version:

$(document).ready($.ajax({url: "/cdn-cgi/trace",success: function(data, status) {let areas=['{"s":"TNR","l":"Antananarivo, Madagascar"}','{"s":"CPT","l":"Cape Town, South Africa"}','{"s":"CMN","l":"Casablanca, Morocco"}','{"s":"DAR","l":"Dar Es Salaam, Tanzania"}','{"s":"JIB","l":"Djibouti City, Djibouti"}','{"s":"DUR","l":"Durban, South Africa"}','{"s":"JNB","l":"Johannesburg, South Africa"}','{"s":"KGL","l":"Kigali, Rwanda"}','{"s":"LOS","l":"Lagos, Nigeria"}','{"s":"LAD","l":"Luanda, Angola"}','{"s":"MPM","l":"Maputo, MZ"}','{"s":"MBA","l":"Mombasa, Kenya"}','{"s":"MRU","l":"Port Louis, Mauritius"}','{"s":"RUN","l":"Réunion, France"}','{"s":"BLR","l":"Bangalore, India"}','{"s":"BKK","l":"Bangkok, Thailand"}','{"s":"BWN","l":"Bandar Seri Begawan, Brunei"}','{"s":"CEB","l":"Cebu, Philippines"}','{"s":"CTU","l":"Chengdu, 🇨🇳 China"}','{"s":"MAA","l":"Chennai, India"}','{"s":"CGP","l":"Chittagong, Bangladesh"}','{"s":"CKG","l":"Chongqing, 🇨🇳 China"}','{"s":"CMB","l":"Colombo, Sri Lanka"}','{"s":"DAC","l":"Dhaka, Bangladesh"}','{"s":"SZX","l":"Dongguan, 🇨🇳 China"}','{"s":"FUO","l":"Foshan, 🇨🇳 China"}','{"s":"FOC","l":"Fuzhou, 🇨🇳 China"}','{"s":"CAN","l":"Guangzhou, 🇨🇳 China"}','{"s":"HGH","l":"Hangzhou, 🇨🇳 China"}','{"s":"HAN","l":"Hanoi, Vietnam"}','{"s":"HNY","l":"Hengyang, 🇨🇳 China"}','{"s":"SGN","l":"Ho Chi Minh City, Vietnam"}','{"s":"HKG","l":"🇭🇰 Hong Kong"}','{"s":"HYD","l":"Hyderabad, India"}','{"s":"ISB","l":"Islamabad, Pakistan"}','{"s":"CGK","l":"Jakarta, Indonesia"}','{"s":"TNA","l":"Jinan, 🇨🇳 China"}','{"s":"KHI","l":"Karachi, Pakistan"}','{"s":"KTM","l":"Kathmandu, Nepal"}','{"s":"CCU","l":"Kolkata, India"}','{"s":"KUL","l":"Kuala Lumpur, Malaysia"}','{"s":"LHE","l":"Lahore, Pakistan"}','{"s":"NAY","l":"Langfang, 🇨🇳 China"}','{"s":"LYA","l":"Luoyang, 🇨🇳 China"}','{"s":"MFM","l":"🇲🇴 Macau"}','{"s":"MLE","l":"Malé, Maldives"}','{"s":"MNL","l":"Manila, Philippines"}','{"s":"BOM","l":"Mumbai, India"}','{"s":"NAG","l":"Nagpur, India"}','{"s":"NNG","l":"Nanning, 🇨🇳 China"}','{"s":"DEL","l":"New Delhi, India"}','{"s":"KIX","l":"Osaka, Japan"}','{"s":"PNH","l":"Phnom Penh, Cambodia"}','{"s":"TAO","l":"Qingdao, 🇨🇳 China"}','{"s":"ICN","l":"Seoul, South Korea"}','{"s":"SHA","l":"Shanghai, 🇨🇳 China"}','{"s":"SHE","l":"Shenyang, 🇨🇳 China"}','{"s":"SJW","l":"Shijiazhuang, 🇨🇳 China"}','{"s":"SIN","l":"Singapore, Singapore"}','{"s":"SZV","l":"Suzhou, 🇨🇳 China"}','{"s":"TPE","l":"Taipei, 🇨🇳 Taiwan"}','{"s":"PBH","l":"Thimphu, Bhutan"}','{"s":"TSN","l":"Tianjin, 🇨🇳 China"}','{"s":"NRT","l":"Tokyo, Japan"}','{"s":"ULN","l":"Ulaanbaatar, Mongolia"}','{"s":"VTE","l":"Vientiane, Laos"}','{"s":"WUH","l":"Wuhan, 🇨🇳 China"}','{"s":"WUX","l":"Wuxi, 🇨🇳 China"}','{"s":"XIY","l":"Xi'an, 🇨🇳 China"}','{"s":"EVN","l":"Yerevan, Armenia"}','{"s":"CGO","l":"Zhengzhou, 🇨🇳 China"}','{"s":"CSX","l":"Zhuzhou, 🇨🇳 China"}','{"s":"AMS","l":"Amsterdam, Netherlands"}','{"s":"ATH","l":"Athens, Greece"}','{"s":"BCN","l":"Barcelona, Spain"}','{"s":"BEG","l":"Belgrade, Serbia"}','{"s":"TXL","l":"Berlin, Germany"}','{"s":"BRU","l":"Brussels, Belgium"}','{"s":"OTP","l":"Bucharest, Romania"}','{"s":"BUD","l":"Budapest, Hungary"}','{"s":"KIV","l":"Chișinău, Moldova"}','{"s":"CPH","l":"Copenhagen, Denmark"}','{"s":"ORK","l":"Cork, Ireland"}','{"s":"DUB","l":"Dublin, Ireland"}','{"s":"DUS","l":"Düsseldorf, Germany"}','{"s":"EDI","l":"Edinburgh, United Kingdom"}','{"s":"FRA","l":"Frankfurt, Germany"}','{"s":"GVA","l":"Geneva, Switzerland"}','{"s":"GOT","l":"Gothenburg, Sweden"}','{"s":"HAM","l":"Hamburg, Germany"}','{"s":"HEL","l":"Helsinki, Finland"}','{"s":"IST","l":"Istanbul, Turkey"}','{"s":"KBP","l":"Kyiv, Ukraine"}','{"s":"LIS","l":"Lisbon, Portugal"}','{"s":"LHR","l":"London, United Kingdom"}','{"s":"LUX","l":"Luxembourg City, Luxembourg"}','{"s":"MAD","l":"Madrid, Spain"}','{"s":"MAN","l":"Manchester, United Kingdom"}','{"s":"MRS","l":"Marseille, France"}','{"s":"MXP","l":"Milan, Italy"}','{"s":"DME","l":"Moscow, Russia"}','{"s":"MUC","l":"Munich, Germany"}','{"s":"LCA","l":"Nicosia, Cyprus"}','{"s":"OSL","l":"Oslo, Norway"}','{"s":"CDG","l":"Paris, France"}','{"s":"PRG","l":"Prague, Czech Republic"}','{"s":"KEF","l":"Reykjavík, Iceland"}','{"s":"RIX","l":"Riga, Latvia"}','{"s":"FCO","l":"Rome, Italy"}','{"s":"LED","l":"Saint Petersburg, Russia"}','{"s":"SOF","l":"Sofia, Bulgaria"}','{"s":"ARN","l":"Stockholm, Sweden"}','{"s":"TLL","l":"Tallinn, Estonia"}','{"s":"SKG","l":"Thessaloniki, Greece"}','{"s":"VIE","l":"Vienna, Austria"}','{"s":"VNO","l":"Vilnius, Lithuania"}','{"s":"WAW","l":"Warsaw, Poland"}','{"s":"ZAG","l":"Zagreb, Croatia"}','{"s":"ZRH","l":"Zürich, Switzerland"}','{"s":"ARI","l":"Arica, Chile"}','{"s":"ASU","l":"Asunción, Paraguay"}','{"s":"BOG","l":"Bogotá, Colombia"}','{"s":"EZE","l":"Buenos Aires, Argentina"}','{"s":"CWB","l":"Curitiba, Brazil"}','{"s":"FOR","l":"Fortaleza, Brazil"}','{"s":"GUA","l":"Guatemala City, Guatemala"}','{"s":"LIM","l":"Lima, Peru"}','{"s":"MDE","l":"Medellín, Colombia"}','{"s":"PTY","l":"Panama City, Panama"}','{"s":"POA","l":"Porto Alegre, Brazil"}','{"s":"UIO","l":"Quito, Ecuador"}','{"s":"GIG","l":"Rio de Janeiro, Brazil"}','{"s":"GRU","l":"São Paulo, Brazil"}','{"s":"SCL","l":"Santiago, Chile"}','{"s":"CUR","l":"Willemstad, Curaçao"}','{"s":"GND","l":"St. George‘s, Grenada"}','{"s":"AMM","l":"Amman, Jordan"}','{"s":"BGW","l":"Baghdad, Iraq"}','{"s":"GYD","l":"Baku, Azerbaijan"}','{"s":"BEY","l":"Beirut, Lebanon"}','{"s":"DOH","l":"Doha, Qatar"}','{"s":"DXB","l":"Dubai, United Arab Emirates"}','{"s":"KWI","l":"Kuwait City, Kuwait"}','{"s":"BAH","l":"Manama, Bahrain"}','{"s":"MCT","l":"Muscat, Oman"}','{"s":"ZDM","l":"Ramallah"}','{"s":"RUH","l":"Riyadh, Saudi Arabia"}','{"s":"TLV","l":"Tel Aviv, Israel"}','{"s":"IAD","l":"Ashburn, VA, United States"}','{"s":"ATL","l":"Atlanta, GA, United States"}','{"s":"BOS","l":"Boston, MA, United States"}','{"s":"BUF","l":"Buffalo, NY, United States"}','{"s":"YYC","l":"Calgary, AB, Canada"}','{"s":"CLT","l":"Charlotte, NC, United States"}','{"s":"ORD","l":"Chicago, IL, United States"}','{"s":"CMH","l":"Columbus, OH, United States"}','{"s":"DFW","l":"Dallas, TX, United States"}','{"s":"DEN","l":"Denver, CO, United States"}','{"s":"DTW","l":"Detroit, MI, United States"}','{"s":"HNL","l":"Honolulu, HI, United States"}','{"s":"IAH","l":"Houston, TX, United States"}','{"s":"IND","l":"Indianapolis, IN, United States"}','{"s":"JAX","l":"Jacksonville, FL, United States"}','{"s":"MCI","l":"Kansas City, MO, United States"}','{"s":"LAS","l":"Las Vegas, NV, United States"}','{"s":"LAX","l":"Los Angeles, CA, United States"}','{"s":"MFE","l":"McAllen, TX, United States"}','{"s":"MEM","l":"Memphis, TN, United States"}','{"s":"MEX","l":"Mexico City, Mexico"}','{"s":"MIA","l":"Miami, FL, United States"}','{"s":"MSP","l":"Minneapolis, MN, United States"}','{"s":"MGM","l":"Montgomery, AL, United States"}','{"s":"YUL","l":"Montréal, QC, Canada"}','{"s":"BNA","l":"Nashville, TN, United States"}','{"s":"EWR","l":"Newark, NJ, United States"}','{"s":"ORF","l":"Norfolk, VA, United States"}','{"s":"OMA","l":"Omaha, NE, United States"}','{"s":"PHL","l":"Philadelphia, United States"}','{"s":"PHX","l":"Phoenix, AZ, United States"}','{"s":"PIT","l":"Pittsburgh, PA, United States"}','{"s":"PAP","l":"Port-Au-Prince, Haiti"}','{"s":"PDX","l":"Portland, OR, United States"}','{"s":"QRO","l":"Queretaro, MX, Mexico"}','{"s":"RIC","l":"Richmond, Virginia"}','{"s":"SMF","l":"Sacramento, CA, United States"}','{"s":"SLC","l":"Salt Lake City, UT, United States"}','{"s":"SAN","l":"San Diego, CA, United States"}','{"s":"SJC","l":"San Jose, CA, United States"}','{"s":"YXE","l":"Saskatoon, SK, Canada"}','{"s":"SEA","l":"Seattle, WA, United States"}','{"s":"STL","l":"St. Louis, MO, United States"}','{"s":"TPA","l":"Tampa, FL, United States"}','{"s":"YYZ","l":"Toronto, ON, Canada"}','{"s":"YVR","l":"Vancouver, BC, Canada"}','{"s":"TLH","l":"Tallahassee, FL, United States"}','{"s":"YWG","l":"Winnipeg, MB, Canada"}','{"s":"ADL","l":"Adelaide, SA, Australia"}','{"s":"AKL","l":"Auckland, New Zealand"}','{"s":"BNE","l":"Brisbane, QLD, Australia"}','{"s":"MEL","l":"Melbourne, VIC, Australia"}','{"s":"NOU","l":"Noumea, New Caledonia"}','{"s":"PER","l":"Perth, WA, Australia"}','{"s":"SYD","l":"Sydney, NSW, Australia"}'];let area = data.split("colo=")[1].split("\n")[0];for (var i = 0; i < areas.length; i++) {const as = JSON.parse(areas[i]);if (as.s == area) {document.getElementById("cdn").innerHTML = as.l;break;}}}}));

Place it within <script></script> or reference it as a file.

Display Node Information#

To display node information, simply add <span id="cdn"></span> where you want to present the node information.

The effect can be seen below this blog⬇️

Footnotes#

  1. Data from boce, this blog does not guarantee accuracy.

  2. From ping.pe

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.