mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
Implement #79 ability to change outgoing port range
This commit is contained in:
parent
e93e1391a4
commit
efb4462d37
4 changed files with 628 additions and 520 deletions
39
ChangeLog
39
ChangeLog
|
@ -1,41 +1,4 @@
|
||||||
Deluge 1.1.0 - "" (In Development)
|
Deluge 1.1.0 - "" (In Development)
|
||||||
|
|
||||||
Deluge 0.9.04 - "1.0.0_RC4" (In Development)
|
|
||||||
|
|
||||||
Deluge 0.9.03 - "1.0.0_RC3" (21 July 2008)
|
|
||||||
Core:
|
Core:
|
||||||
* File progress fixes from libtorrent
|
* Implement #79 ability to change outgoing port range
|
||||||
* Fix building on FreeBSD
|
|
||||||
* Fix #350 stop seeds when stop ratio is reached
|
|
||||||
* Fix #358 properly emit torrent_removed signal when remove_at_ratio happens
|
|
||||||
|
|
||||||
UI:
|
|
||||||
* Default to gtkui when running 'deluge' instead of defaulting to last used.
|
|
||||||
|
|
||||||
GtkUI:
|
|
||||||
* Fix open folder
|
|
||||||
* Fix #349 tab ordering when hiding/showing
|
|
||||||
|
|
||||||
Windows:
|
|
||||||
* Fix torrent file association and adding files from command line
|
|
||||||
|
|
||||||
Plugins:
|
|
||||||
* Blocklist plugin has been rewritten
|
|
||||||
|
|
||||||
Misc:
|
|
||||||
* Some changes for python 2.6 compatibility
|
|
||||||
|
|
||||||
Deluge 0.9.02 - "1.0.0_RC2" (15 July 2008)
|
|
||||||
Core:
|
|
||||||
* Fix displaying of file progress
|
|
||||||
* Fix files to have proper read/write permissions
|
|
||||||
|
|
||||||
WebUI:
|
|
||||||
* Include missing 'classic' template
|
|
||||||
* Update options tab to include queue settings
|
|
||||||
|
|
||||||
Windows:
|
|
||||||
* Fix displaying of tray icon
|
|
||||||
* Fix scrolling of tray menu
|
|
||||||
* Fix hiding of tray icon when shutting down
|
|
||||||
* Fix tray icon tool tip length to show properly
|
|
||||||
|
|
|
@ -116,6 +116,8 @@ DEFAULT_PREFS = {
|
||||||
"proxy_username" : "",
|
"proxy_username" : "",
|
||||||
"proxy_password" : "",
|
"proxy_password" : "",
|
||||||
"proxy_port": 8080,
|
"proxy_port": 8080,
|
||||||
|
"outgoing_ports": [0, 0],
|
||||||
|
"random_outgoing_ports": True
|
||||||
}
|
}
|
||||||
|
|
||||||
class Core(
|
class Core(
|
||||||
|
@ -233,6 +235,10 @@ class Core(
|
||||||
self._on_set_listen_ports)
|
self._on_set_listen_ports)
|
||||||
self.config.register_set_function("random_port",
|
self.config.register_set_function("random_port",
|
||||||
self._on_set_random_port)
|
self._on_set_random_port)
|
||||||
|
self.config.register_set_function("outgoing_ports",
|
||||||
|
self._on_set_outgoing_ports)
|
||||||
|
self.config.register_set_function("random_outgoing_ports",
|
||||||
|
self._on_set_random_outgoing_ports)
|
||||||
self.config.register_set_function("dht", self._on_set_dht)
|
self.config.register_set_function("dht", self._on_set_dht)
|
||||||
self.config.register_set_function("upnp", self._on_set_upnp)
|
self.config.register_set_function("upnp", self._on_set_upnp)
|
||||||
self.config.register_set_function("natpmp", self._on_set_natpmp)
|
self.config.register_set_function("natpmp", self._on_set_natpmp)
|
||||||
|
@ -758,6 +764,15 @@ class Core(
|
||||||
listen_ports[1])
|
listen_ports[1])
|
||||||
self.session.listen_on(listen_ports[0], listen_ports[1])
|
self.session.listen_on(listen_ports[0], listen_ports[1])
|
||||||
|
|
||||||
|
def _on_set_outgoing_ports(self, key, value):
|
||||||
|
if not self.config["random_outgoing_ports"]:
|
||||||
|
log.debug("outgoing port range set to %s-%s", value[0], value[1])
|
||||||
|
self.session.outgoing_ports(value[0], value[1])
|
||||||
|
|
||||||
|
def _on_set_random_outgoing_ports(self, key, value):
|
||||||
|
if value:
|
||||||
|
self.session.outgoing_ports(0, 0)
|
||||||
|
|
||||||
def _on_set_dht(self, key, value):
|
def _on_set_dht(self, key, value):
|
||||||
log.debug("dht value set to %s", value)
|
log.debug("dht value set to %s", value)
|
||||||
state_file = deluge.common.get_default_config_dir('dht.state')
|
state_file = deluge.common.get_default_config_dir('dht.state')
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -147,7 +147,7 @@ class Preferences(component.Component):
|
||||||
self.page_num_to_remove = model.get_value(iter, 0)
|
self.page_num_to_remove = model.get_value(iter, 0)
|
||||||
self.iter_to_remove = iter
|
self.iter_to_remove = iter
|
||||||
return
|
return
|
||||||
|
|
||||||
self.liststore.foreach(check_row, name)
|
self.liststore.foreach(check_row, name)
|
||||||
# Remove the page and row
|
# Remove the page and row
|
||||||
if self.page_num_to_remove != None:
|
if self.page_num_to_remove != None:
|
||||||
|
@ -214,6 +214,9 @@ class Preferences(component.Component):
|
||||||
"spin_port_max": ("value", self.core_config["listen_ports"][1]),
|
"spin_port_max": ("value", self.core_config["listen_ports"][1]),
|
||||||
"active_port_label": ("text", str(self.active_port)),
|
"active_port_label": ("text", str(self.active_port)),
|
||||||
"chk_random_port": ("active", self.core_config["random_port"]),
|
"chk_random_port": ("active", self.core_config["random_port"]),
|
||||||
|
"spin_outgoing_port_min": ("value", self.core_config["outgoing_ports"][0]),
|
||||||
|
"spin_outgoing_port_max": ("value", self.core_config["outgoing_ports"][1]),
|
||||||
|
"chk_random_outgoing_ports": ("active", self.core_config["random_outgoing_ports"]),
|
||||||
"chk_dht": ("active", self.core_config["dht"]),
|
"chk_dht": ("active", self.core_config["dht"]),
|
||||||
"chk_upnp": ("active", self.core_config["upnp"]),
|
"chk_upnp": ("active", self.core_config["upnp"]),
|
||||||
"chk_natpmp": ("active", self.core_config["natpmp"]),
|
"chk_natpmp": ("active", self.core_config["natpmp"]),
|
||||||
|
@ -346,6 +349,9 @@ class Preferences(component.Component):
|
||||||
"spin_port_max",
|
"spin_port_max",
|
||||||
"active_port_label",
|
"active_port_label",
|
||||||
"chk_random_port",
|
"chk_random_port",
|
||||||
|
"spin_outgoing_port_min",
|
||||||
|
"spin_outgoing_port_max",
|
||||||
|
"chk_random_outgoing_ports",
|
||||||
"chk_dht",
|
"chk_dht",
|
||||||
"chk_upnp",
|
"chk_upnp",
|
||||||
"chk_natpmp",
|
"chk_natpmp",
|
||||||
|
@ -520,6 +526,15 @@ class Preferences(component.Component):
|
||||||
new_core_config["listen_ports"] = listen_ports
|
new_core_config["listen_ports"] = listen_ports
|
||||||
new_core_config["random_port"] = \
|
new_core_config["random_port"] = \
|
||||||
self.glade.get_widget("chk_random_port").get_active()
|
self.glade.get_widget("chk_random_port").get_active()
|
||||||
|
outgoing_ports = []
|
||||||
|
outgoing_ports.append(
|
||||||
|
self.glade.get_widget("spin_outgoing_port_min").get_value_as_int())
|
||||||
|
outgoing_ports.append(
|
||||||
|
self.glade.get_widget("spin_outgoing_port_max").get_value_as_int())
|
||||||
|
new_core_config["outgoing_ports"] = outgoing_ports
|
||||||
|
new_core_config["random_outgoing_ports"] = \
|
||||||
|
self.glade.get_widget("chk_random_outgoing_ports").get_active()
|
||||||
|
|
||||||
new_core_config["dht"] = self.glade.get_widget("chk_dht").get_active()
|
new_core_config["dht"] = self.glade.get_widget("chk_dht").get_active()
|
||||||
new_core_config["upnp"] = self.glade.get_widget("chk_upnp").get_active()
|
new_core_config["upnp"] = self.glade.get_widget("chk_upnp").get_active()
|
||||||
new_core_config["natpmp"] = \
|
new_core_config["natpmp"] = \
|
||||||
|
@ -705,6 +720,8 @@ class Preferences(component.Component):
|
||||||
"chk_show_dialog": {"chk_focus_dialog": True},
|
"chk_show_dialog": {"chk_focus_dialog": True},
|
||||||
"chk_random_port": {"spin_port_min": False,
|
"chk_random_port": {"spin_port_min": False,
|
||||||
"spin_port_max": False},
|
"spin_port_max": False},
|
||||||
|
"chk_random_outgoing_ports": {"spin_port_outgoing_min": False,
|
||||||
|
"spin_port_outgoing_max": False},
|
||||||
"chk_use_tray": {"chk_min_on_close": True,
|
"chk_use_tray": {"chk_min_on_close": True,
|
||||||
"chk_start_in_tray": True,
|
"chk_start_in_tray": True,
|
||||||
"chk_lock_tray": True},
|
"chk_lock_tray": True},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue