From b314e41588800443cbe9fe4e799fad8b8c58cf7a Mon Sep 17 00:00:00 2001 From: HytexLy Date: Sat, 11 Oct 2025 22:11:20 +1030 Subject: [PATCH] signal mcbingle --- app.py | 101 +++-- mcsmartscan/logs.txt | 721 ++++++++++++++++++++++++++++++++ mcsmartscan/mullvadproxyips.txt | 674 ++++++++--------------------- mcsmartscan/proxy.py | 491 ++++++++++++++++++++-- 4 files changed, 1428 insertions(+), 559 deletions(-) create mode 100644 mcsmartscan/logs.txt diff --git a/app.py b/app.py index fa058e9..32fe9b9 100644 --- a/app.py +++ b/app.py @@ -638,9 +638,10 @@ def __init__(self, root): self.var_dark_mode = tk.BooleanVar(value=True) # --- Proxy monitoring vars --- - default_proxy_text = ( - f"Proxies loaded: {self.proxy_pool.total} (ready)" if self._proxy_enabled else "Proxies disabled" - ) + if self.proxy_pool: + default_proxy_text = f"Proxies loaded: {self.proxy_pool.total} (0 available)" + else: + default_proxy_text = "Proxies disabled" self.var_proxy_summary = tk.StringVar(value=default_proxy_text) self.var_proxy_health_hint = tk.StringVar(value="") @@ -1049,6 +1050,10 @@ def _init_proxy_pool(self): pool = None if pool: self.proxy_pool = pool + try: + self.proxy_pool.prepare_for_run() + except Exception: + pass self._proxy_enabled = True self._uiq_put(("log", f"[PROXY] Loaded {pool.total} Mullvad proxy endpoints.", "info")) else: @@ -1075,9 +1080,19 @@ def toggle_proxy_usage(self): return self._proxy_enabled = not self._proxy_enabled if self._proxy_enabled: - self.proxy_pool.prepare_for_run() - self._proxy_log("[PROXY] Proxy usage enabled.", "info") - self.var_proxy_health_hint.set("Proxy usage enabled") + try: + self.proxy_pool.prepare_for_run() + except Exception: + pass + snapshot = [] + try: + snapshot = self.proxy_pool.snapshot_health() + except Exception: + snapshot = [] + healthy = sum(1 for entry in snapshot if entry.get("health_ok")) + total = len(snapshot) + self._proxy_log(f"[PROXY] Proxy usage enabled. Healthy {healthy}/{total} endpoints.", "info") + self.var_proxy_health_hint.set("OK" if healthy else "High failures") else: self._proxy_log("[PROXY] Proxy usage disabled.", "info") self.var_proxy_health_hint.set("Proxy usage disabled") @@ -1468,6 +1483,12 @@ def _handle_vpn_status_update(self, status: dict): self._ctl_async(msg) if connected_bool is not None: self._vpn_connected = connected_bool + if self.proxy_pool: + try: + self.proxy_pool.set_mullvad_connected(connected_bool) + except Exception: + pass + self._run_on_ui(self._refresh_proxy_health_ui) self._run_on_ui(self._update_mullvad_label) @@ -2455,6 +2476,21 @@ def _handle_proxy_event_ui(self, event: dict) -> None: latency = event.get("latency_ms") if latency is not None: self.var_proxy_health_hint.set(f"{label} success {latency:.1f} ms") + elif kind == "health": + ok = bool(event.get("ok")) + latency = event.get("latency_ms") + country = event.get("country") + if ok: + latency_text = f"{latency:.1f} ms" if latency is not None else "-" + detail = f"[PROXY] {label} health OK ({latency_text})" + if country: + detail += f" [{country}]" + self._proxy_log(detail, "success") + self.var_proxy_health_hint.set("OK") + else: + error = event.get("error") or "health probe failed" + self._proxy_log(f"[PROXY] {label} health failed: {error}", "warn") + self.var_proxy_health_hint.set("High failures") elif kind == "proxy-quarantine": duration = float(event.get("duration") or 0.0) consecutive = event.get("consecutive") @@ -2484,39 +2520,37 @@ def _refresh_proxy_health_ui(self): self.var_proxy_health_hint.set("") self._update_proxy_toggle_button() return - snapshot = self.proxy_pool.health_snapshot() + try: + snapshot = self.proxy_pool.snapshot_health() + except Exception: + snapshot = [] self._proxy_snapshot = snapshot total = len(snapshot) - in_use = sum(1 for item in snapshot if item.get("in_use")) - disabled_count = sum(1 for item in snapshot if (item.get("disabled") or 0) > 0.05) - quarantine_count = sum( + healthy = sum(1 for item in snapshot if item.get("health_ok")) + healthy_ratio = (healthy / total) if total else 0.0 + available = sum( 1 for item in snapshot - if (item.get("quarantine") or 0) > 0.05 and (item.get("disabled") or 0) <= 0.05 + if not item.get("in_use") + and (item.get("status") == "OK") + and bool(item.get("health_ok")) ) - cooling = sum( - 1 - for item in snapshot - if ( - not item.get("in_use") - and (item.get("cooldown") or 0) > 0.05 - and (item.get("quarantine") or 0) <= 0.05 - and (item.get("disabled") or 0) <= 0.05 - ) - ) - idle = max(0, total - in_use - cooling - quarantine_count - disabled_count) - summary_parts = [f"Proxies {total}", f"in use {in_use}"] - if disabled_count: - summary_parts.append(f"disabled {disabled_count}") - if quarantine_count: - summary_parts.append(f"quarantine {quarantine_count}") - if cooling: - summary_parts.append(f"cooling {cooling}") - summary_parts.append(f"idle {idle}") - summary = " | ".join(summary_parts) + summary = f"Proxies loaded: {total} ({available} available)" if not self._proxy_enabled: summary += " (disabled)" self.var_proxy_summary.set(summary) + pool_connected = getattr(self.proxy_pool, "mullvad_connected", True) + if not self._proxy_enabled: + hint = "Proxy usage disabled" + elif not pool_connected: + hint = "Mullvad disconnected" + elif healthy_ratio < 0.4: + hint = "High failures" + elif total == 0: + hint = "High failures" + else: + hint = "OK" + self.var_proxy_health_hint.set(hint) existing = set(self.proxy_tree.get_children()) for item_id in existing: self.proxy_tree.delete(item_id) @@ -2543,6 +2577,11 @@ def _refresh_proxy_health_ui(self): status = f"Cooling {cooldown:.1f}s" else: status = "Idle" + health_ok = bool(entry.get("health_ok")) + health_fresh = bool(entry.get("health_fresh")) + if not health_ok: + status_suffix = "health fail" if health_fresh else "health stale" + status = f"{status} ({status_suffix})" last_stage = entry.get("last_stage") last_error = entry.get("last_error") if last_error and not in_use_flag: diff --git a/mcsmartscan/logs.txt b/mcsmartscan/logs.txt new file mode 100644 index 0000000..9cc963d --- /dev/null +++ b/mcsmartscan/logs.txt @@ -0,0 +1,721 @@ +[PROXY] 10.64.0.1:1080 health OK (1875.6 ms) [Sweden] +[PROXY] 10.124.1.73:1080 health OK (2164.7 ms) [Austria] +[PROXY] 10.124.1.74:1080 health OK (2165.8 ms) [Austria] +[PROXY] 10.124.2.35:1080 health OK (2238.9 ms) [Austria] +[PROXY] 10.124.2.37:1080 health OK (2238.8 ms) [Austria] +[PROXY] 10.124.2.36:1080 health OK (2238.8 ms) [Austria] +[PROXY] 10.124.2.66:1080 health OK (2303.1 ms) [Albania] +[PROXY] 10.124.2.67:1080 health OK (2309.2 ms) [Albania] +[PROXY] 10.124.1.57:1080 health OK (3801.0 ms) [Australia] +[PROXY] 10.124.1.55:1080 health OK (3865.7 ms) [Australia] +[PROXY] 10.124.1.54:1080 health OK (4003.2 ms) [Australia] +[PROXY] 10.124.0.99:1080 health OK (4098.4 ms) [Australia] +[PROXY] 10.124.0.156:1080 health OK (4127.6 ms) [Australia] +[PROXY] 10.124.0.221:1080 health OK (4132.0 ms) [Australia] +[PROXY] 10.124.0.220:1080 health OK (4297.2 ms) [Australia] +[PROXY] 10.8.0.1:1080 failure: timed out (connect) +[PROXY] 10.8.0.1:1080 health failed: 10.8.0.1:1080 connection failed: timed out +[PROXY] 10.124.0.36:1080 health OK (4266.9 ms) [Australia] +[PROXY] 10.124.2.42:1080 health OK (2129.0 ms) [Belgium] +[PROXY] 10.124.0.214:1080 health OK (4017.4 ms) [Australia] +[PROXY] 10.124.0.141:1080 health OK (4016.7 ms) [Australia] +[PROXY] 10.124.0.215:1080 health OK (4042.6 ms) [Australia] +[PROXY] 10.124.2.43:1080 health OK (2167.6 ms) [Belgium] +[PROXY] 10.124.2.44:1080 health OK (2164.3 ms) [Belgium] +[PROXY] 10.124.0.211:1080 health OK (4060.8 ms) [Australia] +[PROXY] 10.124.0.37:1080 health OK (4348.9 ms) [Australia] +[PROXY] 10.124.0.42:1080 health OK (4393.9 ms) [Australia] +[PROXY] 10.124.0.225:1080 health OK (2308.5 ms) [Bulgaria] +[PROXY] 10.124.2.70:1080 health OK (4627.7 ms) [Australia] +[PROXY] 10.124.2.72:1080 health OK (4274.0 ms) [Australia] +[PROXY] 10.124.2.71:1080 health OK (4338.9 ms) [Australia] +[PROXY] 10.124.0.226:1080 health OK (2347.1 ms) [Bulgaria] +[PROXY] 10.124.2.73:1080 health OK (4544.2 ms) [Australia] +[PROXY] 10.124.0.231:1080 health OK (2774.6 ms) [Canada] +[PROXY] 10.124.0.232:1080 health OK (2661.2 ms) [Canada] +[PROXY] 10.124.0.234:1080 health OK (2678.3 ms) [Canada] +[PROXY] 10.124.0.233:1080 health OK (2752.0 ms) [Canada] +[PROXY] 10.124.0.10:1080 health OK (3357.1 ms) [Brazil] +[PROXY] 10.124.0.168:1080 health OK (2646.3 ms) [Canada] +[PROXY] 10.124.2.42:1080 target error: Connection refused by target host +[PROXY] 10.124.0.12:1080 health OK (3528.9 ms) [Brazil] +[PROXY] 10.124.2.31:1080 health OK (3542.9 ms) [Brazil] +[PROXY] 10.124.2.21:1080 health OK (3615.7 ms) [Brazil] +[PROXY] 10.124.2.32:1080 health OK (3655.1 ms) [Brazil] +[PROXY] 10.124.2.52:1080 health OK (3753.7 ms) [Brazil] +[PROXY] 10.124.2.2:1080 health OK (3790.1 ms) [Brazil] +[PROXY] 10.124.1.63:1080 target error: Connection refused by target host +[PROXY] 10.124.1.113:1080 target error: Connection refused by target host +[PROXY] 10.124.1.235:1080 health OK (2774.3 ms) [Canada] +[PROXY] 10.124.0.171:1080 health OK (2776.4 ms) [Canada] +[PROXY] 10.124.1.236:1080 health OK (2759.7 ms) [Canada] +[PROXY] 10.124.0.81:1080 health OK (2778.4 ms) [Canada] +[PROXY] 10.124.1.110:1080 health OK (2740.5 ms) [Canada] +[PROXY] 10.124.1.111:1080 health OK (2820.3 ms) [Canada] +[PROXY] 10.124.1.113:1080 health OK (2716.1 ms) [Canada] +[PROXY] 10.124.1.112:1080 health OK (2773.3 ms) [Canada] +[PROXY] 10.124.1.114:1080 health OK (2683.8 ms) [Canada] +[PROXY] 10.124.1.115:1080 health OK (2838.5 ms) [Canada] +[PROXY] 10.124.0.71:1080 health OK (3037.7 ms) [Canada] +[PROXY] 10.124.0.13:1080 health OK (3139.3 ms) [Canada] +[PROXY] 10.124.0.121:1080 health OK (2055.1 ms) [Switzerland] +[PROXY] 10.124.0.122:1080 health OK (2053.6 ms) [Switzerland] +[PROXY] 10.124.1.216:1080 failure: timed out (handshake) +[PROXY] 10.124.1.66:1080 health OK (3117.7 ms) [Canada] +[PROXY] 10.124.1.65:1080 health OK (3150.4 ms) [Canada] +[PROXY] 10.124.1.28:1080 target error: Host unreachable +[PROXY] 10.124.0.174:1080 health OK (3068.3 ms) [Canada] +[PROXY] 10.124.0.123:1080 health OK (2016.8 ms) [Switzerland] +[PROXY] 10.124.0.178:1080 health OK (3170.5 ms) [Canada] +[PROXY] 10.124.2.67:1080 failure: timed out (handshake) +[PROXY] 10.124.2.57:1080 failure: timed out (handshake) +[PROXY] 10.124.0.226:1080 failure: timed out (handshake) +[PROXY] 10.124.0.124:1080 health OK (2072.4 ms) [Switzerland] +[PROXY] 10.124.1.243:1080 failure: timed out (handshake) +[PROXY] 10.124.0.17:1080 failure: timed out (handshake) +[PROXY] 10.124.0.21:1080 failure: timed out (handshake) +[PROXY] 10.124.0.81:1080 failure: timed out (handshake) +[PROXY] 10.124.0.246:1080 failure: timed out (handshake) +[PROXY] 10.124.0.117:1080 failure: timed out (handshake) +[PROXY] 10.124.1.91:1080 target error: Connection refused by target host +[PROXY] 10.124.1.69:1080 failure: timed out (handshake) +[PROXY] 10.124.0.216:1080 failure: timed out (handshake) +[PROXY] 10.124.0.125:1080 health OK (2052.3 ms) [Switzerland] +[PROXY] 10.124.0.241:1080 health OK (2022.4 ms) [Switzerland] +[PROXY] 10.124.0.105:1080 health OK (2092.9 ms) [Switzerland] +[PROXY] 10.124.0.106:1080 health OK (2098.1 ms) [Switzerland] +[PROXY] 10.124.1.213:1080 health OK (2075.6 ms) [Switzerland] +[PROXY] 10.124.2.26:1080 target error: Connection refused by target host +[PROXY] 10.124.1.214:1080 health OK (2083.5 ms) [Switzerland] +[PROXY] 10.124.1.215:1080 health OK (2053.0 ms) [Switzerland] +[PROXY] 10.124.1.216:1080 health OK (2104.0 ms) [Switzerland] +[PROXY] 10.124.2.6:1080 health OK (2082.7 ms) [Switzerland] +[PROXY] 10.124.2.12:1080 health OK (2096.0 ms) [Switzerland] +[PROXY] 10.124.2.7:1080 health OK (2085.9 ms) [Switzerland] +[PROXY] 10.124.2.8:1080 health OK (2088.2 ms) [Switzerland] +[PROXY] 10.124.2.9:1080 health OK (2100.6 ms) [Switzerland] +[PROXY] 10.124.2.10:1080 health OK (2106.5 ms) [Switzerland] +[PROXY] 10.124.2.11:1080 health OK (2117.5 ms) [Switzerland] +[PROXY] 10.124.0.241:1080 target error: Host unreachable +[PROXY] 10.124.2.34:1080 health OK (2157.7 ms) [Czech Republic] +[PROXY] 10.124.1.83:1080 health OK (2498.3 ms) [Cyprus] +[PROXY] 10.124.1.84:1080 health OK (2486.3 ms) [Cyprus] +[PROXY] 10.124.0.125:1080 target error: Connection refused by target host +[PROXY] 10.124.2.57:1080 health OK (2120.9 ms) [Czech Republic] +[PROXY] 10.124.1.20:1080 health OK (3606.5 ms) [Chile] +[PROXY] 10.124.0.237:1080 failure: timed out (handshake) +[PROXY] 10.124.1.16:1080 failure: timed out (handshake) +[PROXY] 10.124.0.9:1080 health OK (1976.9 ms) [Germany] +[PROXY] 10.124.0.8:1080 health OK (2026.4 ms) [Germany] +[PROXY] 10.124.2.58:1080 health OK (2106.6 ms) [Czech Republic] +[PROXY] 10.124.0.7:1080 health OK (2054.6 ms) [Germany] +[PROXY] 10.124.0.55:1080 health OK (1960.7 ms) [Germany] +[PROXY] 10.124.0.179:1080 health OK (1949.8 ms) [Germany] +[PROXY] 10.124.0.196:1080 health OK (1972.8 ms) [Germany] +[PROXY] 10.124.2.36:1080 failure: timed out (handshake) +[PROXY] 10.124.0.239:1080 health OK (1987.6 ms) [Germany] +[PROXY] 10.124.0.216:1080 health OK (3343.8 ms) [Colombia] +[PROXY] 10.124.0.217:1080 health OK (3383.7 ms) [Colombia] +[PROXY] 10.124.1.21:1080 health OK (3632.7 ms) [Chile] +[PROXY] 10.124.0.105:1080 target error: Host unreachable +[PROXY] 10.124.1.68:1080 failure: timed out (handshake) +[PROXY] 10.124.1.239:1080 failure: timed out (handshake) +[PROXY] 10.124.0.137:1080 failure: timed out (handshake) +[PROXY] 10.124.2.13:1080 failure: timed out (handshake) +[PROXY] 10.124.0.254:1080 failure: timed out (handshake) +[PROXY] 10.124.0.101:1080 health OK (2022.7 ms) [Germany] +[PROXY] 10.124.0.30:1080 health OK (2135.0 ms) [Germany] +[PROXY] 10.124.0.91:1080 health OK (2139.4 ms) [Germany] +[PROXY] 10.124.0.53:1080 health OK (2091.0 ms) [Germany] +[PROXY] 10.124.1.27:1080 health OK (2000.7 ms) [Germany] +[PROXY] 10.124.1.23:1080 health OK (2035.8 ms) [Germany] +[PROXY] 10.124.0.222:1080 health OK (2045.9 ms) [Germany] +[PROXY] 10.124.0.54:1080 health OK (2086.0 ms) [Germany] +[PROXY] 10.124.1.26:1080 health OK (2072.5 ms) [Germany] +[PROXY] 10.124.1.24:1080 health OK (2029.7 ms) [Germany] +[PROXY] 10.124.0.92:1080 health OK (2220.4 ms) [Germany] +[PROXY] 10.124.1.25:1080 health OK (2046.4 ms) [Germany] +[PROXY] 10.124.0.240:1080 health OK (2001.2 ms) [Germany] +[PROXY] 10.124.1.243:1080 health OK (2068.9 ms) [Germany] +[PROXY] 10.124.1.238:1080 health OK (2083.0 ms) [Germany] +[PROXY] 10.124.1.239:1080 health OK (2093.4 ms) [Germany] +[PROXY] 10.124.1.240:1080 health OK (2126.0 ms) [Germany] +[PROXY] 10.124.1.241:1080 health OK (2092.7 ms) [Germany] +[PROXY] 10.124.1.242:1080 health OK (2133.9 ms) [Germany] +[PROXY] 10.124.1.31:1080 health OK (2023.1 ms) [Germany] +[PROXY] 10.124.1.30:1080 health OK (2028.4 ms) [Germany] +[PROXY] 10.124.0.64:1080 health OK (1924.5 ms) [Denmark] +[PROXY] 10.124.1.33:1080 health OK (1998.4 ms) [Germany] +[PROXY] 10.124.1.32:1080 health OK (2033.5 ms) [Germany] +[PROXY] 10.124.0.17:1080 health OK (1923.9 ms) [Denmark] +[PROXY] 10.124.1.250:1080 health OK (2044.2 ms) [Germany] +[PROXY] 10.124.1.251:1080 health OK (2051.1 ms) [Germany] +[PROXY] 10.124.1.252:1080 health OK (2036.5 ms) [Germany] +[PROXY] 10.124.0.229:1080 health OK (2021.3 ms) [Denmark] +[PROXY] 10.124.0.233:1080 failure: timed out (handshake) +[PROXY] 10.124.0.230:1080 health OK (2015.5 ms) [Denmark] +[PROXY] 10.124.0.138:1080 health OK (1896.8 ms) [Estonia] +[PROXY] 10.124.0.139:1080 health OK (1917.0 ms) [Estonia] +[PROXY] 10.124.1.251:1080 failure: timed out (handshake) +[PROXY] 10.124.1.222:1080 failure: timed out (handshake) +[PROXY] 10.124.1.84:1080 failure: timed out (handshake) +[PROXY] 10.124.0.111:1080 failure: timed out (handshake) +[PROXY] 10.124.0.140:1080 health OK (1931.0 ms) [Estonia] +[PROXY] 10.124.0.21:1080 health OK (1915.5 ms) [Finland] +[PROXY] 10.124.0.252:1080 health OK (2302.0 ms) [Spain] +[PROXY] 10.124.0.196:1080 target error: Connection refused by target host +[PROXY] 10.124.0.111:1080 health OK (1937.8 ms) [Finland] +[PROXY] 10.124.0.112:1080 health OK (1946.5 ms) [Finland] +[PROXY] 10.124.2.53:1080 health OK (1918.7 ms) [Finland] +[PROXY] 10.124.1.70:1080 health OK (2271.9 ms) [Spain] +[PROXY] 10.124.2.28:1080 health OK (2279.6 ms) [Spain] +[PROXY] 10.124.1.69:1080 health OK (2313.0 ms) [Spain] +[PROXY] 10.124.2.54:1080 health OK (1908.0 ms) [Finland] +[PROXY] 10.124.1.223:1080 health OK (2330.5 ms) [Spain] +[PROXY] 10.124.1.222:1080 health OK (2331.0 ms) [Spain] +[PROXY] 10.124.2.47:1080 health OK (2314.1 ms) [Spain] +[PROXY] 10.124.1.2:1080 health OK (2525.1 ms) [Spain] +[PROXY] 10.124.1.3:1080 health OK (2563.0 ms) [Spain] +[PROXY] 10.124.2.55:1080 health OK (1905.0 ms) [Finland] +[PROXY] 10.124.2.56:1080 health OK (1971.8 ms) [Finland] +[PROXY] 10.124.0.253:1080 health OK (4110.6 ms) [Spain] +[PROXY] 10.124.1.63:1080 health OK (2255.1 ms) [France] +[PROXY] 10.124.0.116:1080 health OK (2051.0 ms) [France] +[PROXY] 10.124.0.118:1080 health OK (2099.7 ms) [France] +[PROXY] 10.124.0.117:1080 health OK (2119.0 ms) [France] +[PROXY] 10.124.1.183:1080 health OK (2180.0 ms) [France] +[PROXY] 10.124.0.119:1080 health OK (2102.7 ms) [France] +[PROXY] 10.124.0.45:1080 health OK (2196.9 ms) [France] +[PROXY] 10.124.0.238:1080 health OK (2121.7 ms) [France] +[PROXY] 10.124.0.120:1080 health OK (2147.4 ms) [France] +[PROXY] 10.124.0.142:1080 health OK (2140.1 ms) [France] +[PROXY] 10.124.1.64:1080 health OK (2531.7 ms) [France] +[PROXY] 10.124.0.223:1080 health OK (2177.1 ms) [France] +[PROXY] 10.124.0.224:1080 health OK (2167.8 ms) [France] +[PROXY] 10.124.2.20:1080 failure: timed out (handshake) +[PROXY] 10.124.1.78:1080 health OK (2113.2 ms) [France] +[PROXY] 10.124.2.25:1080 failure: timed out (handshake) +[PROXY] 10.124.1.206:1080 failure: timed out (handshake) +[PROXY] 10.124.0.174:1080 failure: timed out (handshake) +[PROXY] 10.124.1.79:1080 health OK (2150.3 ms) [France] +[PROXY] 10.124.0.246:1080 health OK (2221.4 ms) [UK] +[PROXY] 10.124.0.59:1080 health OK (2020.2 ms) [UK] +[PROXY] 10.124.1.16:1080 health OK (2045.6 ms) [UK] +[PROXY] 10.124.1.17:1080 health OK (2033.1 ms) [UK] +[PROXY] 10.124.1.18:1080 health OK (2031.7 ms) [UK] +[PROXY] 10.124.0.247:1080 health OK (2188.6 ms) [UK] +[PROXY] 10.124.1.62:1080 health OK (2052.9 ms) [UK] +[PROXY] 10.124.1.28:1080 health OK (2074.7 ms) [UK] +[PROXY] 10.124.1.19:1080 health OK (2083.5 ms) [UK] +[PROXY] 10.124.1.35:1080 health OK (2130.1 ms) [UK] +[PROXY] 10.124.1.34:1080 health OK (2131.7 ms) [UK] +[PROXY] 10.124.1.33:1080 target error: Connection refused by target host +[PROXY] 10.124.1.91:1080 health OK (2057.8 ms) [UK] +[PROXY] 10.124.1.164:1080 health OK (2100.7 ms) [UK] +[PROXY] 10.124.1.249:1080 health OK (2157.9 ms) [UK] +[PROXY] 10.124.0.202:1080 failure: timed out (handshake) +[PROXY] 10.124.1.247:1080 health OK (2293.8 ms) [UK] +[PROXY] 10.124.0.237:1080 health OK (2204.6 ms) [UK] +[PROXY] 10.124.2.20:1080 health OK (2212.0 ms) [UK] +[PROXY] 10.124.2.13:1080 health OK (2189.2 ms) [UK] +[PROXY] 10.124.2.15:1080 health OK (2214.0 ms) [UK] +[PROXY] 10.124.2.14:1080 health OK (2219.4 ms) [UK] +[PROXY] 10.124.2.16:1080 health OK (2297.6 ms) [UK] +[PROXY] 10.124.2.17:1080 health OK (2274.4 ms) [UK] +[PROXY] 10.124.2.19:1080 health OK (2248.7 ms) [UK] +[PROXY] 10.124.2.18:1080 health OK (2264.3 ms) [UK] +[PROXY] 10.124.1.163:1080 health OK (2215.5 ms) [UK] +[PROXY] 10.124.1.162:1080 health OK (2220.6 ms) [UK] +[PROXY] 10.124.2.69:1080 health OK (2322.4 ms) [UK] +[PROXY] 10.124.0.159:1080 health OK (2300.2 ms) [Greece] +[PROXY] 10.124.0.166:1080 health OK (2254.9 ms) [Greece] +[PROXY] 10.124.2.44:1080 failure: timed out (handshake) +[PROXY] 10.124.1.236:1080 failure: timed out (handshake) +[PROXY] 10.124.2.47:1080 failure: timed out (handshake) +[PROXY] 10.124.0.123:1080 target error: Host unreachable +[PROXY] 10.124.0.222:1080 failure: timed out (handshake) +[PROXY] 10.124.0.221:1080 failure: timed out (handshake) +[PROXY] 10.124.1.223:1080 failure: timed out (handshake) +[PROXY] 10.124.0.225:1080 failure: timed out (handshake) +[PROXY] 10.124.1.73:1080 target error: Host unreachable +[PROXY] 10.124.0.35:1080 health OK (2156.5 ms) [Croatia] +[PROXY] 10.124.1.164:1080 target error: Connection refused by target host +[PROXY] 10.124.0.74:1080 health OK (2151.4 ms) [Croatia] +[PROXY] 10.124.0.227:1080 health OK (2238.2 ms) [Hungary] +[PROXY] 10.124.0.228:1080 health OK (2243.2 ms) [Hungary] +[PROXY] 10.124.0.137:1080 health OK (2165.4 ms) [Hungary] +[PROXY] 10.124.0.135:1080 health OK (2166.5 ms) [Hungary] +[PROXY] 10.124.1.59:1080 health OK (2221.7 ms) [Ireland] +[PROXY] 10.124.1.58:1080 health OK (2227.0 ms) [Ireland] +[PROXY] 10.124.2.5:1080 health OK (2575.5 ms) [Israel] +[PROXY] 10.124.2.25:1080 health OK (2484.7 ms) [Israel] +[PROXY] 10.124.2.26:1080 health OK (2478.4 ms) [Israel] +[PROXY] 10.124.1.35:1080 target error: Connection refused by target host +[PROXY] 10.124.0.203:1080 health OK (3773.8 ms) [Hong Kong] +[PROXY] 10.124.1.206:1080 health OK (2096.7 ms) [Italy] +[PROXY] 10.124.0.254:1080 health OK (3948.2 ms) [Indonesia] +[PROXY] 10.124.1.207:1080 health OK (2095.4 ms) [Italy] +[PROXY] 10.124.1.1:1080 health OK (4109.6 ms) [Indonesia] +[PROXY] 10.124.0.253:1080 failure: timed out (handshake) +[PROXY] 10.124.1.208:1080 health OK (2103.1 ms) [Italy] +[PROXY] 10.124.0.202:1080 health OK (5117.6 ms) [Hong Kong] +[PROXY] 10.124.0.201:1080 health OK (2195.0 ms) [Italy] +[PROXY] 10.124.0.200:1080 health OK (2223.4 ms) [Italy] +[PROXY] 10.124.1.67:1080 health OK (2359.2 ms) [Italy] +[PROXY] 10.124.1.68:1080 health OK (2371.9 ms) [Italy] +[PROXY] 10.124.1.24:1080 failure: timed out (handshake) +[PROXY] 10.124.1.237:1080 failure: timed out (handshake) +[PROXY] 10.124.1.237:1080 health failed: 10.124.1.237:1080 handshake failed: timed out +[PROXY] 10.124.0.230:1080 target error: Connection refused by target host +[PROXY] 10.124.0.166:1080 failure: timed out (handshake) +[PROXY] 10.124.1.163:1080 failure: timed out (handshake) +[PROXY] 10.124.2.2:1080 failure: timed out (handshake) +[PROXY] 10.124.1.66:1080 failure: timed out (handshake) +[PROXY] 10.64.0.1:1080 health OK (1876.0 ms) [Sweden] +[PROXY] 10.124.1.78:1080 target error: Connection refused by target host +[PROXY] 10.124.1.177:1080 health OK (4121.6 ms) [Japan] +[PROXY] 10.124.1.83:1080 target error: Connection refused by target host +[PROXY] 10.124.2.66:1080 health OK (2287.5 ms) [Albania] +[PROXY] 10.124.2.35:1080 health OK (2211.1 ms) [Austria] +[PROXY] 10.124.2.67:1080 health OK (2277.3 ms) [Albania] +[PROXY] 10.124.1.178:1080 health OK (3998.7 ms) [Japan] +[PROXY] 10.124.2.36:1080 health OK (2162.9 ms) [Austria] +[PROXY] 10.124.2.37:1080 health OK (2153.9 ms) [Austria] +[PROXY] 10.124.1.179:1080 health OK (4076.2 ms) [Japan] +[PROXY] 10.124.1.180:1080 health OK (4045.4 ms) [Japan] +[PROXY] 10.124.1.218:1080 health OK (4077.1 ms) [Japan] +[PROXY] 10.124.1.73:1080 health OK (2142.0 ms) [Austria] +[PROXY] 10.124.1.217:1080 health OK (3876.9 ms) [Japan] +[PROXY] 10.124.0.107:1080 health OK (3914.9 ms) [Japan] +[PROXY] 10.124.1.74:1080 health OK (2129.6 ms) [Austria] +[PROXY] 10.124.0.161:1080 health OK (4191.9 ms) [Japan] +[PROXY] 10.124.1.250:1080 failure: timed out (handshake) +[PROXY] 10.124.1.183:1080 failure: timed out (handshake) +[PROXY] 10.124.1.214:1080 failure: timed out (handshake) +[PROXY] 10.124.0.116:1080 failure: timed out (handshake) +[PROXY] 10.124.0.8:1080 failure: timed out (handshake) +[PROXY] 10.8.0.1:1080 failure: timed out (connect) +[PROXY] 10.8.0.1:1080 health failed: 10.8.0.1:1080 connection failed: timed out +[PROXY] 10.124.1.55:1080 health OK (3821.2 ms) [Australia] +[PROXY] 10.124.0.99:1080 health OK (4124.4 ms) [Australia] +[PROXY] 10.124.0.156:1080 health OK (4061.8 ms) [Australia] +[PROXY] 10.124.1.54:1080 health OK (3956.7 ms) [Australia] +[PROXY] 10.124.1.57:1080 health OK (3860.1 ms) [Australia] +[PROXY] 10.124.0.220:1080 health OK (4187.4 ms) [Australia] +[PROXY] 10.124.0.221:1080 health OK (4193.3 ms) [Australia] +[PROXY] 10.124.0.37:1080 health OK (4175.8 ms) [Australia] +[PROXY] 10.124.0.36:1080 health OK (4342.8 ms) [Australia] +[PROXY] 10.124.1.20:1080 failure: timed out (handshake) +[PROXY] 10.124.0.214:1080 health OK (3993.6 ms) [Australia] +[PROXY] 10.124.0.42:1080 health OK (4282.8 ms) [Australia] +[PROXY] 10.124.0.215:1080 health OK (4084.7 ms) [Australia] +[PROXY] 10.124.0.141:1080 health OK (4068.9 ms) [Australia] +[PROXY] 10.124.0.211:1080 health OK (3989.9 ms) [Australia] +[PROXY] 10.124.2.70:1080 health OK (4256.7 ms) [Australia] +[PROXY] 10.124.0.124:1080 target error: Host unreachable +[PROXY] 10.124.2.28:1080 target error: Host unreachable +[PROXY] 10.124.2.42:1080 health OK (2123.8 ms) [Belgium] +[PROXY] 10.124.2.43:1080 health OK (2129.5 ms) [Belgium] +[PROXY] 10.124.2.44:1080 health OK (2097.2 ms) [Belgium] +[PROXY] 10.124.0.125:1080 failure: timed out (handshake) +[PROXY] 10.124.0.225:1080 health OK (2279.2 ms) [Bulgaria] +[PROXY] 10.124.0.226:1080 health OK (2273.0 ms) [Bulgaria] +[PROXY] 10.124.0.203:1080 target error: Host unreachable +[PROXY] 10.124.1.57:1080 target error: Connection refused by target host +[PROXY] 10.124.0.230:1080 target error: Connection refused by target host +[PROXY] 10.124.0.118:1080 target error: Connection refused by target host +[PROXY] 10.124.1.84:1080 target error: Connection refused by target host +[PROXY] 10.124.0.10:1080 health OK (3413.4 ms) [Brazil] +[PROXY] 10.124.2.71:1080 health OK (4234.5 ms) [Australia] +[PROXY] 10.124.0.12:1080 health OK (3367.2 ms) [Brazil] +[PROXY] 10.124.2.72:1080 health OK (4269.3 ms) [Australia] +[PROXY] 10.124.1.28:1080 target error: Connection refused by target host +[PROXY] 10.124.2.73:1080 health OK (4336.2 ms) [Australia] +[PROXY] 10.124.2.31:1080 health OK (3605.1 ms) [Brazil] +[PROXY] 10.124.0.231:1080 health OK (2802.1 ms) [Canada] +[PROXY] 10.124.2.32:1080 health OK (3652.3 ms) [Brazil] +[PROXY] 10.124.2.2:1080 health OK (3502.9 ms) [Brazil] +[PROXY] 10.124.0.233:1080 health OK (2671.1 ms) [Canada] +[PROXY] 10.124.0.232:1080 health OK (2678.3 ms) [Canada] +[PROXY] 10.124.0.234:1080 health OK (2643.3 ms) [Canada] +[PROXY] 10.124.2.21:1080 health OK (3508.0 ms) [Brazil] +[PROXY] 10.124.2.52:1080 health OK (3560.7 ms) [Brazil] +[PROXY] 10.124.1.35:1080 failure: timed out (handshake) +[PROXY] 10.124.0.168:1080 health OK (2681.5 ms) [Canada] +[PROXY] 10.124.0.35:1080 failure: timed out (handshake) +[PROXY] 10.124.0.171:1080 health OK (2707.9 ms) [Canada] +[PROXY] 10.124.1.55:1080 failure: timed out (handshake) +[PROXY] 10.124.0.121:1080 failure: timed out (handshake) +[PROXY] 10.124.1.235:1080 health OK (2744.3 ms) [Canada] +[PROXY] 10.124.0.81:1080 health OK (2677.3 ms) [Canada] +[PROXY] 10.124.1.236:1080 health OK (2768.1 ms) [Canada] +[PROXY] 10.124.1.110:1080 health OK (2726.2 ms) [Canada] +[PROXY] 10.124.0.222:1080 failure: timed out (handshake) +[PROXY] 10.124.1.111:1080 health OK (2741.5 ms) [Canada] +[PROXY] 10.124.1.112:1080 health OK (2734.4 ms) [Canada] +[PROXY] 10.124.1.67:1080 failure: timed out (handshake) +[PROXY] 10.124.0.121:1080 health OK (2065.6 ms) [Switzerland] +[PROXY] 10.124.1.113:1080 health OK (2716.0 ms) [Canada] +[PROXY] 10.124.0.214:1080 target error: Connection refused by target host +[PROXY] 10.124.1.114:1080 health OK (2681.8 ms) [Canada] +[PROXY] 10.124.1.115:1080 health OK (2688.2 ms) [Canada] +[PROXY] 10.124.0.71:1080 health OK (3079.3 ms) [Canada] +[PROXY] 10.124.0.13:1080 health OK (3105.2 ms) [Canada] +[PROXY] 10.124.1.66:1080 health OK (3104.5 ms) [Canada] +[PROXY] 10.124.1.65:1080 health OK (3179.7 ms) [Canada] +[PROXY] 10.124.0.174:1080 health OK (3055.8 ms) [Canada] +[PROXY] 10.124.0.178:1080 health OK (3149.3 ms) [Canada] +[PROXY] 10.124.0.122:1080 health OK (2124.6 ms) [Switzerland] +[PROXY] 10.124.0.123:1080 health OK (2119.2 ms) [Switzerland] +[PROXY] 10.124.0.124:1080 health OK (2100.7 ms) [Switzerland] +[PROXY] 10.124.0.125:1080 health OK (2076.0 ms) [Switzerland] +[PROXY] 10.124.0.241:1080 health OK (2109.3 ms) [Switzerland] +[PROXY] 10.124.0.105:1080 health OK (2152.8 ms) [Switzerland] +[PROXY] 10.124.0.106:1080 health OK (2102.8 ms) [Switzerland] +[PROXY] 10.124.1.213:1080 health OK (2157.4 ms) [Switzerland] +[PROXY] 10.124.1.214:1080 health OK (2118.2 ms) [Switzerland] +[PROXY] 10.124.1.216:1080 health OK (2075.6 ms) [Switzerland] +[PROXY] 10.124.2.52:1080 failure: timed out (handshake) +[PROXY] 10.124.2.6:1080 health OK (2145.4 ms) [Switzerland] +[PROXY] 10.124.2.7:1080 health OK (2091.5 ms) [Switzerland] +[PROXY] 10.124.2.12:1080 health OK (2327.8 ms) [Switzerland] +[PROXY] 10.124.1.16:1080 failure: timed out (handshake) +[PROXY] 10.124.2.8:1080 health OK (2185.4 ms) [Switzerland] +[PROXY] 10.124.1.238:1080 failure: timed out (handshake) +[PROXY] 10.124.1.215:1080 health OK (2925.8 ms) [Switzerland] +[PROXY] 10.124.2.9:1080 health OK (2127.0 ms) [Switzerland] +[PROXY] 10.124.2.14:1080 failure: timed out (handshake) +[PROXY] 10.124.2.10:1080 health OK (2207.2 ms) [Switzerland] +[PROXY] 10.124.2.11:1080 health OK (2206.5 ms) [Switzerland] +[PROXY] 10.124.1.18:1080 failure: timed out (handshake) +[PROXY] 10.124.1.30:1080 target error: Host unreachable +[PROXY] 10.124.1.70:1080 target error: Connection refused by target host +[PROXY] 10.124.2.34:1080 health OK (2172.1 ms) [Czech Republic] +[PROXY] 10.124.1.83:1080 health OK (2473.1 ms) [Cyprus] +[PROXY] 10.124.1.84:1080 health OK (2455.7 ms) [Cyprus] +[PROXY] 10.124.1.164:1080 failure: timed out (handshake) +[PROXY] 10.124.0.7:1080 health OK (1946.3 ms) [Germany] +[PROXY] 10.124.2.57:1080 health OK (2091.2 ms) [Czech Republic] +[PROXY] 10.124.0.8:1080 health OK (1906.7 ms) [Germany] +[PROXY] 10.124.2.58:1080 health OK (2085.5 ms) [Czech Republic] +[PROXY] 10.124.0.171:1080 target error: Connection refused by target host +[PROXY] 10.124.0.9:1080 health OK (1983.1 ms) [Germany] +[PROXY] 10.124.0.179:1080 health OK (1920.6 ms) [Germany] +[PROXY] 10.124.0.55:1080 health OK (1941.9 ms) [Germany] +[PROXY] 10.124.1.20:1080 health OK (3619.1 ms) [Chile] +[PROXY] 10.124.0.216:1080 health OK (3374.4 ms) [Colombia] +[PROXY] 10.124.1.21:1080 health OK (3701.4 ms) [Chile] +[PROXY] 10.124.0.217:1080 health OK (3445.3 ms) [Colombia] +[PROXY] 10.124.0.239:1080 health OK (1958.9 ms) [Germany] +[PROXY] 10.124.0.196:1080 health OK (1959.0 ms) [Germany] +[PROXY] 10.124.0.91:1080 health OK (2088.0 ms) [Germany] +[PROXY] 10.124.0.30:1080 health OK (2222.8 ms) [Germany] +[PROXY] 10.124.1.23:1080 health OK (2048.1 ms) [Germany] +[PROXY] 10.124.0.92:1080 health OK (2234.5 ms) [Germany] +[PROXY] 10.124.1.26:1080 health OK (2011.8 ms) [Germany] +[PROXY] 10.124.1.27:1080 health OK (2047.7 ms) [Germany] +[PROXY] 10.124.0.222:1080 health OK (2057.1 ms) [Germany] +[PROXY] 10.124.1.24:1080 health OK (2039.5 ms) [Germany] +[PROXY] 10.124.0.101:1080 health OK (2809.0 ms) [Germany] +[PROXY] 10.124.1.25:1080 health OK (2080.1 ms) [Germany] +[PROXY] 10.124.0.240:1080 health OK (1965.7 ms) [Germany] +[PROXY] 10.124.0.228:1080 failure: timed out (handshake) +[PROXY] 10.124.0.54:1080 health OK (2836.5 ms) [Germany] +[PROXY] 10.124.0.53:1080 health OK (2954.6 ms) [Germany] +[PROXY] 10.124.1.239:1080 health OK (2168.8 ms) [Germany] +[PROXY] 10.124.1.238:1080 health OK (2169.3 ms) [Germany] +[PROXY] 10.124.1.110:1080 target error: Host unreachable +[PROXY] 10.124.2.54:1080 failure: timed out (handshake) +[PROXY] 10.124.1.243:1080 health OK (2948.8 ms) [Germany] +[PROXY] 10.124.2.31:1080 failure: timed out (handshake) +[PROXY] 10.124.1.241:1080 health OK (2133.5 ms) [Germany] +[PROXY] 10.124.1.240:1080 health OK (2141.9 ms) [Germany] +[PROXY] 10.124.1.242:1080 health OK (2046.1 ms) [Germany] +[PROXY] 10.124.1.30:1080 health OK (2026.9 ms) [Germany] +[PROXY] 10.124.1.31:1080 health OK (2027.4 ms) [Germany] +[PROXY] 10.124.1.33:1080 health OK (2052.3 ms) [Germany] +[PROXY] 10.124.1.32:1080 health OK (2062.6 ms) [Germany] +[PROXY] 10.124.1.250:1080 health OK (2073.6 ms) [Germany] +[PROXY] 10.124.0.225:1080 failure: timed out (handshake) +[PROXY] 10.124.0.64:1080 health OK (1920.7 ms) [Denmark] +[PROXY] 10.124.1.251:1080 health OK (2099.2 ms) [Germany] +[PROXY] 10.124.1.252:1080 health OK (2053.2 ms) [Germany] +[PROXY] 10.124.0.230:1080 failure: timed out (handshake) +[PROXY] 10.124.0.17:1080 health OK (1938.2 ms) [Denmark] +[PROXY] 10.124.0.138:1080 health OK (1903.2 ms) [Estonia] +[PROXY] 10.124.0.229:1080 health OK (2010.8 ms) [Denmark] +[PROXY] 10.124.0.230:1080 health OK (1986.1 ms) [Denmark] +[PROXY] 10.124.1.222:1080 failure: timed out (handshake) +[PROXY] 10.124.1.65:1080 target error: Connection refused by target host +[PROXY] 10.124.0.139:1080 health OK (1920.5 ms) [Estonia] +[PROXY] 10.124.0.140:1080 health OK (1943.6 ms) [Estonia] +[PROXY] 10.124.0.9:1080 failure: timed out (handshake) +[PROXY] 10.124.1.18:1080 failure: timed out (handshake) +[PROXY] 10.124.1.74:1080 target error: Host unreachable +[PROXY] 10.124.0.252:1080 health OK (2305.0 ms) [Spain] +[PROXY] 10.124.1.70:1080 health OK (2286.8 ms) [Spain] +[PROXY] 10.124.1.69:1080 health OK (2344.4 ms) [Spain] +[PROXY] 10.124.1.222:1080 health OK (2233.2 ms) [Spain] +[PROXY] 10.124.1.223:1080 health OK (2243.8 ms) [Spain] +[PROXY] 10.124.2.28:1080 health OK (2267.5 ms) [Spain] +[PROXY] 10.124.2.34:1080 failure: timed out (handshake) +[PROXY] 10.124.2.47:1080 health OK (2236.2 ms) [Spain] +[PROXY] 10.124.0.239:1080 failure: timed out (handshake) +[PROXY] 10.124.0.21:1080 health OK (2004.3 ms) [Finland] +[PROXY] 10.124.0.111:1080 health OK (1947.6 ms) [Finland] +[PROXY] 10.124.0.112:1080 health OK (1908.2 ms) [Finland] +[PROXY] 10.124.2.53:1080 health OK (1935.6 ms) [Finland] +[PROXY] 10.124.1.218:1080 target error: Connection refused by target host +[PROXY] 10.124.1.3:1080 health OK (2455.0 ms) [Spain] +[PROXY] 10.124.1.2:1080 health OK (2459.9 ms) [Spain] +[PROXY] 10.124.2.54:1080 health OK (1905.5 ms) [Finland] +[PROXY] 10.124.2.67:1080 failure: timed out (handshake) +[PROXY] 10.124.1.83:1080 failure: timed out (handshake) +[PROXY] 10.124.2.55:1080 health OK (1918.3 ms) [Finland] +[PROXY] 10.124.0.253:1080 health OK (3884.1 ms) [Spain] +[PROXY] 10.124.0.123:1080 failure: timed out (handshake) +[PROXY] 10.124.2.56:1080 health OK (1963.0 ms) [Finland] +[PROXY] 10.124.0.161:1080 failure: timed out (handshake) +[PROXY] 10.124.0.116:1080 health OK (2068.0 ms) [France] +[PROXY] 10.124.0.45:1080 health OK (2163.6 ms) [France] +[PROXY] 10.124.1.64:1080 health OK (2188.6 ms) [France] +[PROXY] 10.124.1.183:1080 health OK (2164.3 ms) [France] +[PROXY] 10.124.0.117:1080 health OK (2053.1 ms) [France] +[PROXY] 10.124.0.118:1080 health OK (2050.9 ms) [France] +[PROXY] 10.124.0.119:1080 health OK (2095.2 ms) [France] +[PROXY] 10.124.0.120:1080 health OK (2093.9 ms) [France] +[PROXY] 10.124.0.238:1080 health OK (2025.9 ms) [France] +[PROXY] 10.124.0.142:1080 health OK (2045.8 ms) [France] +[PROXY] 10.124.1.63:1080 health OK (2537.5 ms) [France] +[PROXY] 10.124.0.223:1080 health OK (2237.4 ms) [France] +[PROXY] 10.124.1.68:1080 failure: timed out (handshake) +[PROXY] 10.124.0.254:1080 target error: Host unreachable +[PROXY] 10.124.0.224:1080 health OK (2218.3 ms) [France] +[PROXY] 10.124.1.78:1080 health OK (2195.4 ms) [France] +[PROXY] 10.124.1.79:1080 health OK (2177.3 ms) [France] +[PROXY] 10.124.0.246:1080 health OK (2245.4 ms) [UK] +[PROXY] 10.124.0.59:1080 health OK (2075.1 ms) [UK] +[PROXY] 10.124.1.16:1080 health OK (2091.8 ms) [UK] +[PROXY] 10.124.1.17:1080 health OK (2136.3 ms) [UK] +[PROXY] 10.124.1.18:1080 health OK (2117.4 ms) [UK] +[PROXY] 10.124.0.247:1080 health OK (2199.3 ms) [UK] +[PROXY] 10.124.1.19:1080 health OK (2043.8 ms) [UK] +[PROXY] 10.124.1.62:1080 health OK (2036.1 ms) [UK] +[PROXY] 10.124.1.28:1080 health OK (2037.2 ms) [UK] +[PROXY] 10.124.1.34:1080 health OK (2096.8 ms) [UK] +[PROXY] 10.124.0.241:1080 failure: timed out (handshake) +[PROXY] 10.124.0.105:1080 failure: timed out (handshake) +[PROXY] 10.124.1.35:1080 health OK (2077.4 ms) [UK] +[PROXY] 10.124.1.91:1080 health OK (2086.9 ms) [UK] +[PROXY] 10.124.1.164:1080 health OK (2055.9 ms) [UK] +[PROXY] 10.124.1.31:1080 target error: Connection refused by target host +[PROXY] 10.124.1.249:1080 health OK (2210.1 ms) [UK] +[PROXY] 10.124.1.33:1080 target error: Connection refused by target host +[PROXY] 10.124.1.247:1080 health OK (2162.1 ms) [UK] +[PROXY] 10.124.0.237:1080 health OK (2156.9 ms) [UK] +[PROXY] 10.124.2.71:1080 target error: Connection refused by target host +[PROXY] 10.124.2.20:1080 health OK (2194.1 ms) [UK] +[PROXY] 10.124.2.13:1080 health OK (2235.9 ms) [UK] +[PROXY] 10.124.0.202:1080 target error: Connection refused by target host +[PROXY] 10.124.2.16:1080 health OK (2208.9 ms) [UK] +[PROXY] 10.124.2.15:1080 health OK (2209.5 ms) [UK] +[PROXY] 10.124.2.18:1080 health OK (2210.6 ms) [UK] +[PROXY] 10.124.2.17:1080 health OK (2214.3 ms) [UK] +[PROXY] 10.124.2.69:1080 health OK (2197.6 ms) [UK] +[PROXY] 10.124.2.19:1080 health OK (2198.4 ms) [UK] +[PROXY] 10.124.1.162:1080 health OK (2142.0 ms) [UK] +[PROXY] 10.124.2.14:1080 health OK (2359.6 ms) [UK] +[PROXY] 10.124.1.163:1080 health OK (2185.4 ms) [UK] +[PROXY] 10.124.0.159:1080 health OK (2285.9 ms) [Greece] +[PROXY] 10.124.0.166:1080 health OK (2279.8 ms) [Greece] +[PROXY] 10.124.2.10:1080 failure: timed out (handshake) +[PROXY] 10.124.0.119:1080 failure: timed out (handshake) +[PROXY] 10.124.1.78:1080 failure: timed out (handshake) +[PROXY] 10.124.0.203:1080 target error: Connection refused by target host +[PROXY] 10.124.1.177:1080 failure: timed out (handshake) +[PROXY] 10.124.2.53:1080 target error: Connection refused by target host +[PROXY] 10.124.0.35:1080 health OK (2193.7 ms) [Croatia] +[PROXY] 10.124.2.56:1080 failure: timed out (handshake) +[PROXY] 10.124.0.74:1080 health OK (2162.3 ms) [Croatia] +[PROXY] 10.124.0.106:1080 failure: timed out (handshake) +[PROXY] 10.124.0.227:1080 health OK (2177.0 ms) [Hungary] +[PROXY] 10.124.0.228:1080 health OK (2192.8 ms) [Hungary] +[PROXY] 10.124.0.137:1080 health OK (2152.1 ms) [Hungary] +[PROXY] 10.124.0.135:1080 health OK (2194.0 ms) [Hungary] +[PROXY] 10.124.0.116:1080 failure: timed out (handshake) +[PROXY] 10.124.2.35:1080 failure: timed out (handshake) +[PROXY] 10.124.1.58:1080 health OK (2234.2 ms) [Ireland] +[PROXY] 10.124.1.59:1080 health OK (2223.2 ms) [Ireland] +[PROXY] 10.124.0.174:1080 failure: timed out (handshake) +[PROXY] 10.124.2.5:1080 health OK (2506.1 ms) [Israel] +[PROXY] 10.124.1.252:1080 failure: timed out (handshake) +[PROXY] 10.124.0.202:1080 health OK (3535.3 ms) [Hong Kong] +[PROXY] 10.124.2.25:1080 health OK (2509.7 ms) [Israel] +[PROXY] 10.124.1.238:1080 failure: timed out (handshake) +[PROXY] 10.124.2.26:1080 health OK (2559.6 ms) [Israel] +[PROXY] 10.124.2.72:1080 target error: Host unreachable +[PROXY] 10.124.0.101:1080 target error: Connection refused by target host +[PROXY] 10.124.0.254:1080 health OK (3929.3 ms) [Indonesia] +[PROXY] 10.124.1.206:1080 health OK (2123.9 ms) [Italy] +[PROXY] 10.124.1.1:1080 health OK (4148.1 ms) [Indonesia] +[PROXY] 10.124.1.207:1080 health OK (2170.5 ms) [Italy] +[PROXY] 10.124.1.208:1080 health OK (2143.7 ms) [Italy] +[PROXY] 10.124.0.201:1080 health OK (2221.8 ms) [Italy] +[PROXY] 10.124.0.200:1080 health OK (2259.0 ms) [Italy] +[PROXY] 10.124.1.67:1080 health OK (2420.7 ms) [Italy] +[PROXY] 10.124.1.68:1080 health OK (2348.2 ms) [Italy] +[PROXY] 10.124.1.112:1080 failure: timed out (handshake) +[PROXY] 10.124.1.2:1080 failure: timed out (handshake) +[PROXY] 10.124.0.203:1080 health OK (5443.1 ms) [Hong Kong] +[PROXY] 10.124.2.54:1080 failure: timed out (handshake) +[PROXY] 10.124.1.113:1080 failure: timed out (handshake) +[PROXY] 10.124.2.25:1080 target error: Connection refused by target host +[PROXY] 10.124.1.237:1080 failure: timed out (handshake) +[PROXY] 10.124.1.237:1080 health failed: 10.124.1.237:1080 handshake failed: timed out +[PROXY] 10.124.2.13:1080 failure: timed out (handshake) +[PROXY] 10.124.0.138:1080 target error: Connection refused by target host +[PROXY] 10.124.1.177:1080 health OK (4060.9 ms) [Japan] +[PROXY] 10.124.2.7:1080 target error: Connection refused by target host +[PROXY] 10.124.1.111:1080 failure: timed out (handshake) +[PROXY] 10.124.1.178:1080 health OK (4053.0 ms) [Japan] +[PROXY] 10.124.1.179:1080 health OK (4022.0 ms) [Japan] +[PROXY] 10.124.2.36:1080 target error: Connection refused by target host +[PROXY] 10.124.1.180:1080 health OK (4042.9 ms) [Japan] +[PROXY] 10.124.1.68:1080 target error: Connection refused by target host +[PROXY] 10.124.1.218:1080 health OK (4046.8 ms) [Japan] +[PROXY] 10.124.1.162:1080 target error: Connection refused by target host +[PROXY] 10.124.1.237:1080 health OK (3468.4 ms) [Hong Kong] +[PROXY] 10.124.1.216:1080 failure: timed out (handshake) +[PROXY] 10.124.1.217:1080 health OK (3945.6 ms) [Japan] +[PROXY] 10.124.0.107:1080 health OK (3944.9 ms) [Japan] +[PROXY] 10.124.1.251:1080 target error: Connection refused by target host +[PROXY] 10.124.0.161:1080 health OK (4144.8 ms) [Japan] +[PROXY] 10.124.2.26:1080 failure: timed out (handshake) +[PROXY] 10.124.1.33:1080 failure: timed out (handshake) +[PROXY] 10.124.0.122:1080 target error: Connection refused by target host +[PROXY] 10.124.1.237:1080 health OK (3432.9 ms) [Hong Kong] +[PROXY] 10.8.0.1:1080 failure: timed out (connect) +[PROXY] 10.8.0.1:1080 health failed: 10.8.0.1:1080 connection failed: timed out +[PROXY] 10.124.0.216:1080 target error: Host unreachable +[PROXY] 10.124.2.69:1080 target error: Connection refused by target host +[PROXY] 10.124.0.99:1080 target error: Connection refused by target host +[PROXY] 10.124.1.64:1080 failure: timed out (handshake) +[PROXY] 10.124.0.118:1080 failure: timed out (handshake) +[PROXY] 10.124.0.42:1080 failure: timed out (handshake) +[PROXY] 10.124.1.243:1080 failure: timed out (handshake) +[PROXY] 10.124.1.63:1080 failure: timed out (handshake) +[PROXY] 10.124.2.54:1080 failure: timed out (handshake) +[PROXY] 10.124.2.21:1080 failure: timed out (handshake) +[PROXY] 10.124.0.166:1080 failure: timed out (handshake) +[PROXY] 10.124.1.215:1080 failure: timed out (handshake) +[PROXY] 10.124.1.216:1080 target error: Connection refused by target host +[PROXY] 10.124.0.252:1080 failure: timed out (handshake) +[PROXY] 10.124.0.226:1080 failure: timed out (handshake) +[PROXY] 10.124.0.202:1080 failure: timed out (handshake) +[PROXY] 10.124.2.7:1080 failure: timed out (handshake) +[PROXY] 10.124.0.30:1080 failure: timed out (handshake) +[PROXY] 10.8.0.1:1080 failure: timed out (connect) +[PROXY] 10.8.0.1:1080 quarantined for 5.0s after 3 failures +[PROXY] 10.8.0.1:1080 health failed: 10.8.0.1:1080 connection failed: timed out +[PROXY] 10.124.1.25:1080 failure: timed out (handshake) +[PROXY] 10.124.2.13:1080 failure: timed out (handshake) +[PROXY] 10.124.0.159:1080 target error: Connection refused by target host +[PROXY] 10.124.1.2:1080 target error: Connection refused by target host +[PROXY] 10.124.1.180:1080 failure: timed out (handshake) +[PROXY] 10.124.2.70:1080 failure: timed out (handshake) +[PROXY] 10.124.2.10:1080 failure: timed out (handshake) +[PROXY] 10.124.1.242:1080 failure: timed out (handshake) +[PROXY] 10.124.0.196:1080 failure: timed out (handshake) +[PROXY] 10.124.1.19:1080 failure: timed out (handshake) +[PROXY] 10.124.0.168:1080 failure: timed out (handshake) +[PROXY] 10.124.1.32:1080 target error: Connection refused by target host +[PROXY] 10.124.0.238:1080 target error: Host unreachable +[PROXY] 10.124.0.111:1080 target error: Host unreachable +[PROXY] 10.124.1.214:1080 failure: timed out (handshake) +[PROXY] 10.124.0.217:1080 failure: timed out (handshake) +[PROXY] 10.124.1.163:1080 failure: timed out (handshake) +[PROXY] 10.124.0.106:1080 failure: timed out (handshake) +[PROXY] 10.124.0.71:1080 target error: Connection refused by target host +[PROXY] 10.124.0.227:1080 failure: timed out (handshake) +[PROXY] 10.124.1.164:1080 target error: Host unreachable +[PROXY] 10.124.1.27:1080 failure: timed out (handshake) +[PROXY] 10.124.1.31:1080 failure: timed out (handshake) +[PROXY] 10.124.0.45:1080 failure: timed out (handshake) +[PROXY] 10.8.0.1:1080 failure: timed out (connect) +[PROXY] 10.8.0.1:1080 quarantined for 10.0s after 4 failures +[PROXY] 10.8.0.1:1080 health failed: 10.8.0.1:1080 connection failed: timed out +[PROXY] 10.124.2.71:1080 failure: timed out (handshake) +[PROXY] 10.124.0.12:1080 failure: timed out (handshake) +[PROXY] 10.124.0.53:1080 failure: timed out (handshake) +[PROXY] 10.124.1.26:1080 failure: timed out (handshake) +[PROXY] 10.124.2.2:1080 failure: timed out (handshake) +[PROXY] 10.124.1.30:1080 failure: timed out (handshake) +[PROXY] 10.124.0.238:1080 failure: timed out (handshake) +[PROXY] 10.124.0.178:1080 target error: Connection refused by target host +[PROXY] 10.124.1.64:1080 target error: Host unreachable +[PROXY] 10.124.2.69:1080 target error: Connection refused by target host +[PROXY] 10.124.1.66:1080 target error: Connection refused by target host +[PROXY] 10.124.2.11:1080 failure: timed out (handshake) +[PROXY] 10.124.1.62:1080 target error: Connection refused by target host +[PROXY] 10.124.0.91:1080 failure: timed out (handshake) +[PROXY] 10.124.2.66:1080 failure: timed out (handshake) +[PROXY] 10.124.0.111:1080 failure: timed out (handshake) +[PROXY] 10.124.0.120:1080 failure: timed out (handshake) +[PROXY] 10.124.2.53:1080 target error: Host unreachable +[PROXY] 10.124.0.71:1080 target error: Connection refused by target host +[PROXY] 10.124.1.63:1080 failure: timed out (handshake) +[PROXY] 10.124.1.28:1080 failure: timed out (handshake) +[PROXY] 10.124.0.64:1080 failure: timed out (handshake) +[PROXY] 10.124.0.156:1080 failure: timed out (handshake) +[PROXY] 10.124.1.59:1080 target error: Connection refused by target host +[PROXY] 10.124.2.9:1080 target error: Connection refused by target host +[PROXY] 10.124.1.237:1080 failure: timed out (handshake) +[PROXY] 10.124.2.35:1080 failure: timed out (handshake) +[PROXY] 10.124.2.15:1080 failure: timed out (handshake) +[PROXY] 10.124.1.216:1080 failure: timed out (handshake) +[PROXY] 10.124.0.138:1080 failure: timed out (handshake) +[PROXY] 10.124.0.217:1080 failure: timed out (handshake) +[PROXY] 10.124.0.119:1080 failure: timed out (handshake) +[PROXY] 10.124.2.69:1080 target error: Host unreachable +[PROXY] 10.124.2.7:1080 target error: Connection refused by target host +[PROXY] 10.124.0.45:1080 failure: timed out (handshake) +[PROXY] 10.124.0.92:1080 target error: Connection refused by target host +[PROXY] 10.124.1.91:1080 target error: Connection refused by target host +[PROXY] 10.124.0.35:1080 target error: Connection refused by target host +[PROXY] 10.124.2.28:1080 failure: timed out (handshake) +[PROXY] 10.124.1.16:1080 failure: timed out (handshake) +[PROXY] 10.124.0.71:1080 target error: Connection refused by target host +[PROXY] 10.124.2.70:1080 failure: timed out (handshake) +[PROXY] 10.124.1.208:1080 failure: timed out (handshake) +[PROXY] 10.124.0.223:1080 failure: timed out (handshake) +[PROXY] 10.124.1.25:1080 target error: Connection refused by target host +[PROXY] 10.124.0.101:1080 failure: timed out (handshake) +[PROXY] 10.124.0.42:1080 target error: Host unreachable +[PROXY] 10.124.0.221:1080 failure: timed out (handshake) +[PROXY] 10.124.1.206:1080 failure: timed out (handshake) +[PROXY] 10.124.0.99:1080 failure: timed out (handshake) +[PROXY] 10.124.1.222:1080 target error: Connection refused by target host +[PROXY] 10.124.0.161:1080 target error: Connection refused by target host +[PROXY] 10.124.0.118:1080 failure: timed out (handshake) +[PROXY] 10.124.2.44:1080 failure: timed out (handshake) +[PROXY] 10.124.2.9:1080 failure: timed out (handshake) +[PROXY] 10.124.2.12:1080 failure: timed out (handshake) +[PROXY] 10.124.0.228:1080 failure: timed out (handshake) +[PROXY] 10.124.1.27:1080 failure: timed out (handshake) +[PROXY] 10.8.0.1:1080 failure: timed out (connect) +[PROXY] 10.8.0.1:1080 quarantined for 20.0s after 5 failures +[PROXY] 10.8.0.1:1080 disabled for 300s (6 failures without success) +[PROXY] 10.8.0.1:1080 health failed: 10.8.0.1:1080 connection failed: timed out +[PROXY] 10.124.1.237:1080 failure: timed out (handshake) +[PROXY] 10.124.0.253:1080 target error: Connection refused by target host +[PROXY] 10.124.1.183:1080 target error: Connection refused by target host +[PROXY] 10.124.0.123:1080 target error: Host unreachable +[PROXY] 10.124.2.56:1080 failure: timed out (handshake) +[PROXY] 10.124.1.28:1080 failure: timed out (handshake) +[PROXY] 10.124.2.6:1080 failure: timed out (handshake) +[PROXY] 10.124.1.238:1080 failure: timed out (handshake) +[PROXY] 10.124.0.171:1080 failure: timed out (handshake) +[PROXY] 10.124.0.121:1080 failure: timed out (handshake) +[PROXY] 10.124.2.21:1080 failure: timed out (handshake) +[PROXY] 10.124.0.105:1080 failure: timed out (handshake) +[PROXY] 10.124.2.26:1080 failure: timed out (handshake) \ No newline at end of file diff --git a/mcsmartscan/mullvadproxyips.txt b/mcsmartscan/mullvadproxyips.txt index f89ce46..3d59273 100644 --- a/mcsmartscan/mullvadproxyips.txt +++ b/mcsmartscan/mullvadproxyips.txt @@ -1,479 +1,178 @@ -10.124.0.2 -10.124.0.4 -10.124.0.6 -10.124.0.7 -10.124.0.8 -10.124.0.9 -10.124.0.10 -10.124.0.12 -10.124.0.13 -10.124.0.14 -10.124.0.16 -10.124.0.17 -10.124.0.18 -10.124.0.19 -10.124.0.20 -10.124.0.21 -10.124.0.22 -10.124.0.23 -10.124.0.24 -10.124.0.25 -10.124.0.26 -10.124.0.27 -10.124.0.28 -10.124.0.29 -10.124.0.30 -10.124.0.33 -10.124.0.35 +10.124.2.66 +10.124.2.67 +10.124.2.35 +10.124.2.36 +10.124.2.37 +10.124.1.73 +10.124.1.74 +10.124.0.99 +10.124.0.156 +10.124.0.220 +10.124.0.221 +10.124.1.54 +10.124.1.55 +10.124.1.57 10.124.0.36 10.124.0.37 -10.124.0.38 -10.124.0.39 -10.124.0.40 -10.124.0.41 10.124.0.42 -10.124.0.43 -10.124.0.44 -10.124.0.45 -10.124.0.46 -10.124.0.48 -10.124.0.49 -10.124.0.50 -10.124.0.52 -10.124.0.53 -10.124.0.54 -10.124.0.55 -10.124.0.56 -10.124.0.57 -10.124.0.58 -10.124.0.59 -10.124.0.61 -10.124.0.62 -10.124.0.64 -10.124.0.65 -10.124.0.71 -10.124.0.72 -10.124.0.73 -10.124.0.74 -10.124.0.75 -10.124.0.76 -10.124.0.77 -10.124.0.79 -10.124.0.81 -10.124.0.82 -10.124.0.83 -10.124.0.85 -10.124.0.86 -10.124.0.87 -10.124.0.88 -10.124.0.89 -10.124.0.90 -10.124.0.91 -10.124.0.92 -10.124.0.93 -10.124.0.94 -10.124.0.96 -10.124.0.97 -10.124.0.98 -10.124.0.99 -10.124.0.100 -10.124.0.101 -10.124.0.102 -10.124.0.103 -10.124.0.104 -10.124.0.105 -10.124.0.106 -10.124.0.107 -10.124.0.108 -10.124.0.109 -10.124.0.110 -10.124.0.111 -10.124.0.112 -10.124.0.113 -10.124.0.114 -10.124.0.115 -10.124.0.116 -10.124.0.117 -10.124.0.118 -10.124.0.119 -10.124.0.120 -10.124.0.121 -10.124.0.122 -10.124.0.123 -10.124.0.124 -10.124.0.125 -10.124.0.127 -10.124.0.128 -10.124.0.129 -10.124.0.130 -10.124.0.131 -10.124.0.132 -10.124.0.133 -10.124.0.135 -10.124.0.136 -10.124.0.137 -10.124.0.138 -10.124.0.139 -10.124.0.140 -10.124.0.141 -10.124.0.142 -10.124.0.143 -10.124.0.145 -10.124.0.146 -10.124.0.147 -10.124.0.148 -10.124.0.149 -10.124.0.150 -10.124.0.151 -10.124.0.152 -10.124.0.153 -10.124.0.154 -10.124.0.156 -10.124.0.157 -10.124.0.158 -10.124.0.159 -10.124.0.161 -10.124.0.162 -10.124.0.163 -10.124.0.164 -10.124.0.165 -10.124.0.166 -10.124.0.167 -10.124.0.168 -10.124.0.169 -10.124.0.170 -10.124.0.171 -10.124.0.172 -10.124.0.173 -10.124.0.174 -10.124.0.178 -10.124.0.179 -10.124.0.180 -10.124.0.181 -10.124.0.182 -10.124.0.183 -10.124.0.184 -10.124.0.185 -10.124.0.186 -10.124.0.187 -10.124.0.188 -10.124.0.189 -10.124.0.190 -10.124.0.191 -10.124.0.193 -10.124.0.195 -10.124.0.196 -10.124.0.197 -10.124.0.198 -10.124.0.199 -10.124.0.200 -10.124.0.201 -10.124.0.202 -10.124.0.203 -10.124.0.204 -10.124.0.205 -10.124.0.206 -10.124.0.207 -10.124.0.208 -10.124.0.209 -10.124.0.210 -10.124.0.211 -10.124.0.213 10.124.0.214 10.124.0.215 -10.124.0.216 -10.124.0.217 -10.124.0.218 -10.124.0.219 -10.124.0.220 -10.124.0.221 -10.124.0.222 -10.124.0.223 -10.124.0.224 +10.124.0.141 +10.124.0.211 +10.124.2.70 +10.124.2.71 +10.124.2.72 +10.124.2.73 +10.124.2.42 +10.124.2.43 +10.124.2.44 10.124.0.225 10.124.0.226 -10.124.0.227 -10.124.0.228 -10.124.0.229 -10.124.0.230 +10.124.0.10 +10.124.0.12 +10.124.2.31 +10.124.2.32 +10.124.2.2 +10.124.2.21 +10.124.2.52 10.124.0.231 10.124.0.232 10.124.0.233 10.124.0.234 -10.124.0.235 -10.124.0.236 -10.124.0.237 -10.124.0.238 -10.124.0.239 -10.124.0.240 -10.124.0.241 -10.124.0.242 -10.124.0.243 -10.124.0.244 -10.124.0.245 -10.124.0.246 -10.124.0.247 -10.124.0.248 -10.124.0.249 -10.124.0.250 -10.124.0.251 -10.124.0.252 -10.124.0.253 -10.124.0.254 -10.124.1.1 -10.124.1.2 -10.124.1.3 -10.124.1.4 -10.124.1.5 -10.124.1.6 -10.124.1.7 -10.124.1.9 -10.124.1.10 -10.124.1.11 -10.124.1.12 -10.124.1.13 -10.124.1.14 -10.124.1.15 -10.124.1.16 -10.124.1.17 -10.124.1.18 -10.124.1.19 -10.124.1.20 -10.124.1.21 -10.124.1.22 -10.124.1.23 -10.124.1.24 -10.124.1.25 -10.124.1.26 -10.124.1.27 -10.124.1.28 -10.124.1.29 -10.124.1.30 -10.124.1.31 -10.124.1.32 -10.124.1.33 -10.124.1.34 -10.124.1.35 -10.124.1.36 -10.124.1.37 -10.124.1.38 -10.124.1.39 -10.124.1.40 -10.124.1.41 -10.124.1.42 -10.124.1.43 -10.124.1.44 -10.124.1.45 -10.124.1.46 -10.124.1.47 -10.124.1.49 -10.124.1.50 -10.124.1.51 -10.124.1.52 -10.124.1.54 -10.124.1.55 -10.124.1.56 -10.124.1.57 -10.124.1.58 -10.124.1.59 -10.124.1.60 -10.124.1.61 -10.124.1.62 -10.124.1.63 -10.124.1.64 -10.124.1.65 -10.124.1.66 -10.124.1.67 -10.124.1.68 -10.124.1.69 -10.124.1.70 -10.124.1.71 -10.124.1.72 -10.124.1.73 -10.124.1.74 -10.124.1.75 -10.124.1.76 -10.124.1.77 -10.124.1.78 -10.124.1.79 -10.124.1.80 -10.124.1.81 -10.124.1.82 -10.124.1.83 -10.124.1.84 -10.124.1.85 -10.124.1.86 -10.124.1.87 -10.124.1.88 -10.124.1.89 -10.124.1.90 -10.124.1.91 -10.124.1.92 -10.124.1.93 -10.124.1.94 -10.124.1.95 -10.124.1.96 -10.124.1.97 -10.124.1.98 -10.124.1.100 -10.124.1.101 -10.124.1.102 -10.124.1.103 -10.124.1.104 -10.124.1.105 -10.124.1.106 -10.124.1.107 -10.124.1.108 -10.124.1.109 +10.124.0.168 +10.124.0.171 +10.124.1.235 +10.124.1.236 +10.124.0.81 10.124.1.110 10.124.1.111 10.124.1.112 10.124.1.113 10.124.1.114 10.124.1.115 -10.124.1.116 -10.124.1.117 -10.124.1.118 -10.124.1.119 -10.124.1.120 -10.124.1.121 -10.124.1.123 -10.124.1.124 -10.124.1.125 -10.124.1.128 -10.124.1.129 -10.124.1.130 -10.124.1.131 -10.124.1.132 -10.124.1.133 -10.124.1.134 -10.124.1.135 -10.124.1.136 -10.124.1.137 -10.124.1.138 -10.124.1.139 -10.124.1.142 -10.124.1.143 -10.124.1.144 -10.124.1.145 -10.124.1.146 -10.124.1.147 -10.124.1.148 -10.124.1.149 -10.124.1.150 -10.124.1.151 -10.124.1.152 -10.124.1.153 -10.124.1.154 -10.124.1.155 -10.124.1.156 -10.124.1.157 -10.124.1.158 -10.124.1.159 -10.124.1.160 -10.124.1.161 -10.124.1.162 -10.124.1.163 -10.124.1.164 -10.124.1.165 -10.124.1.166 -10.124.1.167 -10.124.1.168 -10.124.1.169 -10.124.1.170 -10.124.1.171 -10.124.1.172 -10.124.1.173 -10.124.1.174 -10.124.1.175 -10.124.1.176 -10.124.1.177 -10.124.1.178 -10.124.1.179 -10.124.1.180 -10.124.1.181 -10.124.1.182 -10.124.1.183 -10.124.1.184 -10.124.1.185 -10.124.1.186 -10.124.1.187 -10.124.1.188 -10.124.1.189 -10.124.1.190 -10.124.1.191 -10.124.1.192 -10.124.1.193 -10.124.1.194 -10.124.1.195 -10.124.1.196 -10.124.1.197 -10.124.1.198 -10.124.1.199 -10.124.1.200 -10.124.1.201 -10.124.1.202 -10.124.1.203 -10.124.1.204 -10.124.1.205 -10.124.1.206 -10.124.1.207 -10.124.1.208 -10.124.1.210 -10.124.1.211 +10.124.0.13 +10.124.0.71 +10.124.1.65 +10.124.1.66 +10.124.0.174 +10.124.0.178 +10.124.0.121 +10.124.0.122 +10.124.0.123 +10.124.0.124 +10.124.0.125 +10.124.0.241 +10.124.0.105 +10.124.0.106 10.124.1.213 10.124.1.214 10.124.1.215 10.124.1.216 -10.124.1.217 -10.124.1.218 -10.124.1.219 -10.124.1.220 -10.124.1.221 -10.124.1.222 -10.124.1.223 -10.124.1.224 -10.124.1.225 -10.124.1.226 -10.124.1.227 -10.124.1.228 -10.124.1.229 -10.124.1.230 -10.124.1.231 -10.124.1.232 -10.124.1.233 -10.124.1.234 -10.124.1.235 -10.124.1.236 -10.124.1.237 +10.124.2.12 +10.124.2.6 +10.124.2.7 +10.124.2.8 +10.124.2.9 +10.124.2.10 +10.124.2.11 +10.124.1.20 +10.124.1.21 +10.124.0.216 +10.124.0.217 +10.124.1.83 +10.124.1.84 +10.124.2.34 +10.124.2.57 +10.124.2.58 +10.124.0.7 +10.124.0.8 +10.124.0.9 +10.124.0.55 +10.124.0.179 +10.124.0.196 +10.124.0.239 +10.124.0.101 +10.124.0.30 +10.124.0.91 +10.124.0.92 +10.124.0.53 +10.124.0.54 +10.124.1.23 +10.124.1.26 +10.124.1.27 +10.124.0.222 +10.124.1.24 +10.124.1.25 +10.124.0.240 +10.124.1.243 10.124.1.238 10.124.1.239 10.124.1.240 10.124.1.241 10.124.1.242 -10.124.1.243 -10.124.1.244 -10.124.1.245 -10.124.1.246 -10.124.1.247 -10.124.1.249 +10.124.1.30 +10.124.1.31 +10.124.1.32 +10.124.1.33 10.124.1.250 10.124.1.251 10.124.1.252 -10.124.1.253 -10.124.1.254 -10.124.2.1 -10.124.2.2 -10.124.2.3 -10.124.2.4 -10.124.2.5 -10.124.2.6 -10.124.2.7 -10.124.2.8 -10.124.2.9 -10.124.2.10 -10.124.2.11 -10.124.2.12 +10.124.0.64 +10.124.0.17 +10.124.0.229 +10.124.0.230 +10.124.0.138 +10.124.0.139 +10.124.0.140 +10.124.0.252 +10.124.0.253 +10.124.1.69 +10.124.1.70 +10.124.1.223 +10.124.1.222 +10.124.2.28 +10.124.2.47 +10.124.1.2 +10.124.1.3 +10.124.0.21 +10.124.0.111 +10.124.0.112 +10.124.2.53 +10.124.2.54 +10.124.2.55 +10.124.2.56 +10.124.1.63 +10.124.1.64 +10.124.0.45 +10.124.1.183 +10.124.0.116 +10.124.0.117 +10.124.0.118 +10.124.0.119 +10.124.0.120 +10.124.0.238 +10.124.0.142 +10.124.0.223 +10.124.0.224 +10.124.1.78 +10.124.1.79 +10.124.0.246 +10.124.0.247 +10.124.0.59 +10.124.1.16 +10.124.1.17 +10.124.1.18 +10.124.1.19 +10.124.1.28 +10.124.1.62 +10.124.1.34 +10.124.1.35 +10.124.1.91 +10.124.1.164 +10.124.1.249 +10.124.1.247 +10.124.0.237 +10.124.2.20 10.124.2.13 10.124.2.14 10.124.2.15 @@ -481,52 +180,39 @@ 10.124.2.17 10.124.2.18 10.124.2.19 -10.124.2.20 -10.124.2.21 -10.124.2.22 -10.124.2.23 -10.124.2.24 +10.124.2.69 +10.124.1.162 +10.124.1.163 +10.124.0.159 +10.124.0.166 +10.124.1.237 +10.124.0.202 +10.124.0.203 +10.124.0.35 +10.124.0.74 +10.124.0.227 +10.124.0.228 +10.124.0.135 +10.124.0.137 +10.124.0.254 +10.124.1.1 +10.124.1.58 +10.124.1.59 +10.124.2.5 10.124.2.25 10.124.2.26 -10.124.2.27 -10.124.2.28 -10.124.2.29 -10.124.2.30 -10.124.2.31 -10.124.2.32 -10.124.2.34 -10.124.2.35 -10.124.2.36 -10.124.2.37 -10.124.2.38 -10.124.2.39 -10.124.2.40 -10.124.2.41 -10.124.2.42 -10.124.2.43 -10.124.2.44 -10.124.2.45 -10.124.2.46 -10.124.2.47 -10.124.2.48 -10.124.2.52 -10.124.2.53 -10.124.2.54 -10.124.2.55 -10.124.2.56 -10.124.2.57 -10.124.2.58 -10.124.2.59 -10.124.2.60 -10.124.2.61 -10.124.2.62 -10.124.2.63 -10.124.2.64 -10.124.2.65 -10.124.2.66 -10.124.2.67 -10.124.2.69 -10.124.2.70 -10.124.2.71 -10.124.2.72 -10.124.2.73 \ No newline at end of file +10.124.1.206 +10.124.1.207 +10.124.1.208 +10.124.0.200 +10.124.0.201 +10.124.1.67 +10.124.1.68 +10.124.1.177 +10.124.1.178 +10.124.1.179 +10.124.1.180 +10.124.1.218 +10.124.1.217 +10.124.0.107 +10.124.0.161 diff --git a/mcsmartscan/proxy.py b/mcsmartscan/proxy.py index 7dfc5e7..ee9c171 100644 --- a/mcsmartscan/proxy.py +++ b/mcsmartscan/proxy.py @@ -2,14 +2,27 @@ from __future__ import annotations +import concurrent.futures +import http.client import heapq import itertools +import json +import os import socket +import ssl import threading import time +import weakref from dataclasses import dataclass from pathlib import Path -from typing import Callable, Iterable, Iterator, List, Optional, Sequence, Tuple +from typing import Callable, Dict, Iterable, Iterator, List, Optional, Sequence, Tuple +from urllib.error import URLError +from urllib.parse import urlsplit + +try: + import requests # type: ignore +except ImportError: # pragma: no cover - requests is optional at runtime + requests = None # type: ignore # Tunables for proxy backoff behaviour FAIL_QUARANTINE_THRESHOLD = 3 @@ -18,6 +31,18 @@ MAX_QUARANTINE_SECONDS = 180.0 HARD_DISABLE_SECONDS = 300.0 +# Health probing configuration +HEALTH_TTL_SECONDS = 600.0 +DEFAULT_HEALTH_TIMEOUT = float(os.getenv("SOCKS_HEALTH_TIMEOUT", "6.0")) +DEFAULT_HEALTH_THREADS = max(1, int(os.getenv("SOCKS_HEALTH_THREADS", "16"))) +DEFAULT_HEALTH_URL = os.getenv("MULLVAD_CHECK_URL", "https://am.i.mullvad.net/json") + +# Baseline Mullvad internal SOCKS endpoints (not persisted) +BASELINE_PROXIES: Sequence[Tuple[str, int]] = ( + ("10.64.0.1", 1080), + ("10.8.0.1", 1080), +) + class ProxyError(Exception): """Base class for proxy related errors.""" @@ -60,6 +85,18 @@ class ProxyStats: quarantine_until: float = 0.0 disabled_until: float = 0.0 disabled_reason: Optional[str] = None + health_inflight: bool = False + health_last_probe_ts: float = 0.0 + health_last_success_ts: float = 0.0 + health_last_failure_ts: float = 0.0 + health_latency_ms: Optional[float] = None + health_ok: bool = False + health_exit_ip: Optional[str] = None + health_exit_country: Optional[str] = None + health_exit_server_type: Optional[str] = None + health_payload: Optional[Dict[str, object]] = None + health_failures: int = 0 + health_successes: int = 0 @property def label(self) -> str: @@ -115,8 +152,16 @@ def __init__( self._event_callback = event_callback self._cv = threading.Condition() self._lock = threading.RLock() - self._heap: List[Tuple[float, int, ProxyStats]] = [] + self._heap: List[Tuple[float, float, int, ProxyStats]] = [] self._counter = itertools.count() + self._health_executor = concurrent.futures.ThreadPoolExecutor( + max_workers=DEFAULT_HEALTH_THREADS, + thread_name_prefix="socks-health", + ) + self._health_timeout = DEFAULT_HEALTH_TIMEOUT + self._health_url = DEFAULT_HEALTH_URL + self._health_target = self._parse_health_url(self._health_url) + self._mullvad_connected = True for idx, (host, port) in enumerate(proxies): stats = ProxyStats(host=host, port=port, index=idx) @@ -135,7 +180,7 @@ def from_file( default_port: int = 1080, event_callback: Optional[EventCallback] = None, ) -> "ProxyPool": - proxies: List[Tuple[str, int]] = [] + proxies: List[Tuple[str, int]] = list(BASELINE_PROXIES) try: for raw in path.read_text(encoding="utf-8").splitlines(): line = raw.strip() @@ -155,14 +200,19 @@ def from_file( continue proxies.append((host, port)) except FileNotFoundError: - proxies = [] + proxies = list(BASELINE_PROXIES) except Exception: - proxies = [] + proxies = list(BASELINE_PROXIES) return cls(proxies, event_callback=event_callback) def set_event_callback(self, callback: Optional[EventCallback]) -> None: self._event_callback = callback + def set_mullvad_connected(self, connected: Optional[bool]) -> None: + if connected is None: + return + self._mullvad_connected = bool(connected) + # ------------------------------------------------------------------ # # Public properties # ------------------------------------------------------------------ # @@ -173,7 +223,18 @@ def total(self) -> int: def available_now(self) -> int: now = time.time() with self._cv: - return sum(1 for available, _, stats in self._heap if available <= now and not stats.in_use) + return sum( + 1 + for _, _, _, stats in self._heap + if not stats.in_use + and stats.cooldown_until <= now + and stats.quarantine_until <= now + and stats.disabled_until <= now + ) + + @property + def mullvad_connected(self) -> bool: + return self._mullvad_connected def prepare_for_run(self) -> None: with self._cv: @@ -190,8 +251,21 @@ def prepare_for_run(self) -> None: stats.disabled_reason = None stats.cooldown_until = 0.0 stats.in_use = False + stats.health_inflight = False + stats.health_last_probe_ts = 0.0 + stats.health_last_success_ts = 0.0 + stats.health_last_failure_ts = 0.0 + stats.health_latency_ms = None + stats.health_ok = False + stats.health_exit_ip = None + stats.health_exit_country = None + stats.health_exit_server_type = None + stats.health_payload = None + stats.health_failures = 0 + stats.health_successes = 0 for stats in self._stats: self._push(stats, available_at=0.0) + self._ensure_health_probe(stats, force=True) # ------------------------------------------------------------------ # # Acquisition and release @@ -203,13 +277,15 @@ def acquire(self, timeout: Optional[float] = None) -> ProxyLease: with self._cv: while True: now = time.time() + needs_probe = False if self._heap: - available_at, _, stats = heapq.heappop(self._heap) + _, _, _, stats = heapq.heappop(self._heap) + available_at = stats.cooldown_until effective_at = max(available_at, stats.quarantine_until, stats.disabled_until) if stats.in_use and effective_at <= now: effective_at = now + 0.05 if effective_at > now or stats.in_use: - heapq.heappush(self._heap, (effective_at, next(self._counter), stats)) + self._push(stats, available_at=effective_at) wait_for = max(0.0, effective_at - now) if timeout is not None: remaining = deadline - now @@ -228,8 +304,11 @@ def acquire(self, timeout: Optional[float] = None) -> ProxyLease: stats.total_sessions += 1 if stats.disabled_until <= now: stats.disabled_reason = None + needs_probe = self._needs_health_refresh(stats, now) lease = ProxyLease(self, stats) event = {"type": "acquire", "proxy": stats.label, "index": stats.index} + if needs_probe: + self._ensure_health_probe(stats) break wait_for = 0.5 @@ -263,6 +342,8 @@ def release(self, stats: ProxyStats) -> None: "disabled": max(0.0, stats.disabled_until - now), } self._push(stats, available_at) + if not stats.health_ok: + self._ensure_health_probe(stats) if event: self._emit(event) @@ -270,6 +351,28 @@ def release(self, stats: ProxyStats) -> None: # TCP connection handling # ------------------------------------------------------------------ # def open_tcp(self, stats: ProxyStats, host: str, port: int, timeout: float) -> socket.socket: + sock, _ = self._connect_via_proxy(stats, host, port, timeout, record_metrics=True) + return sock + + def get_requests_session(self, country: Optional[str] = None): + if requests is None: + raise RuntimeError("requests package with SOCKS support is required.") + stats = self._select_session_proxy(country) + session = requests.Session() + if stats is not None: + proxy_url = f"socks5h://{stats.host}:{stats.port}" + session.proxies.update({"http": proxy_url, "https": proxy_url}) + return session + + def _connect_via_proxy( + self, + stats: ProxyStats, + host: str, + port: int, + timeout: float, + *, + record_metrics: bool, + ) -> Tuple[socket.socket, float]: start = time.perf_counter() sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.settimeout(timeout) @@ -286,6 +389,7 @@ def open_tcp(self, stats: ProxyStats, host: str, port: int, timeout: float) -> s except OSError as exc: sock.close() self._record_proxy_failure(stats, "connect", f"{exc}") + self._ensure_health_probe(stats, force=True) raise ProxyHandshakeError(f"{stats.label} connection failed: {exc}") from exc try: @@ -305,6 +409,7 @@ def open_tcp(self, stats: ProxyStats, host: str, port: int, timeout: float) -> s if rep != 0x00: msg = self._decode_rep(rep) self._record_target_failure(stats, msg) + self._ensure_health_probe(stats) sock.close() raise ProxyTargetError(rep, msg) except ProxyTargetError: @@ -312,43 +417,68 @@ def open_tcp(self, stats: ProxyStats, host: str, port: int, timeout: float) -> s except Exception as exc: sock.close() self._record_proxy_failure(stats, "handshake", f"{exc}") + self._ensure_health_probe(stats, force=True) raise ProxyHandshakeError(f"{stats.label} handshake failed: {exc}") from exc latency_ms = (time.perf_counter() - start) * 1000.0 - self._record_success(stats, latency_ms) - return sock + if record_metrics: + self._record_success(stats, latency_ms) + return sock, latency_ms # ------------------------------------------------------------------ # # Health reporting # ------------------------------------------------------------------ # - def health_snapshot(self) -> List[dict]: + def snapshot_health(self) -> List[dict]: now = time.time() with self._lock: - snapshot = [] + snapshot: List[dict] = [] for stats in self._stats: - snapshot.append( - { - "label": stats.label, - "index": stats.index, - "in_use": stats.in_use, - "cooldown": max(0.0, stats.cooldown_until - now), - "quarantine": max(0.0, stats.quarantine_until - now), - "disabled": max(0.0, stats.disabled_until - now), - "disabled_reason": stats.disabled_reason, - "successes": stats.successes, - "proxy_failures": stats.proxy_failures, - "target_failures": stats.target_failures, - "consecutive_proxy_failures": stats.consecutive_proxy_failures, - "last_latency_ms": stats.last_latency_ms, - "last_error": stats.last_error, - "last_stage": stats.last_stage, - "last_success_ts": stats.last_success_ts, - "last_failure_ts": stats.last_failure_ts, - "total_sessions": stats.total_sessions, - } - ) + disabled_for = max(0.0, stats.disabled_until - now) + quarantine_for = max(0.0, stats.quarantine_until - now) + cooldown_for = max(0.0, stats.cooldown_until - now) + status = "OK" + if disabled_for > 0: + status = "Disabled" + elif quarantine_for > 0: + status = "Quarantine" + health_fresh = self._is_health_fresh(stats, now) + entry = { + "label": stats.label, + "index": stats.index, + "in_use": stats.in_use, + "status": status, + "cooldown": cooldown_for, + "quarantine": quarantine_for, + "disabled": disabled_for, + "disabled_reason": stats.disabled_reason, + "successes": stats.successes, + "proxy_failures": stats.proxy_failures, + "target_failures": stats.target_failures, + "consecutive_proxy_failures": stats.consecutive_proxy_failures, + "last_latency_ms": stats.last_latency_ms, + "last_error": stats.last_error, + "last_stage": stats.last_stage, + "last_success_ts": stats.last_success_ts, + "last_failure_ts": stats.last_failure_ts, + "total_sessions": stats.total_sessions, + "health_ok": stats.health_ok and health_fresh, + "health_latency_ms": stats.health_latency_ms, + "health_fresh": health_fresh, + "health_last_probe_ts": stats.health_last_probe_ts, + "health_last_success_ts": stats.health_last_success_ts, + "health_last_failure_ts": stats.health_last_failure_ts, + "health_exit_ip": stats.health_exit_ip, + "health_exit_country": stats.health_exit_country, + "health_exit_server_type": stats.health_exit_server_type, + "health_payload": dict(stats.health_payload or {}), + "pool_mullvad_connected": self._mullvad_connected, + } + snapshot.append(entry) return snapshot + def health_snapshot(self) -> List[dict]: + return self.snapshot_health() + # ------------------------------------------------------------------ # # Internal helpers # ------------------------------------------------------------------ # @@ -394,7 +524,9 @@ def _apply_failure_penalty(self, stats: ProxyStats, now: float) -> List[dict]: def _push(self, stats: ProxyStats, available_at: float) -> None: ready_at = max(available_at, stats.quarantine_until, stats.disabled_until) stats.cooldown_until = ready_at - heapq.heappush(self._heap, (ready_at, next(self._counter), stats)) + now = time.time() + penalty = self._health_priority_penalty(stats, now) + heapq.heappush(self._heap, (ready_at + penalty, penalty, next(self._counter), stats)) self._cv.notify() def _emit(self, event: dict) -> None: @@ -478,6 +610,257 @@ def _compute_cooldown(self, stats: ProxyStats) -> float: return 0.05 return min(30.0, 1.5 ** min(consecutive, 8)) + def _health_priority_penalty(self, stats: ProxyStats, now: float) -> float: + if stats.in_use: + return 0.0 + if stats.disabled_until > now or stats.quarantine_until > now: + return 0.0 + if stats.health_ok and self._is_health_fresh(stats, now): + return 0.0 + if stats.health_ok: + return 0.05 + if stats.health_last_failure_ts > 0 and (now - stats.health_last_failure_ts) <= HEALTH_TTL_SECONDS: + return 0.25 + if stats.health_last_probe_ts <= 0: + return 0.1 + return 0.15 + + def _is_health_fresh(self, stats: ProxyStats, now: Optional[float] = None) -> bool: + ts_now = now if now is not None else time.time() + return stats.health_last_probe_ts > 0 and (ts_now - stats.health_last_probe_ts) <= HEALTH_TTL_SECONDS + + def _needs_health_refresh(self, stats: ProxyStats, now: Optional[float] = None) -> bool: + ts_now = now if now is not None else time.time() + if stats.health_inflight: + return False + if stats.disabled_until > ts_now: + return False + if stats.health_last_probe_ts <= 0: + return True + if (ts_now - stats.health_last_probe_ts) >= HEALTH_TTL_SECONDS: + return True + if not stats.health_ok: + return True + return False + + def _ensure_health_probe(self, stats: ProxyStats, *, force: bool = False) -> None: + now = time.time() + if not force and not self._needs_health_refresh(stats, now): + return + with self._lock: + if stats.health_inflight: + return + stats.health_inflight = True + self._health_executor.submit(self._run_health_probe, stats) + + def _requeue_for_health(self, stats: ProxyStats) -> None: + if stats.in_use: + return + with self._cv: + self._push(stats, available_at=stats.cooldown_until) + + def _select_session_proxy(self, country: Optional[str]) -> Optional[ProxyStats]: + now = time.time() + country_norm = country.lower() if country else None + selected: Optional[ProxyStats] = None + needs_probe: Optional[ProxyStats] = None + with self._lock: + def usable(stats: ProxyStats) -> bool: + return ( + not stats.in_use + and stats.disabled_until <= now + and stats.quarantine_until <= now + ) + + healthy = [ + stats + for stats in self._stats + if usable(stats) and stats.health_ok and self._is_health_fresh(stats, now) + ] + if country_norm: + healthy_country = [ + stats + for stats in healthy + if (stats.health_exit_country or "").lower() == country_norm + ] + else: + healthy_country = [] + + def sort_key(stats: ProxyStats) -> Tuple[float, int]: + latency = stats.health_latency_ms + if latency is None: + latency = float("inf") + return (latency, stats.index) + + pool: List[ProxyStats] + if healthy_country: + pool = healthy_country + elif healthy: + pool = healthy + else: + pool = [ + stats for stats in self._stats if usable(stats) + ] + if pool: + pool.sort(key=sort_key) + selected = pool[0] + if not self._is_health_fresh(selected, now): + needs_probe = selected + else: + selected = None + if needs_probe: + self._ensure_health_probe(needs_probe) + return selected + + @staticmethod + def _parse_health_url(url: str) -> Dict[str, object]: + parts = urlsplit(url) + scheme = (parts.scheme or "https").lower() + host = parts.hostname or "am.i.mullvad.net" + if host.startswith("[") and host.endswith("]"): + host = host[1:-1] + if scheme not in ("http", "https"): + scheme = "https" + port = parts.port or (443 if scheme == "https" else 80) + path = parts.path or "/" + if parts.query: + path = f"{path}?{parts.query}" + return {"scheme": scheme, "host": host, "port": port, "path": path} + + def _run_health_probe(self, stats: ProxyStats) -> None: + target = self._health_target + host = target["host"] # type: ignore[index] + port = target["port"] # type: ignore[index] + path = target["path"] # type: ignore[index] + scheme = target["scheme"] # type: ignore[index] + + overall_start = time.perf_counter() + payload: Dict[str, object] = {} + latency_ms: Optional[float] = None + ok = False + error: Optional[str] = None + + stream: Optional[socket.socket] = None + sock: Optional[socket.socket] = None + response: Optional[http.client.HTTPResponse] = None + try: + sock, _ = self._connect_via_proxy( + stats, + host, + int(port), + self._health_timeout, + record_metrics=False, + ) + except ProxyTargetError as exc: + error = str(exc) + except ProxyHandshakeError as exc: + error = str(exc) + else: + stream = sock + try: + stream.settimeout(self._health_timeout) + except OSError: + pass + if scheme == "https": + try: + context = ssl.create_default_context() + stream = context.wrap_socket(stream, server_hostname=host) + except Exception as exc: + error = str(exc) + self._record_proxy_failure(stats, "health", error) + try: + sock.close() + except Exception: + pass + stream = None + if stream is not None: + try: + request_bytes = ( + f"GET {path or '/'} HTTP/1.1\r\n" + f"Host: {host}\r\n" + "User-Agent: mcsmartscan/1.0\r\n" + "Accept: application/json\r\n" + "Connection: close\r\n\r\n" + ).encode("ascii", "ignore") + stream.sendall(request_bytes) + response = http.client.HTTPResponse(stream) + response.begin() + body = response.read() + status_code = response.status + if status_code != 200: + raise RuntimeError(f"Health endpoint HTTP {status_code}") + try: + data = json.loads(body.decode("utf-8", "replace")) + except json.JSONDecodeError as exc: + raise RuntimeError(f"Invalid JSON: {exc}") from exc + if isinstance(data, dict): + payload = data # type: ignore[assignment] + else: + payload = {} + latency_ms = (time.perf_counter() - overall_start) * 1000.0 + ok = bool(payload.get("mullvad_exit_ip")) + if ok: + self._record_success(stats, latency_ms) + else: + error = "Mullvad exit flag false" + self._record_proxy_failure(stats, "health", error) + except ProxyTargetError as exc: + error = str(exc) + except (OSError, URLError, RuntimeError, ValueError) as exc: + error = str(exc) + self._record_proxy_failure(stats, "health", error) + finally: + if response is not None: + try: + response.close() + except Exception: + pass + try: + stream.close() + except Exception: + pass + finally: + with self._lock: + stats.health_inflight = False + stats.health_last_probe_ts = time.time() + if ok: + stats.health_ok = True + stats.health_latency_ms = latency_ms + stats.health_last_success_ts = stats.health_last_probe_ts + ip_value = payload.get("ip") if isinstance(payload, dict) else None + stats.health_exit_ip = str(ip_value) if ip_value is not None else None + stats.health_exit_country = ( + payload.get("country") if isinstance(payload, dict) else None + ) + stats.health_exit_server_type = ( + payload.get("mullvad_server_type") if isinstance(payload, dict) else None + ) + stats.health_payload = payload if payload else None + stats.health_successes += 1 + stats.health_failures = 0 + else: + stats.health_ok = False + stats.health_failures += 1 + stats.health_last_failure_ts = stats.health_last_probe_ts + if latency_ms is not None: + stats.health_latency_ms = latency_ms + if payload: + stats.health_payload = payload + self._emit( + { + "type": "health", + "proxy": stats.label, + "index": stats.index, + "ok": ok, + "latency_ms": latency_ms, + "exit_ip": payload.get("ip") if isinstance(payload, dict) else None, + "country": payload.get("country") if isinstance(payload, dict) else None, + "server_type": payload.get("mullvad_server_type") if isinstance(payload, dict) else None, + "error": error, + } + ) + self._requeue_for_health(stats) + @staticmethod def _recv_exact(sock: socket.socket, length: int) -> bytes: buf = bytearray() @@ -533,3 +916,43 @@ def _decode_rep(code: int) -> str: 0x08: "Address type not supported", } return mapping.get(code, f"Proxy reported error code {code}") + + +def make_connector(pool: ProxyPool, timeout: float) -> Callable[[str, int, Optional[float]], socket.socket]: + """ + Return a connector that leases a proxy, establishes a SOCKS5 connection, + and hands back the connected socket. The socket's close() will release the lease. + """ + + def _connector(host: str, port: int, connect_timeout: Optional[float] = None) -> socket.socket: + effective_timeout = connect_timeout if connect_timeout is not None else timeout + lease = pool.acquire(timeout=effective_timeout) + try: + sock = lease.connector(host, port, effective_timeout) + except (ProxyHandshakeError, ProxyTargetError): + lease.close() + raise + except Exception: + lease.close() + raise + + close_lock = threading.Lock() + released = False + original_close = sock.close + + def _close_with_release() -> None: + nonlocal released + with close_lock: + if released: + return + released = True + try: + original_close() + finally: + lease.close() + + sock.close = _close_with_release # type: ignore[assignment] + weakref.finalize(sock, lease.close) + return sock + + return _connector