{"id":5855,"library":"authcaptureproxy","title":"Auth Capture Proxy","description":"Auth Capture Proxy (authcaptureproxy) is a Python library and tool designed to create a proxy that captures authentication information from web pages. This is particularly useful for scenarios requiring the capture of OAuth login details without direct access to a third-party OAuth provider. The current version is 1.3.7, and the project maintains an active release cadence with frequent bug fixes and minor improvements.","status":"active","version":"1.3.7","language":"en","source_language":"en","source_url":"https://github.com/alandtse/auth_capture_proxy","tags":["proxy","authentication","oauth","capture","security","web"],"install":[{"cmd":"pip install authcaptureproxy","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Requires Python 3.10 or newer.","package":"python","optional":false}],"imports":[{"symbol":"AuthCaptureProxy","correct":"from auth_capture_proxy.proxy import AuthCaptureProxy"}],"quickstart":{"code":"import asyncio\nfrom auth_capture_proxy.proxy import AuthCaptureProxy\n\nasync def run_proxy_example():\n    # Instantiate the proxy to listen on port 5000\n    # and forward requests to a target URL (e.g., a login page).\n    # authcaptureproxy will attempt to capture authentication details\n    # from the traffic passing through it.\n    proxy = AuthCaptureProxy(\n        listen_port=5000,\n        base_url=\"https://httpbin.org\", # Use a real target URL for actual use\n        verbose=True\n    )\n\n    print(\"Starting Auth Capture Proxy on http://127.0.0.1:5000\")\n    print(\"Forwarding traffic to https://httpbin.org\")\n    print(\"Visit http://127.00.1:5000 in your browser to test.\")\n    print(\"Press Ctrl+C to stop.\")\n\n    try:\n        # Start the proxy server. This is an async operation.\n        await proxy.start()\n        # Keep the proxy running until interrupted.\n        # In a real application, integrate this into your event loop.\n        await asyncio.Event().wait()\n    except asyncio.CancelledError:\n        pass # Handle graceful shutdown\n    finally:\n        await proxy.stop()\n        print(\"Auth Capture Proxy stopped.\")\n\nif __name__ == \"__main__\":\n    try:\n        asyncio.run(run_proxy_example())\n    except KeyboardInterrupt:\n        print(\"\\nExiting Auth Capture Proxy example.\")","lang":"python","description":"This example demonstrates how to set up and run the `AuthCaptureProxy` programmatically using `asyncio`. It starts a proxy server on port 5000, forwarding requests to `httpbin.org`, and will capture authentication-related information. The proxy runs until manually interrupted."},"warnings":[{"fix":"Upgrade your Python environment to 3.10 or a newer version.","message":"Version 1.2.0 introduced a hard dependency on Python 3.10 or newer. Users on older Python versions (e.g., 3.9) will encounter errors.","severity":"breaking","affected_versions":"<1.2.0"},{"fix":"Upgrade to version 1.3.5 or newer to benefit from fixes for header and JSON parsing issues.","message":"Versions prior to 1.3.5 might incorrectly handle HTTP header duplication or fail to parse certain JSON responses, leading to unexpected proxy behavior or data corruption.","severity":"gotcha","affected_versions":"<1.3.5"},{"fix":"Ensure `base_url` is always a valid HTTP/HTTPS URL. If you need to proxy to local files, consider alternative approaches or test carefully.","message":"Starting from version 1.3.1, the `base_url` parameter is automatically converted if it resembles a file URL. This might alter the intended target URL if you were explicitly passing file paths for other purposes.","severity":"gotcha","affected_versions":">=1.3.1"},{"fix":"Test your proxy setup thoroughly after upgrading to 1.3.3+ if you rely on custom SSL configurations. Review the library's SSL handling for any conflicts.","message":"Version 1.3.3 introduced preconfiguration of the SSL context. If your application relies on specific low-level SSL context settings, this change might subtly alter behavior or require adjustments to your existing SSL configuration logic.","severity":"gotcha","affected_versions":">=1.3.3"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z"}