diff --git a/Scripts/update_server.py b/Scripts/update_server.py --- a/Scripts/update_server.py +++ b/Scripts/update_server.py @@ -8,8 +8,9 @@ import requests from ast import literal_eval OBFS_REGEX = re.compile(r'^ServerTransportPlugin (obfs\d+|scramblesuit)') - FTEPROXY_REGEX = re.compile(r'^ServerTransportPlugin fte') +FLASHPROXY_REGEX = re.compile(r'^ServerTransportPlugin webproxy') +MEEKPROXY_REGEX = re.compile(r'^ServerTransportPlugin meek') IP_REGEX = re.compile(r'^(OutboundBindAddress)\ (\d{1,3}\.\d{1,3}\.\d{1,3}\.' r'\d{1,3})') @@ -71,6 +72,16 @@ def get_fte_proxy(tor_config): return any(FTEPROXY_REGEX.match(i) for i in tor_config) +def get_flash_proxy(tor_config): + + return any(FLASHPROXY_REGEX.match(i) for i in tor_config) + + +def get_meek_proxy(tor_config): + + return any(MEEKPROXY_REGEX.match(i) for i in tor_config) + + def get_ip(tor_config): for i in tor_config: @@ -100,10 +111,14 @@ def create_server_json(tor_configfile='/ obfs = None fte = None + flash = None + meek = None if server_type == 'Bridge': obfs = get_obfs_proxy(tor_config) fte = get_fte_proxy(tor_config) + flash = get_flash_proxy(tor_config) + meek = get_meek_proxy(tor_config) dictionary = {'server_type': server_type, 'server_name': hostname, 'tor_status': tor_status, 'fingerprint': fingerprint} @@ -117,6 +132,12 @@ def create_server_json(tor_configfile='/ if fte is not None: dictionary['fteproxy'] = fte + if flash is not None: + dictionary['flashproxy'] = flash + + if meek is not None: + dictionary['meek'] = meek + return dictionary