INNER CODE UNIT · Python
fast_mode
tombcato/clash-ip-checker · clash_automator.py:27
fast_mode: bool = FAST_MODE, source: str = SOURCE, fallback: bool = FALLBACK) -> Dict[str, Any]:
"""
Tests a single proxy: switches to it, waits, and checks IP.
Returns the result dictionary (or error dict).
"""
print(f"\nTesting: {proxy_name}")
# ... switch logic same ...
# 1. Switch Node
print(f" -> Switching {selector} ...")
switched = await controller.switch_proxy(selector, proxy_name)
if not switched:
print(" -> Switch failed, skipping IP check.")
return {"full_string": "【❌ Switch Error】", "ip": "Error", "pure_score": "?", "bot_score": "?"}
# 2. Wait for switch to take effect
await asyncio.sleep(1)