()
| 72 | |
| 73 | # Method 2: HTTP request test (supports proxy) |
| 74 | def check_http() -> bool: |
| 75 | try: |
| 76 | response = requests.get('http://www.google.com', |
| 77 | timeout=timeout, |
| 78 | proxies=proxies) |
| 79 | return response.status_code == 200 |
| 80 | except requests.RequestException: |
| 81 | return False |
| 82 | |
| 83 | # Method 3: Ping test (direct connection, no proxy) |
| 84 | def check_ping() -> bool: |
no test coverage detected