Skip to content

Commit

Permalink
fix http proxy dict building
Browse files Browse the repository at this point in the history
  • Loading branch information
ludndev committed Mar 23, 2024
1 parent 215a003 commit 0c06aa8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion util.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ def build_proxy_dict(raw_proxy):
raw_dict = raw_proxy.split('|')

if raw_dict[0] != 'socks4' and raw_dict[0] != 'socks5':
proxy_dict['http'] = f'https://{raw_dict[2]}'
proxy_dict['http'] = f'http://{raw_dict[2]}'
if raw_dict[1] == 'True':
proxy_dict['http'] = f'https://{raw_dict[2]}'
proxy_dict['https'] = f'https://{raw_dict[2]}'

if raw_dict[0] == 'socks4':
Expand Down

0 comments on commit 0c06aa8

Please sign in to comment.