skillfed

aiohttp_socks

Proxy connector for aiohttp

aiohttp-socks v0.12.0 3.3M downloads/30d#2,682 on PyPI243
Permissive license Apache-2.0 Active released

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-socks

uv

uv add aiohttp-socks

poetry

poetry add aiohttp-socks

Installing 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

Development Status :: 4 - BetaFramework :: AsyncIOIntended Audience :: DevelopersOperating System :: MacOSOperating System :: MicrosoftOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTP

Tags

aiohttp proxy connectorsocks5 async proxyasyncio socks proxyaiohttp socks supportproxy chaining aiohttphttp connect proxy async
async-httpproxy-networking

More WWW/HTTP packages