Skip to content

Commit

Permalink
Add hash to server
Browse files Browse the repository at this point in the history
  • Loading branch information
zachhuff386 committed Oct 23, 2015
1 parent 06a17dc commit 6ac1fbe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions pritunl/server/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ def generate_ovpn_conf(self):
self.server.ping_interval,
self.server.ping_timeout,
CIPHERS[self.server.cipher],
HASHES[self.server.hash],
4 if self.server.debug else 1,
8 if self.server.debug else 3,
)
Expand Down
1 change: 1 addition & 0 deletions pritunl/server/instance_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def generate_client_conf(self):
self.linked_server.protocol,
remotes,
CIPHERS[self.server.cipher],
HASHES[self.server.hash],
4 if self.server.debug else 1,
8 if self.server.debug else 3,
self.linked_server.ping_interval,
Expand Down
8 changes: 7 additions & 1 deletion pritunl/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
'search_domain',
'otp_auth',
'cipher',
'hash',
'jumbo_frames',
'lzo_compression',
'inter_client',
Expand Down Expand Up @@ -90,6 +91,7 @@ class Server(mongo.MongoObject):
'ping_timeout',
'debug',
'cipher',
'hash',
'jumbo_frames',
'organizations',
'hosts',
Expand Down Expand Up @@ -119,6 +121,7 @@ class Server(mongo.MongoObject):
'ping_timeout': 60,
'debug': False,
'cipher': 'aes256',
'hash': 'sha1',
'jumbo_frames': False,
'organizations': [],
'hosts': [],
Expand All @@ -136,7 +139,7 @@ def __init__(self, name=None, network=None, network_mode=None,
ipv6_firewall=None,bind_address=None, port=None, protocol=None,
dh_param_bits=None, mode=None, multi_device=None,
local_networks=None, dns_servers=None, search_domain=None,
otp_auth=None, cipher=None, jumbo_frames=None,
otp_auth=None, cipher=None, hash=None, jumbo_frames=None,
lzo_compression=None, inter_client=None, ping_interval=None,
ping_timeout=None, max_clients=None, replica_count=None,
debug=None, **kwargs):
Expand Down Expand Up @@ -186,6 +189,8 @@ def __init__(self, name=None, network=None, network_mode=None,
self.otp_auth = otp_auth
if cipher is not None:
self.cipher = cipher
if hash is not None:
self.hash = hash
if jumbo_frames is not None:
self.jumbo_frames = jumbo_frames
if lzo_compression is not None:
Expand Down Expand Up @@ -253,6 +258,7 @@ def dict(self):
'search_domain': self.search_domain,
'otp_auth': True if self.otp_auth else False,
'cipher': self.cipher,
'hash': self.hash,
'jumbo_frames': self.jumbo_frames,
'lzo_compression': self.lzo_compression,
'inter_client': True if self.inter_client else False,
Expand Down

0 comments on commit 6ac1fbe

Please sign in to comment.