mirror of
https://github.com/JohnDoee/deluge-streaming/
synced 2026-07-01 07:31:17 -07:00
Merge branch 'release/0.12.2'
This commit is contained in:
@@ -107,7 +107,11 @@ List of URL GET Arguments
|
|||||||
|
|
||||||
# Version Info
|
# Version Info
|
||||||
|
|
||||||
## Version 0.12.0
|
## Version 0.12.2
|
||||||
|
|
||||||
|
* Added support for TLS 1.2
|
||||||
|
|
||||||
|
## Version 0.12.1
|
||||||
|
|
||||||
* Fixed small breaking bug
|
* Fixed small breaking bug
|
||||||
|
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -42,7 +42,7 @@ from setuptools import setup, find_packages
|
|||||||
__plugin_name__ = "Streaming"
|
__plugin_name__ = "Streaming"
|
||||||
__author__ = "Anders Jensen"
|
__author__ = "Anders Jensen"
|
||||||
__author_email__ = "johndoee@tridentstream.org"
|
__author_email__ = "johndoee@tridentstream.org"
|
||||||
__version__ = "0.12.1"
|
__version__ = "0.12.2"
|
||||||
__url__ = "https://github.com/JohnDoee/deluge-streaming"
|
__url__ = "https://github.com/JohnDoee/deluge-streaming"
|
||||||
__license__ = "GPLv3"
|
__license__ = "GPLv3"
|
||||||
__description__ = "Enables streaming of files while downloading them."
|
__description__ = "Enables streaming of files while downloading them."
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ from deluge._libtorrent import lt
|
|||||||
from deluge.core.rpcserver import export
|
from deluge.core.rpcserver import export
|
||||||
from deluge.plugins.pluginbase import CorePluginBase
|
from deluge.plugins.pluginbase import CorePluginBase
|
||||||
|
|
||||||
from twisted.internet import reactor, defer, task
|
from twisted.internet import reactor, defer, task, error
|
||||||
from twisted.web import server, client
|
from twisted.web import server, client
|
||||||
from twisted.web.resource import Resource as TwistedResource
|
from twisted.web.resource import Resource as TwistedResource
|
||||||
|
|
||||||
@@ -620,9 +620,11 @@ class ServerContextFactory(object):
|
|||||||
def getContext(self):
|
def getContext(self):
|
||||||
from OpenSSL import SSL
|
from OpenSSL import SSL
|
||||||
|
|
||||||
method = getattr(SSL, 'TLSv1_1_METHOD', None)
|
methods_names = ['TLSv1_2_METHOD', 'TLSv1_1_METHOD', 'SSLv23_METHOD']
|
||||||
if method is None:
|
for method_name in methods_names:
|
||||||
method = getattr(SSL, 'SSLv23_METHOD', None)
|
method = getattr(SSL, method_name, None)
|
||||||
|
if method is not None:
|
||||||
|
break
|
||||||
|
|
||||||
ctx = SSL.Context(method)
|
ctx = SSL.Context(method)
|
||||||
ctx.use_certificate_file(self._cert_file)
|
ctx.use_certificate_file(self._cert_file)
|
||||||
@@ -743,13 +745,19 @@ class Core(CorePluginBase):
|
|||||||
try:
|
try:
|
||||||
self.listening = reactor.listenSSL(self.config['port'], self.site, context, interface=self.config['ip'])
|
self.listening = reactor.listenSSL(self.config['port'], self.site, context, interface=self.config['ip'])
|
||||||
except:
|
except:
|
||||||
self.listening = reactor.listenSSL(self.config['port'], self.site, context, interface='0.0.0.0')
|
try:
|
||||||
|
self.listening = reactor.listenSSL(self.config['port'], self.site, context, interface='0.0.0.0')
|
||||||
|
except error.CannotListenError:
|
||||||
|
logger.warning("Unable to listen to anything")
|
||||||
self.base_url += 's'
|
self.base_url += 's'
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
self.listening = reactor.listenTCP(self.config['port'], self.site, interface=self.config['ip'])
|
self.listening = reactor.listenTCP(self.config['port'], self.site, interface=self.config['ip'])
|
||||||
except:
|
except:
|
||||||
self.listening = reactor.listenTCP(self.config['port'], self.site, interface='0.0.0.0')
|
try:
|
||||||
|
self.listening = reactor.listenTCP(self.config['port'], self.site, interface='0.0.0.0')
|
||||||
|
except error.CannotListenError:
|
||||||
|
logger.warning("Unable to listen to anything")
|
||||||
|
|
||||||
port = self.config['port']
|
port = self.config['port']
|
||||||
ip = self.config['ip']
|
ip = self.config['ip']
|
||||||
@@ -820,9 +828,6 @@ class Core(CorePluginBase):
|
|||||||
plugin_manager = component.get("CorePluginManager")
|
plugin_manager = component.get("CorePluginManager")
|
||||||
return 'WebUi' in plugin_manager.get_enabled_plugins()
|
return 'WebUi' in plugin_manager.get_enabled_plugins()
|
||||||
|
|
||||||
def check_config(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
@export
|
@export
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def set_config(self, config):
|
def set_config(self, config):
|
||||||
|
|||||||
Reference in New Issue
Block a user