mirror of
https://github.com/r4sas/PBinCLI
synced 2025-02-03 10:25:11 +00:00
fix proxy usage with SOCKS (#40)
Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
parent
a3386131a7
commit
08dbceebc6
@ -4,7 +4,14 @@ from pbincli.utils import PBinCLIError
|
||||
|
||||
def _config_requests(settings=None):
|
||||
if settings['proxy']:
|
||||
proxy = {settings['proxy'].split('://')[0]: settings['proxy']}
|
||||
scheme = settings['proxy'].split('://')[0]
|
||||
if (scheme.startswith("socks")):
|
||||
proxy = {
|
||||
"http": settings['proxy'],
|
||||
"https": settings['proxy']
|
||||
}
|
||||
else:
|
||||
proxy = {scheme: settings['proxy']}
|
||||
else:
|
||||
proxy = {}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user