diff --git a/deluge/ui/web/server.py b/deluge/ui/web/server.py
index 072de51..d09f6b4 100644
a
|
b
|
|
80 | 80 | |
81 | 81 | # Server Settings |
82 | 82 | "base": "/", |
| 83 | "interface": "0.0.0.0", |
83 | 84 | "port": 8112, |
84 | 85 | "https": False, |
85 | 86 | "pkey": "ssl/daemon.pkey", |
… |
… |
def __init__(self):
|
607 | 608 | self.socket = None |
608 | 609 | self.top_level = TopLevel() |
609 | 610 | self.site = server.Site(self.top_level) |
| 611 | self.interface = self.config["interface"] |
610 | 612 | self.port = self.config["port"] |
611 | 613 | self.https = self.config["https"] |
612 | 614 | self.pkey = self.config["pkey"] |
… |
… |
def start(self, start_reactor=True):
|
649 | 651 | reactor.run() |
650 | 652 | |
651 | 653 | def start_normal(self): |
652 | | self.socket = reactor.listenTCP(self.port, self.site) |
653 | | log.info("serving on %s:%s view at http://127.0.0.1:%s", "0.0.0.0", |
654 | | self.port, self.port) |
| 654 | self.socket = reactor.listenTCP(self.port, self.site, |
| 655 | interface=self.interface) |
| 656 | log.info("serving on %s:%s view at http://%s:%s", self.interface, |
| 657 | self.port, self.interface, self.port) |
655 | 658 | |
656 | 659 | def start_ssl(self): |
657 | 660 | check_ssl_keys() |
658 | | self.socket = reactor.listenSSL(self.port, self.site, ServerContextFactory()) |
659 | | log.info("serving on %s:%s view at https://127.0.0.1:%s", "0.0.0.0", |
660 | | self.port, self.port) |
| 661 | self.socket = reactor.listenSSL(self.port, self.site, ServerContextFactory(), |
| 662 | interface=self.interface) |
| 663 | log.info("serving on %s:%s view at https://%s:%s", self.interface, |
| 664 | self.port, self.interface, self.port) |
661 | 665 | |
662 | 666 | def stop(self): |
663 | 667 | log.info("Shutting down webserver") |
diff --git a/deluge/ui/web/web.py b/deluge/ui/web/web.py
index fb440b9..b9ded11 100644
a
|
b
|
def __init__(self):
|
71 | 71 | group.add_option("-g", "--group", dest="group", type="str", |
72 | 72 | help="Group to switch to. Only use it when starting as root", |
73 | 73 | action="store", default=None) |
| 74 | group.add_option("-i", "--interface", dest="interface", |
| 75 | type="str", help="Binds the webserver to a specific IP address", |
| 76 | action="store", default=None) |
74 | 77 | group.add_option("-p", "--port", dest="port", type="int", |
75 | 78 | help="Sets the port to be used for the webserver", |
76 | 79 | action="store", default=None) |
… |
… |
def start(self):
|
135 | 138 | if self.options.base: |
136 | 139 | self.server.base = self.options.base |
137 | 140 | |
| 141 | if self.options.interface: |
| 142 | self.server.interface = self.options.interface |
| 143 | |
138 | 144 | if self.options.port: |
139 | 145 | self.server.port = self.options.port |
140 | 146 | |
diff --git a/docs/man/deluge-web.1 b/docs/man/deluge-web.1
index b3d861c..10eabec 100644
a
|
b
|
Set the base path that the ui is running on (proxying)
|
22 | 22 | .B -f, --fork |
23 | 23 | Fork the web interface process into the background |
24 | 24 | .TP |
| 25 | .B -i INTERFACE, --interface=INTERFACE |
| 26 | Binds the webserver to a specific IP address |
| 27 | .TP |
25 | 28 | .B -p PORT, --port=PORT |
26 | 29 | Sets the port to be used for the webserver |
27 | 30 | .TP |