Ticket #1908: 0001-modified-deluge-ui-web-server.py.patch

File 0001-modified-deluge-ui-web-server.py.patch, 2.0 KB (added by friedrichg2, 13 years ago)

patch for server.py

  • deluge/ui/web/server.py

    From c0c7cbcdc947b4ec1adfb644aa1ea69d6e9145de Mon Sep 17 00:00:00 2001
    From: Friedrich Gonzalez <friedrichg@gmail.com>
    Date: Mon, 1 Aug 2011 23:02:24 +0200
    Subject: [PATCH] 	modified:   deluge/ui/web/server.py
    
    	0001-modified-deluge-ui-web-server.py.patch
    ---
     deluge/ui/web/server.py |   14 ++++++++------
     1 files changed, 8 insertions(+), 6 deletions(-)
    
    diff --git a/deluge/ui/web/server.py b/deluge/ui/web/server.py
    index 072de51..af3899e 100644
    a b  
    8080
    8181    # Server Settings
    8282    "base": "/",
     83    "interface": "0.0.0.0",
    8384    "port": 8112,
    8485    "https": False,
    8586    "pkey": "ssl/daemon.pkey",
    def __init__(self):  
    607608        self.socket = None
    608609        self.top_level = TopLevel()
    609610        self.site = server.Site(self.top_level)
     611        self.interface = self.config["interface"]
    610612        self.port = self.config["port"]
    611613        self.https = self.config["https"]
    612614        self.pkey = self.config["pkey"]
    def start(self, start_reactor=True):  
    649651            reactor.run()
    650652
    651653    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, interface=self.interface)
     655        log.info("serving on %s:%s view at http://%s:%s", self.interface,
     656                 self.port, self.interface, self.port)
    655657
    656658    def start_ssl(self):
    657659        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)
     660        self.socket = reactor.listenSSL(self.port, self.site, ServerContextFactory(), interface=self.interface)
     661        log.info("serving on %s:%s view at https://%s:%s", self.interface,
     662                 self.port, self.interface, self.port)
    661663
    662664    def stop(self):
    663665        log.info("Shutting down webserver")