15 lines
445 B
Python
15 lines
445 B
Python
|
import requests
|
||
|
|
||
|
def config(http:str, https:str, auth:bool, user:str, passwd:str):
|
||
|
if auth == False:
|
||
|
proxies = {
|
||
|
"http": "{}".format(http),
|
||
|
"https": "{}".format(https)
|
||
|
}
|
||
|
return proxies
|
||
|
if auth == True:
|
||
|
proxies = {
|
||
|
"http": "http://{}:{}@{}".format(user, passwd, http),
|
||
|
"https": "https://{}:{}@{}".format(user, passwd, https),
|
||
|
}
|
||
|
return proxies
|