def create_proxy_zip(proxy_string, proxy_user, proxy_pass):
proxy_host = proxy_string.split('<STR_LIT::>')[<NUM_LIT:0>]<EOL>proxy_port = proxy_string.split('<STR_LIT::>')[<NUM_LIT:1>]<EOL>background_js = (<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>"""<EOL>"""<STR_LIT>""" % (proxy_host, proxy_port, proxy_user, proxy_pass))<EOL>manifest_json = (<EOL>'''<STR_LIT>'''<EOL>'''<STR_LIT>'''<EOL>'''<STR_LIT>'''<EOL>'''<STR_LIT>'''<EOL>'''<STR_LIT>'''<EOL>'''<STR_LIT>'''<EOL>'''<STR_LIT>'''<EOL>'''<STR_LIT>'''<EOL>'''<STR_LIT>'''<EOL>'''<STR_LIT>'''<EOL>'''<STR_LIT>'''<EOL>'''<STR_LIT>'''<EOL>'''<STR_LIT>'''<EOL>'''<STR_LIT>'''<EOL>'''<STR_LIT>'''<EOL>'''<STR_LIT>'''<EOL>'''<STR_LIT>'''<EOL>'''<STR_LIT:}>''')<EOL>lock = threading.RLock()  <EOL>with lock:<EOL><INDENT>try:<EOL><INDENT>zf = zipfile.ZipFile(PROXY_ZIP_PATH, mode='<STR_LIT:w>')<EOL><DEDENT>except IOError:<EOL><INDENT>abs_path = os.path.abspath('<STR_LIT:.>')<EOL>downloads_path = os.path.join(abs_path, DOWNLOADS_DIR)<EOL>if not os.path.exists(downloads_path):<EOL><INDENT>os.mkdir(downloads_path)<EOL><DEDENT>zf = zipfile.ZipFile(PROXY_ZIP_PATH_2, mode='<STR_LIT:w>')<EOL><DEDENT>zf.writestr("<STR_LIT>", background_js)<EOL>zf.writestr("<STR_LIT>", manifest_json)<EOL>zf.close()<EOL><DEDENT>
Implementation of https://stackoverflow.com/a/35293284 for
        https://stackoverflow.com/questions/12848327/
        (Run Selenium on a proxy server that requires authentication.)
        Solution involves creating & adding a Chrome extension on the fly.
        * CHROME-ONLY for now! *