17 lines
512 B
Python
17 lines
512 B
Python
import aiohttp
|
|
import asyncio
|
|
|
|
|
|
async def test_proxy():
|
|
proxy_url = "http://FYqj9n:n4br4L@185.168.251.163:8000"
|
|
|
|
try:
|
|
async with aiohttp.ClientSession() as session:
|
|
async with session.get("https://api.ipify.org?format=json", proxy=proxy_url) as resp:
|
|
data = await resp.json()
|
|
print(f"✅ Прокси работает! Ваш IP: {data['ip']}")
|
|
except Exception as e:
|
|
print(f"❌ Ошибка прокси: {e}")
|
|
|
|
|
|
asyncio.run(test_proxy()) |