MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / get_bad_proxy_map

Function get_bad_proxy_map

Scripts/Developer Base/Free Internet.py:598–610  ·  view source on GitHub ↗
(country: str)

Source from the content-addressed store, hash-verified

596
597
598def get_bad_proxy_map(country: str) -> dict:
599 key = country.upper()
600 state = load_proxy_state()
601 bucket = state.get(key, {}) if isinstance(state.get(key, {}), dict) else {}
602 now = int(time.time())
603 cleaned = {proxy: int(expiry) for proxy, expiry in bucket.items() if int(expiry) > now}
604 if cleaned != bucket:
605 if cleaned:
606 state[key] = cleaned
607 elif key in state:
608 del state[key]
609 save_proxy_state(state)
610 return cleaned
611
612
613def mark_proxy_bad(country: str, proxy: str, ttl: int = BAD_PROXY_TTL) -> None:

Callers 1

fetch_proxy_poolFunction · 0.70

Calls 2

load_proxy_stateFunction · 0.70
save_proxy_stateFunction · 0.70

Tested by

no test coverage detected