Public IP Service ip.renfei.net: Announcing New Geolocation Fields
My site's public IP service, ip.renfei.net, is used by many people. On May 10, 2022 a user named Qin Yi'nan left a message asking for geolocation support — and here it is.
27 posts
My site's public IP service, ip.renfei.net, is used by many people. On May 10, 2022 a user named Qin Yi'nan left a message asking for geolocation support — and here it is.

At 12:15 a.m. yesterday my phone lit up; emails and text messages poured in one after another — network traffic alerts, CPU alerts. There must be something unspeakable behind this. Why do hundreds of threads keep dropping? Why do callbacks take forever to return? Why does MySQL keep getting assaulted?

Every developer's program differs: some handle JSON well, some XML, some plain TXT. So why not just respond in the format you need? ip.renfei.net now returns different formats based on the Accept request header.

This post uses the IP2Location LITE database and queries it by reading the BIN file directly. The code is a trimmed-down version of the official sample, published to Maven Central.

This post walks through installing OpenWRT (LEDE) on x86_64 hardware — a.k.a. flashing it. x86_64 means a 64-bit x86 CPU, common in industrial PCs. Consumer wireless routers use different chips, so first check whether the chip platform supports OpenWRT, then build an image for that platform. Images are not interchangeable.

My last post covered building OpenWRT (LEDE) manually. Building yourself gives more freedom, but it means paying for a server. Is there a free one? GitHub Actions Workflows lets you compile OpenWRT (LEDE) for free, and it's fast — the default config builds in about an hour.

I bought a small industrial PC and started playing with soft routers. Here's my write-up so the next person can skip the pitfalls I hit. This post covers building OpenWRT (LEDE) yourself; follow-ups will cover automating the build with GitHub Actions Workflows and installing the x86 soft router system.

Parallels Desktop loses network access on macOS Big Sur and can't connect USB devices, reporting "network initialization failed" and failing to attach USB to the VM. Here's the fix.

BT is short for BitTorrent, a content distribution protocol. Under the BitTorrent protocol, the publisher generates a .torrent file — a seed file, or just "seed" — from the file being published. A .torrent file is essentially a text file containing two parts: tracker information and file information. A tracker server acts like a broadcast station, letting peers tell each other who has the file or is downloading it. This site runs one too: http://tracker.renfei.net:8080/announce.

DDoS attacks are painful for individuals and for small and medium internet companies alike — even some large enterprises struggle with them. Here's my own take on how Cloudflare, a top-tier CDN and security vendor, absorbs DDoS attacks.
