добавил логи
This commit is contained in:
parent
db9f9d06bc
commit
09f1a5b19d
|
|
@ -250,6 +250,8 @@ async def main():
|
|||
domains, ready_ips = load_forced_list(cfg)
|
||||
resolvers = get_resolvers()
|
||||
|
||||
logging.info(f"Домены: {len(domains)} | IP/CIDR: {len(ready_ips)}")
|
||||
|
||||
tasks = []
|
||||
for dns_name, servers in resolvers:
|
||||
for server in servers:
|
||||
|
|
@ -262,13 +264,19 @@ async def main():
|
|||
for res in results:
|
||||
all_ips.update(res)
|
||||
|
||||
logging.info(f"Всего IP до фильтра: {len(all_ips)}")
|
||||
|
||||
if cfg["exclude_cloudflare"]:
|
||||
cf_ips = await get_cloudflare_ips()
|
||||
before = len(all_ips)
|
||||
all_ips = {ip for ip in all_ips if ip not in cf_ips}
|
||||
logging.info(f"Удалено Cloudflare IP: {before - len(all_ips)}")
|
||||
|
||||
before_private = len(all_ips)
|
||||
all_ips = {ip for ip in all_ips if is_public_ip(ip)}
|
||||
logging.info(f"Удалено приватных IP: {before_private - len(all_ips)}")
|
||||
normalized_ips = sorted({normalize_ip(ip) for ip in all_ips})
|
||||
|
||||
logging.info(f"Финальных IP: {len(all_ips)}")
|
||||
if cfg["is_blackhole"]:
|
||||
generate_blackhole_script(cfg, normalized_ips)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user