diff --git a/full_bridge.py b/full_bridge.py index 2eb06cb..e18cc16 100644 --- a/full_bridge.py +++ b/full_bridge.py @@ -2885,7 +2885,7 @@ if __name__ == '__main__': proxy_master_list.append(i) # Start proxy as a thread (if enabled in config) for each set of MASTERs for m in proxy_master_list: - if CONFIG['SYSTEMS'][m]['EXTERNAL_PROXY_SCRIPT'] == True: + if CONFIG['SYSTEMS'][m]['EXTERNAL_PROXY_SCRIPT'] == False: proxy_thread = threading.Thread(target=hotspot_proxy, args=(CONFIG['SYSTEMS'][m]['EXTERNAL_PORT'],CONFIG['SYSTEMS'][m]['INTERNAL_PORT_START'],CONFIG['SYSTEMS'][m]['INTERNAL_PORT_STOP'],)) proxy_thread.daemon = True proxy_thread.start() diff --git a/rules_full_bridge-SAMPLE.py b/rules_full_bridge-SAMPLE.py index 03a8406..8aa7626 100755 --- a/rules_full_bridge-SAMPLE.py +++ b/rules_full_bridge-SAMPLE.py @@ -135,22 +135,22 @@ def build_bridges(): proxy_list = [] unique = str('_' + str(random.randint(100, 999))) for i in CONFIG['SYSTEMS']: + print(CONFIG['SYSTEMS'][i]) if CONFIG['SYSTEMS'][i]['ENABLED'] == True: if CONFIG['SYSTEMS'][i]['MODE'] == 'PROXY': proxy_list.append(i + unique) - - for b in BRIDGES_TEMPLATE: - for s in BRIDGES_TEMPLATE[b]: - if s['SYSTEM'] + unique in proxy_list: - n_systems = CONFIG['SYSTEMS'][i]['INTERNAL_PORT_STOP'] - CONFIG['SYSTEMS'][i]['INTERNAL_PORT_START'] - n_count = 0 - while n_count < n_systems: - built_bridge[b].append({'SYSTEM': s['SYSTEM'] + '-' + str(n_count), 'TS': s['TS'], 'TGID': s['TGID'], 'ACTIVE': s['ACTIVE'], 'TIMEOUT': s['TIMEOUT'], 'TO_TYPE': s['TO_TYPE'], 'ON': s['ON'], 'OFF': s['OFF'], 'RESET': s['RESET']}) - n_count = n_count + 1 - built_bridge[b].remove(s) + for p in proxy_list: + for b in BRIDGES_TEMPLATE: + for s in BRIDGES_TEMPLATE[b]: + print(s) + if s['SYSTEM'] + unique in proxy_list: + n_systems = CONFIG['SYSTEMS'][i]['INTERNAL_PORT_STOP'] - CONFIG['SYSTEMS'][i]['INTERNAL_PORT_START'] + n_count = 0 + while n_count < n_systems: + built_bridge[b].append({'SYSTEM': s['SYSTEM'] + '-' + str(n_count), 'TS': s['TS'], 'TGID': s['TGID'], 'ACTIVE': s['ACTIVE'], 'TIMEOUT': s['TIMEOUT'], 'TO_TYPE': s['TO_TYPE'], 'ON': s['ON'], 'OFF': s['OFF'], 'RESET': s['RESET']}) + n_count = n_count + 1 + built_bridge[b].remove(s) return built_bridge - -BRIDGES = build_bridges() ############################################################################################################33 '''