Registry / http-networking / aiosocks

aiosocks

JSON →
library0.2.6pypypi✓ verified 83d ago

SOCKS proxy client for asyncio and aiohttp. Current version 0.2.6, last released in 2018. Library is in maintenance mode with very rare updates.

pip install aiosocks
INSTALL
IMPORT
SIG · AIOSOCKS
A
aiosocks
http-networkingpythonv0.2.6
Install
2.4s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.2.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.4s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

create_connection
from aiosocks import create_connection
from aiosocks.connector import SocksConnector
open_connection
from aiosocks import open_connection
Socks5Addr
from aiosocks import Socks5Addr

Make a SOCKS5 request with authentication.

import asyncio import aiohttp from aiosocks.connector import SocksConnector, ProxyClientRequest async def fetch(): connector = SocksConnector.from_url('socks5://user:pass@127.0.0.1:1080', remote_resolve=True) async with aiohttp.ClientSession(connector=connector, request_class=ProxyClientRequest) as session: async with session.get('http://example.com') as resp: print(await resp.text()) loop = asyncio.get_event_loop() loop.run_until_complete(fetch())
Debug
Known issues
deprecatedproxy_from_env was removed in v0.2.5. Use environment variable parsing manually.
fix
Manually read SOCKS_PROXY environment variable.
affects: >=0.2.5
breakingaiohttp < 2.3.2 is no longer supported as of v0.2.5
fix
Upgrade aiohttp to >=2.3.2.
affects: >=0.2.5
gotchaSocksConnector does not support SOCKS4; only SOCKS5 and SOCKS4a.
fix
Use SOCKS4a or switch to another library for SOCKS4.
affects: all
Upgrade
Version history
0.2.6latest on PyPI · released Nov 20, 2017
Audit
Dependencies

No dependency data recorded yet.

Agent activity
66 hits · last 30 days
node
56
OpenAI (training)
1
Resources
aiosocks — pip install aiosocks · libregistry