Skip to content

Commit 4af9c87

Browse files
committed
refactor(tproxy): migrate to async CloudflareSolver
Replaces synchronous CloudflareSolver with AsyncCloudflareSolver to improve performance and eliminate blocking operations in the proxy addon. Key improvements: - Removes httpx dependency in favor of async solver's built-in request handling - Converts host-level locks from threading.Event to asyncio.Event for proper async coordination - Implements lazy solver initialization to avoid pre-connection overhead - Consolidates challenge solving and refetching logic into unified async fetch method - Adds configurable polling_interval parameter for task result polling - Extracts clearance cookies directly from solver session state instead of API response parsing Eliminates ~200 lines of redundant code by leveraging solver's native capabilities for request handling, cookie management, and response processing.
1 parent d3185fd commit 4af9c87

File tree

1 file changed

+130
-301
lines changed

1 file changed

+130
-301
lines changed

0 commit comments

Comments
 (0)