Refactor code structure for improved readability and maintainability

This commit is contained in:
imnyang 2025-06-07 14:44:06 +09:00
commit 60af190524
8 changed files with 1129 additions and 0 deletions

16
addon/init.py Normal file
View file

@ -0,0 +1,16 @@
from mitmproxy import http
import asyncio
from pkce_check import PKCEDowngradeChecker
class PKCEAddon:
def __init__(self):
self.checker = PKCEDowngradeChecker()
async def request(self, flow: http.HTTPFlow):
print(f"[DEBUG] Processing request: {flow.request.method} {flow.request.pretty_url}")
try:
await self.checker.test(flow)
except Exception as e:
print(f"[ERROR] Addon failed: {e}")
addons = [PKCEAddon()]