Skip to main content

Async IP Rotator ofuscates your requests' IP via AWS gateways.

Project description

Async IP Rotator is an IP obfuscating library that integrates with AioHttp. The library proxies your requests through AWS gateways, leveraging their pool of IP addresses. This allows you to send request from different IPs and bypass IP-based rate-limits of web services.

The library is designed to provide an async alternative to the amazing requests-ip-rotator.

Installation

To install Async IP Rotator, simply run:

pip3 install async-ip-rotator

Usage

import asyncio
import logging

from async_ip_rotator import IpRotator, ClientSession

# set logging to get information about API creation and deletion
logging.basicConfig(level=logging.INFO)

async def main():
    ip_rotator = IpRotator(
        target='https://ipinfo.io',             # target website
        aws_key_id='your_aws_key_id',           # AWS key id
        aws_key_secret='your_aws_key_secret',   # AWS key secret
        regions=['eu-central-1'],               # regions (see IpRotator.py)
        # regions=IpRotator.DEFAULT_REGIONS,
        # regions=IpRotator.EXTRA_REGIONS,
        # regions=IpRotator.ALL_REGIONS,
    )

    # we can optionally delete all existing Async IP Rotator gateways
    # to make sure there are no leftovers from previous failed teardowns
    await ip_rotator.clear_existing_apis()

    async with ip_rotator as ip_rotator:
        async with ClientSession(ip_rotator) as sess:
            for _ in range(4):
                res = await sess.get('https://ipinfo.io/json')
                text = await res.text()
                print(text)

if __name__ == '__main__':
    asyncio.run(main())

Creadit

The library is inspired by Ge0rg3's requests-ip-rotator, which is based on IPRotate_Burp_Extension developed by RhinoSecurityLabs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

async-ip-rotator-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

async_ip_rotator-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file async-ip-rotator-0.1.0.tar.gz.

File metadata

  • Download URL: async-ip-rotator-0.1.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for async-ip-rotator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b8d067590d76819a5a311efaa9d6732c2eaf3bab2120d602ee4514188211213d
MD5 c9e27d440047db8edc56eadd586dda07
BLAKE2b-256 125864e836ff1fef2bff0b104381a9cfa54878c8d911d6e09e3679aba14eea0b

See more details on using hashes here.

File details

Details for the file async_ip_rotator-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for async_ip_rotator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74291e8dbcca3c6661c1102cfd5169f9e7200983f25ea5428c58c79b19397a9f
MD5 deccc790e2cc633555bfa9c5fb1c92d3
BLAKE2b-256 0a527d0abdbf126a6b32b367ba3918f83ca392ff0d6e0f6f1a74e6c0f3ca4acc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page