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

Most BT clients do do a lookup of IP addresses. Many do it to provide little flags in the UI to say which country a user is from. Some also use the results as part of an algorithm to ban bad clients (if all clients from the same ISP are sending bad data, ban the whole ISP).



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...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: