Fixed sintax errors. Added a new option to set the proxy type

This commit is contained in:
Jose Manuel Delicado
2017-01-16 14:11:54 +01:00
parent 8a701c450e
commit b7dd6d43fe
4 changed files with 18 additions and 7 deletions

View File

@@ -19,12 +19,12 @@ def patched_session_init(self):
self.proxies={"http":"http://{0}:{1}/".format(config.app["proxy"]["server"], config.app["proxy"]["port"]),
"https": "https://{0}:{1}/".format(config.app["proxy"]["server"], config.app["proxy"]["port"]),
"http": "socks5://{0}:{1}/".format(config.app["proxy"]["server"], config.app["proxy"]["port"]),
"https": "socks5://{0}:{1}/".format(config.app["proxy"]["server"], config.app["proxy"]["port"])
"https": "socks5://{0}:{1}/".format(config.app["proxy"]["server"], config.app["proxy"]["port"]),
"http": "socks4://{0}:{1}/".format(config.app["proxy"]["server"], config.app["proxy"]["port"]),
"https": "socks4://{0}:{1}/".format(config.app["proxy"]["server"], config.app["proxy"]["port"])}
if config.app["proxy"]["user"] != "" and config.app["proxy"]["password"] != "":
self.proxies={"http": "http://{0}:{1}@{2}:{3}/".format(config.app["proxy"]["user"], config.app["proxy"]["password"], config.app["proxy"]["server"], config.app["proxy"]["port"]),
"https": "https://{0}:{1}@{2}:{3}/".format(config.app["proxy"]["user"], config.app["proxy"]["password"], config.app["proxy"]["server"], config.app["proxy"]["port"])
"https": "https://{0}:{1}@{2}:{3}/".format(config.app["proxy"]["user"], config.app["proxy"]["password"], config.app["proxy"]["server"], config.app["proxy"]["port"]),
"http": "socks5://{0}:{1}@{2}:{3}/".format(config.app["proxy"]["user"], config.app["proxy"]["password"], config.app["proxy"]["server"], config.app["proxy"]["port"]),
"https": "socks5://{0}:{1}@{2}:{3}/".format(config.app["proxy"]["user"], config.app["proxy"]["password"], config.app["proxy"]["server"], config.app["proxy"]["port"]),
"http": "socks4://{0}:{1}@{2}:{3}/".format(config.app["proxy"]["user"], config.app["proxy"]["password"], config.app["proxy"]["server"], config.app["proxy"]["port"]),