Skip to main content

aioprox

Python Version License

aioprox – Asynchronous proxy manager for Python. Fetch, test, and filter HTTP/SOCKS proxies with optional latency measurement and support for custom sources.


Project Overview

aioprox is designed for developers who need a reliable, asynchronous proxy management tool in Python. It allows you to quickly fetch proxies from multiple sources, test them concurrently, and optionally measure latency to select the fastest proxies. Whether you want a single random live proxy or a fully sorted list of working proxies, aioprox makes it easy. You can also supply your own proxy lists via a file, URL, or Python list.


Features

  • Fetch proxies from multiple built-in sources or user-supplied sources (URL, file, or list).
  • Test proxies asynchronously for availability.
  • Optional latency measurement to find the fastest proxies.
  • Retrieve a single random live proxy or a full list of working proxies.
  • Supports HTTP, SOCKS4, and SOCKS5 proxies.
  • Concurrency control for fast testing of large proxy lists.
  • Easy to integrate in both scripts and larger Python projects.

Installation

pip install aiohttp aiohttp_socks

Then clone or download aioprox.py into your project.


Usage

1. Using a Built-in Source

from aioprox import Proxy

# Initialize with built-in source
p = Proxy(proxy_type="http", source="monosans")

# Get all live proxies
proxies = p.get_good_proxies()
print(proxies)

# Get a single random live proxy
random_proxy = p.get_random_proxy()
print(f"Random proxy: {random_proxy}")

2. Measuring Latency

# Enable latency measurement
p = Proxy(proxy_type="http", source="monosans", latency=True)

# Get proxies sorted by latency
proxies = p.get_good_proxies()

# Get the fastest proxy
fastest_proxy = p.get_random_proxy()
print(proxies)
print(f"Fastest proxy: {fastest_proxy}")

3. Using a Custom List of Proxies

custom_list = [
    "123.45.67.89:8080",
    "98.76.54.32:1080",
]

p = Proxy(proxy_type="http", custom_source=custom_list, latency=True)
proxies = p.get_good_proxies()
print(proxies)

4. Using a Custom URL or File

# From a URL
p = Proxy(proxy_type="socks5", custom_source="https://example.com/proxylist.txt")
proxies = p.get_good_proxies()
print(proxies)

# From a local file
p = Proxy(proxy_type="http", custom_source="proxies.txt")
proxies = p.get_good_proxies()
print(proxies)

Supported Proxy Types

  • HTTP
  • SOCKS4
  • SOCKS5

Concurrency

By default, proxy testing uses a concurrency of 50. You can adjust it when creating the Proxy object:

p = Proxy(proxy_type="http", source="monosans", concurrency=100)

Error Handling

  • Failed proxy sources print informative messages.
  • Dead proxies are automatically filtered out.
  • Latency measurement is optional; if not enabled, only live/dead status is returned.

Example Output

[{'proxy': '123.45.67.89:8080', 'latency': 0.234},
 {'proxy': '98.76.54.32:1080', 'latency': 0.421}]
Fastest proxy: 123.45.67.89:8080

Metadata

Release files for aioprox 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aioprox 0.1.5
File Size Uploaded
aioprox-0.1.5.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aioprox 0.1.5
File Interpreter ABI Platform
aioprox-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 9.9 kB

Release files / aioprox-0.1.5.tar.gz

Download URL aioprox-0.1.5.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e0eb3fbfe23a4b58f134bc1adb92fb799247927ddbd6fb9a7c74c4b2ef226ab0
BLAKE2b-256 checksum
How to use checksums
c71860a3a5045e6b5d0ab31f81b1a4db611484b83ccc35af8119e08f4c7deda5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / aioprox-0.1.5-py3-none-any.whl

Download URL aioprox-0.1.5-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
302a3bdfffad6c5e1ba4ccc513e184d5bef633104454ba68abbd909d0fbbf118
BLAKE2b-256 checksum
How to use checksums
9cfc946be99c73e32e4147976ecc7477c3f1889f3b29d2e44b1b7842ba8826a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page