Hacker News new | past | comments | ask | show | jobs | submit login

Transmission (or at least the official clients I have personally used) doesn't show country of a peer. Plus you can't determine the country of an IP by DNS, unless your geoip provider happens to be DNS-based; what you need is a geoip database.



Country is normally determined by doing a reverse DNS lookup, and then looking at the country code in the domain name. It's not very accurate, but you can do it for free without relying on any third party service or database.

Here is the libtorrent code that does it for every peer:

https://github.com/arvidn/libtorrent/blob/8786d17e59c90aee2c...


Well, at least some clients use a geoip database, e.g. qBittorrent: https://github.com/qbittorrent/qBittorrent/blob/2ef059807afc...




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: