diff --git a/bridge.py b/bridge.py
index a2340cf..77d0ba3 100755
--- a/bridge.py
+++ b/bridge.py
@@ -222,7 +222,7 @@ def download_config(L_CONFIG_FILE, cli_file):
corrected_config['SYSTEMS'][i]['BOTH_SLOTS'] = iterate_config[i]['BOTH_SLOTS']
corrected_config['SYSTEMS'][i]['TARGET_SOCK'] = (gethostbyname(iterate_config[i]['TARGET_IP']), iterate_config[i]['TARGET_PORT'])
corrected_config['SYSTEMS'][i]['ENCRYPTION_KEY'] = bytes(iterate_config[i]['ENCRYPTION_KEY'], 'utf-8')
- corrected_config['SYSTEMS'][i]['USE_ENCRYPTION'] = iterate_config[i]['USE_ENCRYPTION']
+ corrected_config['SYSTEMS'][i]['ENCRYPT_ALL_TRAFFIC'] = iterate_config[i]['ENCRYPT_ALL_TRAFFIC']
if iterate_config[i]['MODE'] == 'PEER' or iterate_config[i]['MODE'] == 'XLXPEER':
diff --git a/config.py b/config.py
index 6e62b00..d046e5f 100755
--- a/config.py
+++ b/config.py
@@ -308,7 +308,7 @@ def build_config(_config_file):
'SUB_ACL': config.get(section, 'SUB_ACL'),
'TG1_ACL': config.get(section, 'TGID_ACL'),
'TG2_ACL': 'PERMIT:ALL',
- 'USE_ENCRYPTION': config.getboolean(section, 'USE_ENCRYPTION'),
+ 'ENCRYPT_ALL_TRAFFIC': config.getboolean(section, 'ENCRYPT_ALL_TRAFFIC'),
'ENCRYPTION_KEY': bytes(config.get(section, 'ENCRYPTION_KEY'), 'utf-8'),
'OTHER_OPTIONS': config.get(section, 'OTHER_OPTIONS'),
}})
diff --git a/data_gateway-SAMPLE.cfg b/data_gateway-SAMPLE.cfg
index 7155a2d..aac12f6 100644
--- a/data_gateway-SAMPLE.cfg
+++ b/data_gateway-SAMPLE.cfg
@@ -251,7 +251,7 @@ BOTH_SLOTS: True
USE_ACL: True
SUB_ACL: DENY:1
TGID_ACL: PERMIT:ALL
-USE_ENCRYPTION: False
+ENCRYPT_ALL_TRAFFIC: False
ENCRYPTION_KEY:
OTHER_OPTIONS:
diff --git a/data_gateway.py b/data_gateway.py
index 523880e..723386f 100644
--- a/data_gateway.py
+++ b/data_gateway.py
@@ -366,7 +366,7 @@ def download_config(CONFIG_FILE, cli_file):
corrected_config['SYSTEMS'][i]['BOTH_SLOTS'] = iterate_config[i]['BOTH_SLOTS']
corrected_config['SYSTEMS'][i]['TARGET_SOCK'] = (gethostbyname(iterate_config[i]['TARGET_IP']), iterate_config[i]['TARGET_PORT'])
corrected_config['SYSTEMS'][i]['ENCRYPTION_KEY'] = bytes(iterate_config[i]['ENCRYPTION_KEY'], 'utf-8')
- corrected_config['SYSTEMS'][i]['USE_ENCRYPTION'] = iterate_config[i]['USE_ENCRYPTION']
+ corrected_config['SYSTEMS'][i]['ENCRYPT_ALL_TRAFFIC'] = iterate_config[i]['ENCRYPT_ALL_TRAFFIC']
if iterate_config[i]['MODE'] == 'PEER' or iterate_config[i]['MODE'] == 'XLXPEER':
@@ -1702,20 +1702,21 @@ def rule_timer_loop():
del UNIT_MAP[unit]
logger.debug('Removed unit(s) %s from UNIT_MAP', remove_list)
- ping(CONFIG)
- send_unit_table(CONFIG, UNIT_MAP)
- send_que = send_sms_que_req(CONFIG)
- print(UNIT_MAP)
- try:
- for i in send_que:
- try:
- send_sms(False, i['rcv_id'], 9, 9, 'unit', i['msg'])
- except Exception as e:
- logger.info('Error sending SMS in que to ' + str(i['rcv_id']) + ' - ' + i['msg'])
- logger.info(e)
- except Exception as e:
- logger.error('Send que error')
- logger.error(e)
+ if CONFIG['WEB_SERVICE']['REMOTE_CONFIG_ENABLED'] == True:
+ ping(CONFIG)
+ send_unit_table(CONFIG, UNIT_MAP)
+ send_que = send_sms_que_req(CONFIG)
+ print(UNIT_MAP)
+ try:
+ for i in send_que:
+ try:
+ send_sms(False, i['rcv_id'], 9, 9, 'unit', i['msg'])
+ except Exception as e:
+ logger.info('Error sending SMS in que to ' + str(i['rcv_id']) + ' - ' + i['msg'])
+ logger.info(e)
+ except Exception as e:
+ logger.error('Send que error')
+ logger.error(e)
diff --git a/data_gateway_config.py b/data_gateway_config.py
index 3f6d127..1a262d6 100644
--- a/data_gateway_config.py
+++ b/data_gateway_config.py
@@ -338,7 +338,7 @@ def build_config(_config_file):
'SUB_ACL': config.get(section, 'SUB_ACL'),
'TG1_ACL': config.get(section, 'TGID_ACL'),
'TG2_ACL': 'PERMIT:ALL',
- 'USE_ENCRYPTION': config.getboolean(section, 'USE_ENCRYPTION'),
+ 'ENCRYPT_ALL_TRAFFIC': config.getboolean(section, 'ENCRYPT_ALL_TRAFFIC'),
'ENCRYPTION_KEY': bytes(config.get(section, 'ENCRYPTION_KEY'), 'utf-8'),
'OTHER_OPTIONS': config.get(section, 'OTHER_OPTIONS'),
}})
diff --git a/hblink-SAMPLE.cfg b/hblink-SAMPLE.cfg
index 4e160b4..ae50f4c 100755
--- a/hblink-SAMPLE.cfg
+++ b/hblink-SAMPLE.cfg
@@ -162,7 +162,7 @@ SUB_ACL: DENY:1
TGID_ACL: PERMIT:ALL
# Experimental encryption
ENCRYPTION_KEY:
-USE_ENCRYPTION: False
+ENCRYPT_ALL_TRAFFIC: False
# MASTER INSTANCES - DUPLICATE SECTION FOR MULTIPLE MASTERS
# HomeBrew Protocol Master instances go here.
diff --git a/hblink.py b/hblink.py
index 22556dc..41af0b0 100755
--- a/hblink.py
+++ b/hblink.py
@@ -169,7 +169,7 @@ class OPENBRIDGE(DatagramProtocol):
_packet = b''.join([_packet[:11], self._config['NETWORK_ID'], _packet[15:]])
#_packet += hmac_new(self._config['PASSPHRASE'],_packet,sha1).digest()
_packet = b''.join([_packet, (hmac_new(self._config['PASSPHRASE'],_packet,sha1).digest())])
- if self._config['USE_ENCRYPTION'] == True or _packet[:4] == EOBP:
+ if self._config['ENCRYPT_ALL_TRAFFIC'] == True or _packet[:4] == EOBP:
_enc_pkt = encrypt_packet(self._config['ENCRYPTION_KEY'], _packet)
_packet = b'EOBP' + _enc_pkt
self.transport.write(_packet, (self._config['TARGET_IP'], self._config['TARGET_PORT']))
diff --git a/web/app.py b/web/app.py
index 03643ed..97382da 100644
--- a/web/app.py
+++ b/web/app.py
@@ -3848,7 +3848,7 @@ Name: ''' + p.name + ''' - Port: ''' + str(
'SUB_ACL': obp.sub_acl,
'TG1_ACL': obp.tg_acl,
'TG2_ACL': 'PERMIT:ALL',
- 'USE_ENCRYPTION': obp.obp_encryption,
+ 'ENCRYPT_ALL_TRAFFIC': obp.obp_encryption,
'ENCRYPTION_KEY': obp.encryption_key,
'OTHER_OPTIONS': obp.other_options
}})