()
| 64 | |
| 65 | # Method 1: Socket connection test (direct connection, no proxy) |
| 66 | def check_socket() -> bool: |
| 67 | try: |
| 68 | socket.create_connection((host, port), timeout=timeout) |
| 69 | return True |
| 70 | except OSError: |
| 71 | return False |
| 72 | |
| 73 | # Method 2: HTTP request test (supports proxy) |
| 74 | def check_http() -> bool: |
no outgoing calls
no test coverage detected