Skip to content

Releases: sachin-sankar/swiftshadow

v2.1.0

15 Feb 10:25
801a792
Compare
Choose a tag to compare

What's New?

Thanks to issues #32 and #37, SwiftShadow can now be seamlessly integrated into async environments. If you're planning to use SwiftShadow with frameworks like FastAPI, check out the documentation for guidance.

Full Changelog: v2.0.1...v2.1.0

v2.0.1

27 Jan 05:39
8fc2e06
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.0.0...v2.0.1

v2.0.0

26 Jan 19:59
cf9c883
Compare
Choose a tag to compare

v2 🚀

The swiftshadow library has undergone significant changes in version 2.0.0. This release introduces new features, improvements, and bug fixes to enhance the functionality and usability of the library. Below is a summary of the key changes:


New Features

  1. Asynchronous Proxy Validation ⚡:

    • The library now uses aiohttp for asynchronous proxy validation, improving performance when checking large lists of proxies.
    • The validate_proxies function in validator.py validates proxies concurrently, reducing the time required to fetch working proxies.
  2. New Proxy Providers 🌐:

    • Added support for multiple new proxy providers:
      • GoodProxy
      • OpenProxyList
      • MuRongPIG
      • KangProxy
      • Mmpx12
      • Anonym0usWork1221
      • ProxySpace
    • These providers expand the pool of available proxies and improve reliability.
  3. Improved Proxy Model 📦:

    • Introduced the Proxy dataclass in models.py to represent proxy objects.
    • Added utility methods to the Proxy class:
      • as_requests_dict(): Converts the proxy into a dictionary compatible with the requests library.
      • as_string(): Returns the proxy in the format <protocol>://<ip>:<port>.
  4. Enhanced Caching 🗄️:

    • Caching is now handled using pickle for better performance and reliability.
    • The CacheData dataclass in models.py represents the structure of cached data, including expiry time and proxy list.
  5. Improved Logging 📝:

    • Logging is now more robust, with support for writing logs to a file (swiftshadow.log) in the cache directory.
    • Debug logging can be enabled for detailed insights into the library's operations.
  6. Type Annotations 🏷️:

    • Added extensive type annotations across the codebase for better code clarity and IDE support.
    • Introduced custom types in types.py for structured data handling (e.g., MonosansProxyDict).

Breaking Changes ⚠️

  1. Class Renaming 🔄:

    • The Proxy class has been renamed to ProxyInterface to better reflect its purpose and avoid confusion with the Proxy dataclass.
  2. Cache File Format 📂:

    • The cache file format has changed from JSON to pickle for better performance and compatibility with Python objects.
  3. Provider Function Signature 📜:

    • Provider functions are now asynchronous and return a list of Proxy objects instead of raw proxy data.
  4. Removed constants.py 🗑️:

    • The CountryCodes dictionary has been removed. Users should now rely on ISO 3166-2 country codes directly.

Improvements 🔧

  1. Better Proxy Filtering 🎯:

    • Proxy filtering by country and protocol is now more efficient and supports more providers.
  2. Code Refactoring 🛠️:

    • The codebase has been refactored for better modularity and maintainability.
    • Introduced dataclasses (Proxy, CacheData, Provider) to represent core data structures.
  3. Enhanced Documentation 📚:

    • Added detailed docstrings for classes, methods, and functions to improve usability.
  4. New Utility Functions 🛠️:

    • Added plaintextToProxies in helpers.py to convert plaintext proxy lists into Proxy objects.

Bug Fixes 🐛

  1. Fixed Cache Expiry Handling ⏳:

    • The checkExpiry function in cache.py now correctly handles cache expiry checks.
  2. Improved Error Handling 🚑:

    • Better error handling for proxy validation and provider fetching.
  3. Fixed Proxy Rotation 🔄:

    • The rotate method in ProxyInterface now correctly validates the cache before rotation.

Dependencies 📦

  • The library now requires aiohttp for asynchronous HTTP requests and appdirs for managing cache directories.

Migration Guide 🧭

  • Replace instances of the old Proxy class with ProxyInterface.
  • Use the new Proxy dataclass for representing proxy objects.

Benchmark ⏱️

The introduction of asynchronous proxy validation in v2.0.0 has significantly improved performance. Below are the benchmark results comparing synchronous and asynchronous validation:

Benchmark 1: Synchronous Proxy Validation (v1.2.1)
  Time (mean ± σ):     162.486 s ± 22.466 s    [User: 0.512 s, System: 0.083 s]
  Range (min … max):   121.340 s … 189.957 s    10 runs

Benchmark 2: Asynchronous Proxy Validation (v2.0.0)
  Time (mean ± σ):     10.764 s ±  0.494 s    [User: 1.184 s, System: 0.136 s]
  Range (min … max):   10.102 s … 11.535 s    10 runs

Key Takeaways:

  • 15x Faster: Asynchronous validation reduces the mean execution time from 162.486 seconds to 10.764 seconds

v1.2.1 Hotfix

21 Jul 18:28
3f65091
Compare
Choose a tag to compare

Fixes #28 bug and improves library's backwards compatibility for older python versions.
Thanks to @emmamarkle for issue #28
Thanks to @JayacharanR for PR #30

What's Changed

New Contributors

Full Changelog: v1.2.0...v1.2.1

v1.2.0

06 Jul 12:44
9ebd3bc
Compare
Choose a tag to compare

Providers Update

  • Providers are now dynamically selected.
  • 2 New providers , Updated 1 and removed 1 provider. Fixes #26
  • Improved proxy checking

What's Changed

Full Changelog: v1.1.0...v1.2.0

v1.1.0

29 Feb 11:00
Compare
Choose a tag to compare

Logging Update

This update adds basic logging functionality to swiftshadow.

🆕 Added

  • Basic Logger
  • Ability to customize logging functionality using debug and logToFile parameters in Proxy class.

🗑️ Removed

  • Removed support for and class ProxyChains

v1.0.2

28 Feb 18:23
Compare
Choose a tag to compare

Hotfix to improve caching support when used with AWS Lambda environments.
Thanks to @sharshiggi for PR #20

v1.0.1

28 Feb 17:56
5a0dcc5
Compare
Choose a tag to compare

This is a hotfix release to fix #19

What's Changed

Full Changelog: v1.0.0...v1.0.1

v1.0.0

08 May 10:14
e16240d
Compare
Choose a tag to compare

I'm thrilled to announce the first stable release of SwiftShadow 🎉! It's been an exciting journey, and I'm proud to share the following changes that have been implemented:

🔧Change Log:

  • I've moved the Proxy class to the swiftshadow.classes module to enhance import statements and make them more intuitive.
  • I've introduced a new feature called QuickProxy, a function designed for fast and cacheless proxying.
  • I've enhanced the Proxy class by allowing users to specify a cache folder according to their requirements.

⚠️ Note:

It's important to note that this release is not backwards compatible. I've made significant changes that may impact existing code. Please review the modifications carefully and update your code accordingly. Thank you for your support, and I'm excited to see how SwiftShadow evolves with your feedback!

v0.2.3

04 May 07:57
761e1ea
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.2.2...v0.2.3