parent
c3a02e5291
commit
8a48ec0126
|
@ -102,6 +102,7 @@ CONFIG_DEFAULTS = {
|
|||
|
||||
# Server Settings
|
||||
"base": "/",
|
||||
"interface": "0.0.0.0",
|
||||
"port": 8112,
|
||||
"https": False,
|
||||
"pkey": "ssl/daemon.pkey",
|
||||
|
@ -665,9 +666,8 @@ class DelugeWeb(component.Component):
|
|||
reactor.run()
|
||||
|
||||
def start_normal(self):
|
||||
self.socket = reactor.listenTCP(self.port, self.site)
|
||||
log.info("serving on %s:%s view at http://127.0.0.1:%s", "0.0.0.0",
|
||||
self.port, self.port)
|
||||
self.socket = reactor.listenTCP(self.port, self.site, interface=self.interface)
|
||||
log.info("Serving on %s:%s view at http://%s:%s", self.interface, self.port, self.interface, self.port)
|
||||
|
||||
def start_ssl(self):
|
||||
log.debug("Enabling SSL with PKey: %s, Cert: %s", self.pkey, self.cert)
|
||||
|
@ -680,8 +680,8 @@ class DelugeWeb(component.Component):
|
|||
options = CertificateOptions(privateKey=private_key, certificate=certificate, method=SSL.SSLv23_METHOD)
|
||||
options.getContext().set_options(SSL.OP_NO_SSLv2 | SSL.OP_NO_SSLv3)
|
||||
|
||||
self.socket = reactor.listenSSL(self.port, self.site, options)
|
||||
log.info("Serving on %s:%s view at https://127.0.0.1:%s", "0.0.0.0", self.port, self.port)
|
||||
self.socket = reactor.listenSSL(self.port, self.site, options, interface=self.interface)
|
||||
log.info("Serving on %s:%s view at https://%s:%s", self.interface, self.port, self.interface, self.port)
|
||||
|
||||
def stop(self):
|
||||
log.info("Shutting down webserver")
|
||||
|
|
|
@ -59,6 +59,9 @@ class Web(_UI):
|
|||
group.add_option("-f", "--fork", dest="fork",
|
||||
help="Fork the web interface process into the background",
|
||||
action="store_true", default=False)
|
||||
group.add_option("-i", "--interface", dest="interface", type="str",
|
||||
help="Binds the webserver to a specific IP address",
|
||||
action="store", default=None)
|
||||
group.add_option("-p", "--port", dest="port", type="int",
|
||||
help="Sets the port to be used for the webserver",
|
||||
action="store", default=None)
|
||||
|
@ -110,6 +113,9 @@ class Web(_UI):
|
|||
if self.options.base:
|
||||
self.server.base = self.options.base
|
||||
|
||||
if self.options.interface:
|
||||
self.server.interface = self.options.interface
|
||||
|
||||
if self.options.port:
|
||||
self.server.port = self.options.port
|
||||
|
||||
|
|
|
@ -25,6 +25,9 @@ Set the base path that the web ui is running on (proxying)
|
|||
.B -f, --fork
|
||||
Fork the web interface process into the background
|
||||
.TP
|
||||
.BI -i\ ip_address \fR,\ \fB--interface= ip_address
|
||||
Binds the webserver to a specific IP address
|
||||
.TP
|
||||
.BI -p\ port \fR,\ \fB--port= port
|
||||
Sets the port to be used for the webserver
|
||||
.TP
|
||||
|
|
Loading…
Reference in New Issue