mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-06-03 10:50:20 +00:00
transmission: Show port forwarding information
Using the firewalld service configuration provided by the Debian package. Fixes #1868 Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
parent
566a1bd243
commit
6b2656e8f3
@ -19,7 +19,7 @@ from plinth.modules.users.components import UsersAndGroups
|
||||
|
||||
from . import manifest
|
||||
|
||||
version = 3
|
||||
version = 4
|
||||
|
||||
managed_services = ['transmission-daemon']
|
||||
|
||||
@ -70,15 +70,21 @@ class TransmissionApp(app_module.App):
|
||||
self.add(shortcut)
|
||||
|
||||
firewall = Firewall('firewall-transmission', info.name,
|
||||
ports=['http', 'https'], is_external=True)
|
||||
ports=['http', 'https',
|
||||
'transmission-client'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
webserver = Webserver('webserver-transmission', 'transmission-plinth',
|
||||
urls=['https://{host}/transmission'])
|
||||
self.add(webserver)
|
||||
|
||||
daemon = Daemon('daemon-transmission', managed_services[0],
|
||||
listen_ports=[(9091, 'tcp4')])
|
||||
daemon = Daemon(
|
||||
'daemon-transmission', managed_services[0], listen_ports=[
|
||||
(9091, 'tcp4'),
|
||||
(51413, 'tcp4'),
|
||||
(51413, 'tcp6'),
|
||||
(51413, 'udp4'),
|
||||
])
|
||||
self.add(daemon)
|
||||
|
||||
users_and_groups = UsersAndGroups('users-and-groups-transmission',
|
||||
@ -95,6 +101,9 @@ def setup(helper, old_version=None):
|
||||
"""Install and configure the module."""
|
||||
helper.install(managed_packages)
|
||||
|
||||
if old_version and old_version <= 3 and app.is_enabled():
|
||||
app.get_component('firewall-transmission').enable()
|
||||
|
||||
new_configuration = {
|
||||
'rpc-whitelist-enabled': False,
|
||||
'rpc-authentication-required': False
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user