aiohttp_socks
Proxy connector for aiohttp
What it is and what it does
aiohttp-socks is a proxy connector library that extends aiohttp's HTTP client to route requests through SOCKS and HTTP proxies. It wraps python-socks to provide a single integration point with aiohttp, supporting SOCKS4(a), SOCKS5(h), and HTTP CONNECT proxies individually or chained together. The library is designed for async applications that need to tunnel HTTP traffic through proxy infrastructure without managing low-level socket details.
You use it by instantiating a ProxyConnector with proxy credentials and passing it to aiohttp.ClientSession, then making requests normally. It handles authentication, remote DNS resolution for SOCKS5, and multi-proxy chains through a dedicated ChainProxyConnector class. The package maintains compatibility with recent aiohttp releases through a minimal integration surface.
Use it for:
- Route aiohttp requests through a corporate SOCKS5 proxy with authentication.
- Chain multiple proxies for layered anonymity or network segmentation in async applications.
- Tunnel HTTP traffic through HTTP CONNECT proxies in async web scrapers or API clients.
- Test async HTTP clients against proxy infrastructure in CI/CD pipelines.
- Build async applications that need to respect network policies requiring proxy routing.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a proxy connector for aiohttp that supports SOCKS4(a), SOCKS5(h), HTTP (CONNECT) proxies, and proxy chains for async HTTP requests.
Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and solves a specific problem (proxy support in aiohttp) with a clean API. It is well-positioned in the ecosystem (top 5000 PyPI packages) and supports current Python versions. Install if you need proxy support for aiohttp-based async HTTP clients.
Install
aiohttp-socks on PyPI
pip
pip install aiohttp-socksuv
uv add aiohttp-sockspoetry
poetry add aiohttp-socksInstalling aiohttp_socks
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained with a recent release (2 days old) and steady repository activity; supports current Python versions from 3.9 through 3.14.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in most commercial and open-source projects without significant restriction.
Quickstart
pip install aiohttp_socks
import aiohttp
from aiohttp_socks import ProxyConnector
async def fetch(url):
connector = ProxyConnector.from_url('socks5://user:password@127.0.0.1:1080')
async with aiohttp.ClientSession(connector=connector) as session:
async with session.get(url) as response:
return await response.text()
Requires Python >= 3.9 and aiohttp >= 3.10.0; async context required.
Verify before relying
- Performance characteristics when chaining multiple proxies or under high concurrency.
- Compatibility guarantees with aiohttp versions beyond 3.10.0.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.9.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — aiohttp, python-socks |
| Maintenance | actively maintained — 2 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,255,336/month — #2,682 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aiohttp_socks-0.12.0-py3-none-any.whl
Keywords: asyncio, aiohttp, socks, socks5, socks4, http, proxy
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
python-socksProvides SOCKS4(a), SOCKS5(h), and HTTP CONNECT…
permissive · top 5,000 on PyPI
httpx-socksAdds SOCKS4(a), SOCKS5(h), and HTTP CONNECT…
permissive · top 5,000 on PyPI
websockets-proxyEnables WebSocket connections through HTTP and…
permissive · top 15,000 on PyPI
asysocksAsynchronous SOCKS5, SOCKS4, and HTTP proxy…
permissive · top 15,000 on PyPI
socksioSocksio is a sans-I/O SOCKS protocol…
permissive · top 1,000 on PyPI
PySocksPySocks provides a SOCKS and HTTP proxy client…
permissive · top 1,000 on PyPI
SocketSwapSocketSwap intercepts and redirects network…
permissive · top 15,000 on PyPI
pproxypproxy is an asynchronous proxy server that…
permissive · top 15,000 on PyPI
aiohttp-asyncmdnsresolverProvides an async resolver for aiohttp that…
permissive · top 15,000 on PyPI
aiohttp-basicauthProvides HTTP basic authentication middleware…
permissive · top 15,000 on PyPI