rev245, Fix for gevent1.0.2 ssl, Disable asnyc js load (its slower on my browser)
This commit is contained in:
parent
823508f261
commit
d908a3a456
4 changed files with 12 additions and 7 deletions
|
@ -4,7 +4,7 @@ import ConfigParser
|
|||
class Config(object):
|
||||
def __init__(self):
|
||||
self.version = "0.3.1"
|
||||
self.rev = 242
|
||||
self.rev = 245
|
||||
self.parser = self.createArguments()
|
||||
argv = sys.argv[:] # Copy command line arguments
|
||||
argv = self.parseConfig(argv) # Add arguments from config file
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
import sys, logging, os
|
||||
import sys
|
||||
import logging
|
||||
import os
|
||||
import ssl
|
||||
|
||||
from Config import config
|
||||
import gevent
|
||||
from util import SslPatch
|
||||
|
||||
|
||||
class CryptConnectionManager:
|
||||
def __init__(self):
|
||||
# OpenSSL params
|
||||
|
@ -30,9 +35,9 @@ class CryptConnectionManager:
|
|||
if crypt == "tls-rsa":
|
||||
ciphers = "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:AES128-GCM-SHA256:AES128-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DSS:!DES:!RC4:!3DES:!MD5:!PSK"
|
||||
if server:
|
||||
return gevent.ssl.wrap_socket(sock, server_side=server, keyfile='%s/key-rsa.pem' % config.data_dir, certfile='%s/cert-rsa.pem' % config.data_dir, ciphers=ciphers)
|
||||
return ssl.wrap_socket(sock, server_side=server, keyfile='%s/key-rsa.pem' % config.data_dir, certfile='%s/cert-rsa.pem' % config.data_dir, ciphers=ciphers)
|
||||
else:
|
||||
return gevent.ssl.wrap_socket(sock, ciphers=ciphers)
|
||||
return ssl.wrap_socket(sock, ciphers=ciphers)
|
||||
else:
|
||||
return sock
|
||||
|
||||
|
@ -43,7 +48,7 @@ class CryptConnectionManager:
|
|||
if os.path.isfile(file_path): os.unlink(file_path)
|
||||
|
||||
|
||||
# Loand and create cert files is necessary
|
||||
# Load and create cert files is necessary
|
||||
def loadCerts(self):
|
||||
if config.disable_encryption: return False
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ permissions = {permissions}
|
|||
show_loadingscreen = {show_loadingscreen}
|
||||
server_url = '{server_url}'
|
||||
</script>
|
||||
<script type="text/javascript" src="{server_url}/uimedia/all.js?rev={rev}" async></script>
|
||||
<script type="text/javascript" src="{server_url}/uimedia/all.js?rev={rev}"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -54,7 +54,7 @@ if config.debug:
|
|||
else:
|
||||
console_log.setLevel(logging.INFO) # Display only important info to console
|
||||
|
||||
monkey.patch_all(thread=False, ssl=False) # Make time, socket gevent compatible. Not thread: pyfilesystem and system tray icon not compatible, Not ssl: broken in 2.7.9
|
||||
monkey.patch_all(thread=False) # Make time, socket gevent compatible. Not thread: pyfilesystem and system tray icon not compatible
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue