[Feature Request] Resolve peer hostnames

Suggestions and discussion of future versions
Post Reply
FriedBunny
New User
New User
Posts: 7
Joined: Tue Nov 06, 2007 2:37 am

[Feature Request] Resolve peer hostnames

Post by FriedBunny »

It would be more informative if Deluge were to resolve the reverse DNS entires of peer IP addresses and display those instead, when available. For example: 123.45.67.89 might be replaced with the more meaningful "client-67-89.someisp.com" or "supersecretserver.riaa.com", et cetera.

Personally, I would implement it as a replacement for the IP column, essentially just writing over the IP with the hostname (and keeping the flag display in the same column).

It also might be nice to be able to right-click on the peer and have an option to copy their IP and/or hostname, that way no information is made unavailable.

Thanks, I hope that this feature enhancement is as simple to implement as it seems!
markybob
Compulsive Poster
Compulsive Poster
Posts: 1230
Joined: Thu May 24, 2007 11:27 pm
Location: Chicago, IL, USA
Contact:

Re: [Feature Request] Resolve peer hostnames

Post by markybob »

FriedBunny wrote:It would be more informative if Deluge were to resolve the reverse DNS entires of peer IP addresses and display those instead, when available. For example: 123.45.67.89 might be replaced with the more meaningful "client-67-89.someisp.com" or "supersecretserver.riaa.com", et cetera.

Personally, I would implement it as a replacement for the IP column, essentially just writing over the IP with the hostname (and keeping the flag display in the same column).

It also might be nice to be able to right-click on the peer and have an option to copy their IP and/or hostname, that way no information is made unavailable.

Thanks, I hope that this feature enhancement is as simple to implement as it seems!
it sounds like a great idea, until you think about the overhead. take a look at how long it takes to find a flag for every peer...then apply that same amount of time to resolving every ip into its hostname. it's really not worth it for most users. as far as copying peer info goes, yeah, we could do that.
FriedBunny
New User
New User
Posts: 7
Joined: Tue Nov 06, 2007 2:37 am

Re: [Feature Request] Resolve peer hostnames

Post by FriedBunny »

While it's sure to involve a certain amount of overhead, other notable clients (eg, uTorrent and Azureus) have included this option with little apparent impact on performance. I'd be curious to see how those implementations do it. I seem to recall that uTorrent lets you explicitly turn this on (it's off by default), allowing those users that care enough to choose to endure whatever accompanying performance hit there might be.

(And is this really comparable to how the flag lookup works? You're not using a local database to compare those IP ranges with?)

In any event, this isn't really a usability enhancement per se, but it is a bit of polish for those curious users, such as myself. Thanks, either way! :)
FriedBunny
New User
New User
Posts: 7
Joined: Tue Nov 06, 2007 2:37 am

Re: [Feature Request] Resolve peer hostnames

Post by FriedBunny »

I took the time to work out a rough implementation of this which seems to work acceptably. I added it directly into the "Torrent Peers" plugin, but I think that the actual host name lookup should probably move elsewhere and then added as peer["host_name"] -- like the country lookup. (Currently, lengthy or failed lookups will lock the gui, but this is rare.)

The lookups don't seem to take very long (in the <100ms range) and are cached to avoid having to re-lookup every gui refresh.

I combined this with the "IP Address" column, so the peer's host name replaces the IP if a reverse DNS entry can be found or else it leaves the IP intact.

I also baked this right into the plugin, but it would be kinder/gentler if it were optional.

I'm a complete novice at Python/GTK and there are bound to be things that I could have done better, so I'd greatly appreciate any insights or improvements!

I'd attach it to this post, but .patch/.diff/.txt are all apparently disallowed. You can download my patch from here.
Attachments
deluge_hostnames.png
deluge_hostnames.png (42.05 KiB) Viewed 8651 times
McV
New User
New User
Posts: 4
Joined: Sun Feb 21, 2010 12:39 pm

Re: [Feature Request] Resolve peer hostnames

Post by McV »

Daredee
Member
Member
Posts: 12
Joined: Sat Oct 04, 2014 4:49 pm

Re: [Feature Request] Resolve peer hostnames

Post by Daredee »

I have deluge 1.3.10 under win7 (as thin client for deluge on linux server) and I see IPs only, not names - is this option need to be activated somehow?
Post Reply