Opened 13 years ago

Last modified 7 years ago

#1384 assigned patch

[lt.sess_set.announce_ip] Add option to specify tracker announce_ip

Reported by: Omega Weapon Owned by: Cas
Priority: minor Milestone: 2.x
Component: Core Version:
Keywords: Cc: OmegaPhil+Deluge.Trac@…, russ@…

Description

Please could an option be implemented to allow a user to define an IP address to report to a tracker - this is required on my network.

Currently uTorrent allows this: Options -> Preferences -> BitTorrent? -> 'IP/Hostname to report to tracker' (hostname is overkill IMHO).

rtorrent: The 'ip' config option.

I would like to donate £20 as a bounty for this, if possible.

This has previously been requested in the forums:

http://forum.deluge-torrent.org/viewtopic.php?f=7&t=26465 http://forum.deluge-torrent.org/viewtopic.php?f=9&t=24805

Thanks

Attachments (2)

deluge_announce_ip.patch (10.7 KB) - added by OmegaPhil 13 years ago.
deluge_announce_ip_console_ui.patch (832 bytes) - added by OmegaPhil 13 years ago.
Add announce_ip setting to console UI

Download all attachments as: .zip

Change History (17)

comment:1 Changed 13 years ago by Omega Weapon

  • Component changed from other to core
  • Version changed from other (please specify) to 1.3.0_dev

comment:2 Changed 13 years ago by Cas

  • Milestone changed from Future to 1.4.0
  • Priority changed from major to minor
  • Summary changed from User-defined IP address to report to tracker to Add option to specify tracker announce_ip
  • Version 1.3.0_dev deleted

As discussed in IRC this ticket is for adding libtorrent's announce_ip, from session_settings, to core and UIs.

comment:3 Changed 13 years ago by OmegaPhil

  • Type changed from feature-request to patch

I have attached a patch to allow Deluge to set the tracker announce IP address functionality libtorrent exposes, via the GTK and web UIs. Currently the console UI is unusable here due to #1917, so I am waiting on that to resolve before I start playing around with the console UI.

Due to a change in the way libtorrent exposes announce_ip, this change requires libtorrent-0.15.8 (testing with v0.15.7 dev).

comment:4 Changed 13 years ago by andar

You are missing an on_set function in preferencesmanager.py. With out this function, the announce_ip will never be set in the libtorrent's session_settings.

Changed 13 years ago by OmegaPhil

comment:5 Changed 13 years ago by OmegaPhil

I have replaced the patch with a revised version.

Unfortunately after having a look at debug level logs, I can see that libtorrent is already capable of working out what my public IP address is on this VPN setup (this is separate from UPnP and NAT-PMP):

20:42:59.562 [DEBUG ][deluge.core.alertmanager :124 ] external_ip_alert: external IP received: <IP address>

This means that I am not in a position to test my change (I believe perhaps that it was buggy handling of the listening port that caused no incoming connections during tests - even when no processes are listening on the specified port, deluge can start up with a random port when told to use a fixed one).

comment:6 Changed 13 years ago by OmegaPhil

Work on the console GUI is now pending #1917's fix going to master.

comment:7 Changed 13 years ago by OmegaPhil

Pending #1924.

Changed 13 years ago by OmegaPhil

Add announce_ip setting to console UI

comment:8 Changed 13 years ago by OmegaPhil

Have now implemented the setting in all UIs.

comment:9 follow-up: Changed 12 years ago by eatnumber1

What's missing that prevents this from being merged for 1.3.4? I may be an outlier here, but I absolutely require this feature, and cannot use deluge without it as otherwise deluge will not work.

comment:10 Changed 12 years ago by eatnumber1

  • Cc russ@… added

comment:11 Changed 12 years ago by OmegaPhil

Just something to note:

Disclaimer: Its been a long time since I did this and I cant remember the details:

Ironically libtorrent was already capable of detecting my external IP address - if you run deluge in debug mode and look through the output, there will be an event associated with this discovery. If I knew this originally, I wouldnt have worked on this change.

But obviously that doesnt help when this detection breaks/is wrong for some other reason.

comment:12 Changed 12 years ago by eatnumber1

My situation is different. I have a dual-homed machine (a machine with two internet connections). One connection is really fast but I'm not permitted to transfer large amounts of data. The other is slower, but I'm allowed bulk transfers. As such, the machine's default interface is the fast one which causes deluge to announce the fast one to it's peers.

I had written my own patch which implemented this change to my locally installed copy and setting announce_ip allowed me to cause deluge to use the alternative interface in all cases.

comment:13 in reply to: ↑ 9 Changed 12 years ago by Cas

  • Owner set to Cas
  • Status changed from new to assigned

Replying to eatnumber1:

What's missing that prevents this from being merged for 1.3.4? I may be an outlier here, but I absolutely require this feature, and cannot use deluge without it as otherwise deluge will not work.

This patch alters both core and ui plus relies on libtorrent 0.15 so due to backward compatibility this cannot be put into 1.3.

comment:14 Changed 10 years ago by Cas

  • Summary changed from Add option to specify tracker announce_ip to [lt.sess_set.announce_ip] Add option to specify tracker announce_ip

You can use the lt config plugin to change this setting in meantime.

comment:15 Changed 7 years ago by Cas

  • Milestone changed from 2.0.x to 2.x

Milestone renamed

Note: See TracTickets for help on using tickets.