Skip to content

Commit

Permalink
[WIP] 80% advanced load balancer
Browse files Browse the repository at this point in the history
  • Loading branch information
radkesvat committed Jun 26, 2024
1 parent 9320369 commit 2ea10b3
Show file tree
Hide file tree
Showing 9 changed files with 1,173 additions and 44 deletions.
5 changes: 5 additions & 0 deletions ww/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ add_library(ww STATIC
utils/utils.c
managers/socket_manager.c
managers/node_manager.c
managers/data/iprange_mci.c
managers/data/iprange_irancell.c
managers/data/iprange_mokhaberat.c
managers/data/iprange_rightel.c
managers/data/iprange_iran.c
loggers/core_logger.c
loggers/network_logger.c
loggers/dns_logger.c
Expand Down
330 changes: 330 additions & 0 deletions ww/managers/data/iprange_iran.c

Large diffs are not rendered by default.

101 changes: 101 additions & 0 deletions ww/managers/data/iprange_irancell.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
#include "ipranges.h"

/*
AS44244 Iran Cell Service and Communication Company · mtnirancell.ir
Country Iran
Website mtnirancell.ir
Hosted domains 63
Number of IPv4 1,182,720
Number of IPv6 7.92 × 1028
ASN type ISP
Registry RIPE
Allocated 17 years ago on Dec 11, 2007
Updated 8 months ago on Oct 25, 2023
*/

const char *irancell_ip_ranges[] = {
"5.125.96.0/20", "2.147.104.0/21", "5.115.48.0/20", "92.42.50.0/24", "5.123.128.0/18",
"5.121.128.0/18", "5.127.128.0/20", "5.114.160.0/20", "5.113.0.0/16", "5.114.0.0/20",
"5.126.240.0/20", "5.115.112.0/20", "5.114.192.0/20", "5.113.64.0/20", "5.122.112.0/20",
"2a01:5ec0:7800::/37", "5.121.16.0/20", "5.126.32.0/20", "5.115.144.0/20", "5.123.16.0/20",
"5.114.128.0/18", "5.125.192.0/18", "5.122.16.0/20", "5.112.224.0/20", "5.115.16.0/20",
"5.121.208.0/20", "5.122.144.0/20", "5.119.64.0/20", "2.147.136.0/21", "5.120.64.0/20",
"5.120.128.0/18", "5.112.176.0/20", "5.113.112.0/20", "5.116.192.0/18", "5.122.0.0/18",
"2.144.12.0/24", "5.112.16.0/20", "5.125.64.0/18", "5.113.192.0/20", "5.117.128.0/18",
"5.127.16.0/20", "5.113.80.0/20", "5.115.240.0/20", "2a01:5ec0:1800::/37", "5.126.192.0/20",
"5.126.112.0/20", "2.144.0.0/16", "5.113.48.0/20", "5.113.240.0/20", "5.120.0.0/18",
"5.125.80.0/20", "5.127.176.0/20", "92.42.48.0/22", "5.114.112.0/20", "2a01:5ec0:d000::/36",
"5.114.96.0/20", "5.113.208.0/20", "5.112.96.0/20", "5.116.0.0/16", "5.123.208.0/20",
"5.112.64.0/18", "2a01:5ec0:e000::/36", "5.119.32.0/20", "2.147.0.0/16", "5.115.0.0/18",
"2a01:5ec0:2000::/37", "2.147.192.0/18", "5.121.32.0/20", "5.117.240.0/20", "5.113.160.0/20",
"5.125.64.0/20", "5.121.64.0/20", "5.123.192.0/18", "2.147.160.0/21", "5.116.64.0/18",
"5.120.112.0/20", "5.121.64.0/18", "5.127.0.0/18", "5.122.128.0/20", "5.114.208.0/20",
"5.126.0.0/16", "5.115.80.0/20", "85.185.36.0/24", "2.147.16.0/21", "5.112.112.0/20",
"5.123.32.0/20", "5.115.64.0/20", "5.121.240.0/20", "5.121.0.0/20", "5.124.96.0/20",
"5.122.0.0/20", "5.114.16.0/20", "5.123.96.0/20", "2.147.0.0/21", "5.125.160.0/20",
"5.117.64.0/18", "5.112.64.0/20", "5.124.128.0/20", "5.120.64.0/18", "2.146.0.0/17",
"5.113.128.0/20", "2.147.64.0/18", "5.125.112.0/20", "5.121.112.0/20", "5.119.144.0/20",
"2a01:5ec0:2000::/36", "5.124.128.0/18", "5.123.0.0/18", "5.115.0.0/16", "5.113.176.0/20",
"5.119.0.0/18", "5.120.192.0/18", "5.114.64.0/18", "2a01:5ec0:b000::/37", "2.147.72.0/21",
"92.42.48.0/24", "2.147.128.0/18", "5.115.128.0/18", "2a01:5ec0:7000::/36", "2.144.8.0/24",
"5.116.208.0/20", "5.116.128.0/20", "5.125.48.0/20", "5.117.192.0/18", "85.185.36.0/22",
"5.114.48.0/20", "5.117.112.0/20", "5.114.32.0/20", "85.185.39.0/24", "2a01:5ec0:5800::/37",
"5.116.48.0/20", "2.147.112.0/21", "5.117.80.0/20", "5.116.128.0/18", "5.119.16.0/20",
"5.121.128.0/20", "2.147.96.0/21", "5.119.208.0/20", "5.123.64.0/20", "5.114.80.0/20",
"5.126.160.0/20", "5.120.192.0/20", "5.126.208.0/20", "5.127.160.0/20", "5.127.64.0/20",
"5.112.0.0/20", "5.119.192.0/20", "5.122.80.0/20", "2.144.128.0/17", "5.116.96.0/20",
"2.147.240.0/21", "5.112.80.0/20", "5.113.16.0/20", "5.124.208.0/20", "5.112.192.0/20",
"2.144.242.0/23", "5.127.224.0/20", "5.119.192.0/18", "5.125.128.0/18", "2a01:5ec0:b800::/37",
"5.122.240.0/20", "2.147.224.0/21", "5.120.128.0/20", "5.124.48.0/20", "92.42.55.0/24",
"5.122.64.0/20", "5.112.160.0/20", "5.120.0.0/16", "5.120.240.0/20", "5.126.176.0/20",
"5.120.176.0/20", "5.119.0.0/20", "2a01:5ec0:9800::/37", "5.117.160.0/20", "5.113.128.0/18",
"2.147.248.0/21", "5.125.0.0/20", "5.119.128.0/18", "5.123.144.0/20", "5.113.32.0/20",
"5.112.240.0/20", "85.185.37.0/24", "5.126.128.0/20", "5.121.80.0/20", "5.117.128.0/20",
"2.146.128.0/17", "5.125.240.0/20", "5.122.64.0/18", "5.126.144.0/20", "5.113.192.0/18",
"5.115.176.0/20", "5.115.32.0/20", "2.147.56.0/21", "5.124.0.0/20", "5.117.144.0/20",
"5.114.128.0/20", "5.123.224.0/20", "5.116.144.0/20", "5.127.240.0/20", "5.115.0.0/20",
"5.117.192.0/20", "5.113.224.0/20", "5.119.224.0/20", "5.120.144.0/20", "5.121.176.0/20",
"5.113.0.0/20", "2.144.0.0/24", "5.120.0.0/20", "5.119.128.0/20", "5.116.0.0/18",
"5.113.64.0/18", "2a01:5ec0:5000::/37", "5.124.32.0/20", "5.120.208.0/20", "5.127.64.0/18",
"5.122.160.0/20", "5.119.96.0/20", "2.147.24.0/21", "2.147.232.0/21", "5.125.128.0/20",
"5.122.32.0/20", "5.117.32.0/20", "5.123.112.0/20", "2.147.176.0/21", "2a01:5ec0:1000::/37",
"5.112.0.0/16", "2.147.168.0/21", "5.116.0.0/20", "5.126.224.0/20", "5.123.128.0/20",
"5.124.160.0/20", "5.119.176.0/20", "5.124.0.0/18", "5.124.192.0/20", "5.120.80.0/20",
"5.124.16.0/20", "5.124.176.0/20", "5.120.48.0/20", "5.126.48.0/20", "5.113.96.0/20",
"5.117.224.0/20", "5.125.176.0/20", "5.112.48.0/20", "5.123.240.0/20", "5.116.112.0/20",
"5.121.0.0/16", "5.120.160.0/20", "5.112.128.0/18", "5.121.144.0/20", "5.127.192.0/18",
"5.127.96.0/20", "5.124.64.0/20", "5.121.192.0/20", "5.115.192.0/20", "5.121.224.0/20",
"5.112.192.0/18", "2a01:5ec0:5000::/36", "5.114.144.0/20", "5.114.224.0/20", "5.113.144.0/20",
"5.125.208.0/20", "5.126.16.0/20", "5.117.208.0/20", "5.114.192.0/18", "5.127.48.0/20",
"5.122.96.0/20", "85.185.38.0/24", "2.147.144.0/21", "2.144.0.0/21", "5.116.176.0/20",
"5.127.192.0/20", "5.115.96.0/20", "5.121.0.0/18", "5.119.64.0/18", "5.112.0.0/18",
"5.126.80.0/20", "5.120.96.0/20", "5.115.192.0/18", "2.147.128.0/21", "5.125.16.0/20",
"2.147.120.0/21", "5.121.160.0/20", "5.122.192.0/18", "5.124.144.0/20", "5.119.160.0/20",
"5.122.208.0/20", "5.124.80.0/20", "2.147.48.0/21", "5.115.160.0/20", "5.126.128.0/18",
"5.116.64.0/20", "5.123.80.0/20", "5.125.192.0/20", "5.123.160.0/20", "5.116.224.0/20",
"5.117.96.0/20", "5.123.0.0/16", "5.120.224.0/20", "5.114.64.0/20", "5.121.48.0/20",
"5.112.144.0/20", "2.147.200.0/21", "2.146.0.0/16", "5.125.144.0/20", "2.147.184.0/21",
"5.126.64.0/18", "2.147.152.0/21", "5.116.160.0/20", "5.122.48.0/20", "5.117.176.0/20",
"2.144.0.0/17", "5.123.0.0/20", "2.144.192.0/24", "2a01:5ec0:7000::/37", "5.127.80.0/20",
"2a01:5ec0:9000::/36", "92.42.49.0/24", "5.123.48.0/20", "5.114.0.0/18", "5.120.16.0/20",
"5.119.80.0/20", "5.116.32.0/20", "2.147.80.0/21", "5.117.48.0/20", "92.42.48.0/21",
"5.116.240.0/20", "5.124.224.0/20", "2.147.32.0/21", "2a01:5ec0:1000::/36", "2.147.8.0/21",
"5.114.0.0/16", "5.127.0.0/20", "5.126.96.0/20", "5.115.128.0/20", "5.117.16.0/20",
"5.124.64.0/18", "5.127.128.0/18", "5.116.16.0/20", "5.113.0.0/18", "5.122.0.0/16",
"5.124.240.0/20", "5.116.80.0/20", "5.115.64.0/18", "5.117.0.0/20", "5.117.0.0/18",
"5.122.192.0/20", "5.119.240.0/20", "2.147.192.0/21", "5.122.128.0/18", "5.115.208.0/20",
"5.127.112.0/20", "5.125.32.0/20", "5.125.0.0/18", "2.147.88.0/21", "2a01:5ec0:2800::/37",
"5.126.192.0/18", "5.114.176.0/20", "5.116.192.0/20", "5.124.112.0/20", "5.127.208.0/20",
"2.144.6.0/24", "5.112.32.0/20", "5.123.192.0/20", "2.144.3.0/24", "5.112.208.0/20",
"5.127.32.0/20", "2a01:5ec0:e800::/37", "92.42.52.0/24", "2.147.64.0/21", "5.127.144.0/20",
"2.147.0.0/18", "92.42.51.0/24", "2.147.40.0/21", "5.123.64.0/18", "5.122.176.0/20",
"92.42.52.0/22", "92.42.54.0/24", "5.119.112.0/20", "5.119.48.0/20", "5.112.128.0/20",
"5.115.224.0/20", "2a01:5ec0:d000::/37", "2.147.216.0/21", "5.120.32.0/20", "2.147.208.0/21",
"5.124.0.0/16", "5.114.240.0/20", "5.117.0.0/16", "5.121.96.0/20", "5.124.192.0/18",
"92.42.53.0/24", "5.117.64.0/20", "5.121.192.0/18", "5.126.64.0/20", "5.125.0.0/16",
"5.119.0.0/16", "5.123.176.0/20", "5.125.224.0/20", "2a01:5ec0:b000::/36", "5.126.0.0/20",
"5.127.0.0/16", "5.122.224.0/20", "2a01:5ec0:9000::/37", "2a01:5ec0:e000::/37", "2a01:5ec0:d800::/37"};

unsigned int irancell_ip_ranges_length = sizeof(irancell_ip_ranges) / sizeof(irancell_ip_ranges[0]);
Loading

0 comments on commit 2ea10b3

Please sign in to comment.