mirror of
https://github.com/honmashironeko/ProxyCat.git
synced 2025-11-05 10:51:06 +00:00
Update
This commit is contained in:
parent
4b6c14a102
commit
519cee15d1
@ -452,12 +452,12 @@ async def check_proxy(proxy):
|
||||
return False
|
||||
|
||||
async def check_http_proxy(proxy):
|
||||
async with httpx.AsyncClient(proxies={'http': proxy}, timeout=10) as client:
|
||||
async with httpx.AsyncClient(proxies={'http://': proxy}, timeout=10) as client:
|
||||
response = await client.get('http://www.baidu.com')
|
||||
return response.status_code == 200
|
||||
|
||||
async def check_https_proxy(proxy):
|
||||
async with httpx.AsyncClient(proxies={'https': proxy}, timeout=10) as client:
|
||||
async with httpx.AsyncClient(proxies={'https://': proxy}, timeout=10) as client:
|
||||
response = await client.get('https://www.baidu.com')
|
||||
return response.status_code == 200
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user