diff --git a/ww/CMakeLists.txt b/ww/CMakeLists.txt index b4b5d255..c612abab 100644 --- a/ww/CMakeLists.txt +++ b/ww/CMakeLists.txt @@ -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 diff --git a/ww/managers/data/iprange_iran.c b/ww/managers/data/iprange_iran.c new file mode 100644 index 00000000..47cdc628 --- /dev/null +++ b/ww/managers/data/iprange_iran.c @@ -0,0 +1,330 @@ +#include "ipranges.h" + +/* + + All iran ips + + kudos to github.com/hosseinm1997 + +*/ + +const char *iran_ip_ranges[] = { + "103.130.144.0/24", "103.130.146.0/24", "103.215.220.0/22", "103.216.60.0/22", "103.231.136.0/22", + "109.107.131.0/24", "109.108.160.0/19", "109.109.32.0/19", "109.110.160.0/19", "109.122.193.0/24", + "109.122.217.0/24", "109.122.222.0/24", "109.122.224.0/20", "109.122.240.0/21", "109.122.250.0/23", + "109.122.252.0/23", "109.125.128.0/18", "109.162.128.0/17", "109.201.0.0/19", "109.203.128.0/18", + "109.206.252.0/22", "109.225.128.0/18", "109.230.192.0/23", "109.230.200.0/24", "109.230.204.0/22", + "109.230.221.0/24", "109.230.223.0/24", "109.230.242.0/24", "109.230.246.0/23", "109.230.251.0/24", + "109.230.64.0/19", "109.232.0.0/21", "109.238.176.0/20", "109.239.0.0/20", "109.70.237.0/24", + "109.72.192.0/20", "109.74.232.0/21", "109.94.164.0/22", "109.95.60.0/22", "109.95.64.0/21", + "113.203.0.0/17", "128.65.160.0/19", "130.185.72.0/21", "130.193.77.0/24", "130.255.192.0/18", + "134.255.196.0/23", "134.255.200.0/21", "134.255.245.0/24", "134.255.246.0/24", "134.255.248.0/23", + "141.11.42.0/24", "146.19.104.0/24", "146.19.217.0/24", "146.66.128.0/21", "151.232.0.0/14", + "151.238.0.0/15", "151.240.0.0/13", "152.89.12.0/22", "152.89.44.0/22", "157.119.188.0/22", + "158.255.74.0/24", "158.255.78.0/24", "158.58.0.0/17", "158.58.184.0/21", "159.20.96.0/20", + "164.138.128.0/18", "164.138.16.0/21", "164.215.128.0/17", "164.215.56.0/21", "171.22.24.0/22", + "172.80.128.0/17", "176.101.32.0/20", "176.101.48.0/21", "176.102.224.0/19", "176.105.245.0/24", + "176.116.7.0/24", "176.12.64.0/20", "176.122.210.0/23", "176.123.64.0/18", "176.124.64.0/22", + "176.126.120.0/24", "176.221.16.0/20", "176.221.64.0/21", "176.223.80.0/21", "176.46.128.0/19", + "176.56.144.0/20", "176.62.144.0/21", "176.65.160.0/19", "176.65.192.0/18", "176.67.64.0/20", + "176.97.218.0/24", "176.97.220.0/24", "178.131.0.0/16", "178.157.0.0/23", "178.169.0.0/19", + "178.173.128.0/18", "178.173.192.0/19", "178.21.160.0/21", "178.21.40.0/21", "178.211.145.0/24", + "178.215.0.0/18", "178.216.248.0/21", "178.219.224.0/20", "178.22.120.0/21", "178.22.72.0/21", + "178.236.32.0/22", "178.236.96.0/20", "178.238.192.0/20", "178.239.144.0/20", "178.248.40.0/21", + "178.251.208.0/21", "178.252.128.0/18", "178.253.16.0/24", "178.253.26.0/23", "178.253.31.0/24", + "178.253.38.0/23", "178.253.44.0/23", "178.253.55.0/24", "185.1.77.0/24", "185.10.71.0/24", + "185.10.72.0/22", "185.100.44.0/22", "185.101.228.0/22", "185.103.128.0/22", "185.103.244.0/22", + "185.103.248.0/22", "185.103.84.0/22", "185.104.192.0/24", "185.104.228.0/22", "185.104.232.0/22", + "185.104.240.0/22", "185.105.100.0/22", "185.105.120.0/22", "185.105.184.0/22", "185.105.236.0/22", + "185.106.136.0/22", "185.106.144.0/22", "185.106.200.0/22", "185.106.228.0/22", "185.107.244.0/22", + "185.107.248.0/22", "185.107.28.0/22", "185.107.32.0/23", "185.108.164.0/22", "185.108.96.0/22", + "185.109.128.0/22", "185.109.244.0/22", "185.109.248.0/22", "185.109.60.0/22", "185.109.72.0/22", + "185.109.80.0/22", "185.11.176.0/22", "185.11.68.0/22", "185.11.88.0/22", "185.110.191.0/24", + "185.110.216.0/22", "185.110.228.0/22", "185.110.236.0/22", "185.110.244.0/22", "185.110.252.0/22", + "185.110.28.0/22", "185.111.136.0/22", "185.111.64.0/22", "185.111.8.0/21", "185.111.80.0/22", + "185.112.130.0/23", "185.112.148.0/22", "185.112.168.0/22", "185.112.32.0/21", "185.113.112.0/22", + "185.113.56.0/22", "185.114.188.0/22", "185.115.148.0/22", "185.115.168.0/22", "185.115.76.0/22", + "185.116.160.0/22", "185.116.20.0/22", "185.116.24.0/22", "185.116.44.0/22", "185.117.136.0/22", + "185.117.204.0/23", "185.117.48.0/22", "185.118.12.0/22", "185.118.136.0/22", "185.118.152.0/22", + "185.119.164.0/22", "185.119.240.0/22", "185.119.4.0/22", "185.12.100.0/23", "185.12.102.0/24", + "185.12.60.0/22", "185.120.120.0/22", "185.120.136.0/22", "185.120.160.0/22", "185.120.168.0/22", + "185.120.192.0/21", "185.120.200.0/22", "185.120.208.0/20", "185.120.224.0/20", "185.120.240.0/21", + "185.120.248.0/22", "185.121.128.0/22", "185.121.56.0/22", "185.122.80.0/22", "185.123.208.0/22", + "185.123.68.0/22", "185.124.112.0/22", "185.124.156.0/22", "185.124.172.0/22", "185.125.20.0/22", + "185.125.244.0/22", "185.125.248.0/21", "185.126.0.0/20", "185.126.16.0/22", "185.126.132.0/23", + "185.126.200.0/22", "185.126.40.0/22", "185.127.232.0/22", "185.128.136.0/22", "185.128.152.0/22", + "185.128.164.0/22", "185.128.40.0/24", "185.128.48.0/22", "185.128.80.0/22", "185.129.168.0/22", + "185.129.184.0/21", "185.129.196.0/22", "185.129.200.0/22", "185.129.212.0/22", "185.129.216.0/22", + "185.129.228.0/22", "185.129.232.0/21", "185.129.240.0/22", "185.129.80.0/22", "185.13.228.0/22", + "185.130.76.0/22", "185.131.100.0/22", "185.131.108.0/22", "185.131.112.0/21", "185.131.124.0/22", + "185.131.128.0/22", "185.131.136.0/21", "185.131.148.0/22", "185.131.152.0/21", "185.131.164.0/22", + "185.131.168.0/22", "185.131.28.0/22", "185.131.84.0/22", "185.131.88.0/21", "185.132.212.0/22", + "185.132.80.0/22", "185.133.152.0/22", "185.133.164.0/22", "185.133.244.0/23", "185.133.246.0/24", + "185.134.96.0/22", "185.135.228.0/22", "185.135.28.0/22", "185.136.100.0/22", "185.136.172.0/22", + "185.136.180.0/22", "185.136.192.0/22", "185.136.220.0/22", "185.137.108.0/23", "185.137.110.0/24", + "185.137.24.0/22", "185.137.60.0/22", "185.139.64.0/22", "185.14.160.0/22", "185.14.80.0/22", + "185.140.232.0/22", "185.140.240.0/22", "185.140.4.0/22", "185.140.56.0/22", "185.141.104.0/22", + "185.141.132.0/22", "185.141.168.0/22", "185.141.212.0/22", "185.141.244.0/22", "185.141.36.0/22", + "185.141.48.0/22", "185.142.124.0/22", "185.142.156.0/22", "185.142.232.0/22", "185.142.92.0/22", + "185.143.204.0/22", "185.143.232.0/22", "185.143.72.0/22", "185.144.64.0/22", "185.145.184.0/22", + "185.145.8.0/22", "185.147.160.0/22", "185.147.176.0/22", "185.147.40.0/22", "185.147.84.0/22", + "185.150.108.0/22", "185.153.184.0/22", "185.153.208.0/22", "185.154.184.0/22", "185.155.236.0/22", + "185.155.72.0/22", "185.155.8.0/21", "185.157.8.0/22", "185.158.172.0/22", "185.159.152.0/22", + "185.159.176.0/22", "185.16.232.0/22", "185.160.104.0/22", "185.160.176.0/22", "185.161.112.0/22", + "185.161.36.0/22", "185.162.216.0/22", "185.162.40.0/22", "185.163.88.0/22", "185.164.252.0/22", + "185.164.73.0/24", "185.164.74.0/23", "185.165.100.0/22", "185.165.116.0/22", "185.165.204.0/22", + "185.165.28.0/22", "185.165.40.0/22", "185.166.104.0/22", "185.166.112.0/22", "185.166.60.0/22", + "185.167.100.0/22", "185.167.124.0/22", "185.167.72.0/22", "185.168.28.0/22", "185.169.20.0/22", + "185.169.36.0/22", "185.169.6.0/24", "185.170.236.0/22", "185.170.8.0/24", "185.171.52.0/22", + "185.172.0.0/22", "185.172.212.0/22", "185.172.68.0/22", "185.173.104.0/22", "185.173.129.0/24", + "185.173.130.0/24", "185.173.168.0/22", "185.174.132.0/24", "185.174.134.0/24", "185.174.200.0/22", + "185.174.248.0/22", "185.175.240.0/22", "185.175.76.0/22", "185.176.32.0/22", "185.176.56.0/22", + "185.177.156.0/22", "185.177.232.0/22", "185.178.104.0/22", "185.178.220.0/22", "185.179.168.0/22", + "185.179.220.0/22", "185.179.90.0/24", "185.18.156.0/22", "185.18.212.0/22", "185.180.128.0/22", + "185.180.52.0/22", "185.181.180.0/22", "185.182.220.0/22", "185.182.248.0/22", "185.184.32.0/22", + "185.184.48.0/22", "185.185.16.0/22", "185.185.240.0/22", "185.186.240.0/22", "185.186.48.0/22", + "185.187.48.0/22", "185.187.84.0/22", "185.188.104.0/22", "185.188.112.0/22", "185.189.120.0/22", + "185.19.201.0/24", "185.190.20.0/22", "185.190.39.0/24", "185.191.76.0/22", "185.192.112.0/22", + "185.192.8.0/22", "185.193.208.0/22", "185.193.47.0/24", "185.194.244.0/22", "185.194.76.0/22", + "185.195.72.0/22", "185.196.148.0/22", "185.197.112.0/22", "185.197.68.0/22", "185.198.160.0/22", + "185.199.208.0/22", "185.199.64.0/22", "185.2.12.0/22", "185.20.160.0/22", "185.201.48.0/22", + "185.202.56.0/22", "185.203.160.0/22", "185.204.168.0/22", "185.204.180.0/22", "185.204.197.0/24", + "185.205.203.0/24", "185.205.220.0/22", "185.206.229.0/24", "185.206.231.0/24", "185.206.236.0/22", + "185.206.92.0/22", "185.207.52.0/22", "185.207.72.0/22", "185.208.148.0/22", "185.208.174.0/23", + "185.208.180.0/22", "185.208.76.0/22", "185.209.188.0/22", "185.21.68.0/22", "185.21.76.0/22", + "185.210.200.0/22", "185.211.56.0/22", "185.211.84.0/22", "185.211.88.0/22", "185.212.192.0/22", + "185.212.48.0/22", "185.213.164.0/22", "185.213.195.0/24", "185.213.8.0/22", "185.214.36.0/22", + "185.215.124.0/22", "185.215.152.0/22", "185.215.228.0/22", "185.219.112.0/22", "185.22.28.0/22", + "185.220.224.0/22", "185.221.112.0/22", "185.221.192.0/22", "185.221.239.0/24", "185.222.120.0/22", + "185.222.180.0/22", "185.222.184.0/22", "185.222.210.0/24", "185.223.160.0/24", "185.224.176.0/22", + "185.225.180.0/22", "185.225.240.0/22", "185.225.80.0/22", "185.226.116.0/22", "185.226.132.0/22", + "185.226.140.0/22", "185.226.97.0/24", "185.227.116.0/22", "185.227.64.0/22", "185.228.236.0/22", + "185.229.0.0/22", "185.229.204.0/24", "185.229.28.0/22", "185.23.128.0/22", "185.231.112.0/24", + "185.231.114.0/23", "185.231.180.0/22", "185.231.65.0/24", "185.232.152.0/22", "185.232.176.0/22", + "185.233.12.0/22", "185.233.131.0/24", "185.233.84.0/22", "185.234.14.0/24", "185.234.192.0/22", + "185.235.136.0/22", "185.235.245.0/24", "185.235.42.0/24", "185.236.36.0/22", "185.236.45.0/24", + "185.236.88.0/22", "185.237.8.0/22", "185.237.84.0/22", "185.238.140.0/24", "185.238.143.0/24", + "185.238.20.0/22", "185.238.44.0/22", "185.238.92.0/22", "185.239.0.0/22", "185.239.104.0/22", + "185.24.136.0/22", "185.24.148.0/22", "185.24.228.0/22", "185.24.252.0/23", "185.24.254.0/24", + "185.240.148.0/22", "185.240.56.0/22", "185.243.48.0/22", "185.244.52.0/22", "185.246.4.0/22", + "185.248.32.0/24", "185.25.172.0/22", "185.251.76.0/22", "185.252.200.0/24", "185.252.28.0/22", + "185.254.165.0/24", "185.254.166.0/24", "185.255.208.0/22", "185.255.68.0/22", "185.255.88.0/22", + "185.26.232.0/22", "185.26.32.0/22", "185.29.220.0/22", "185.3.124.0/22", "185.3.200.0/22", + "185.3.212.0/22", "185.30.4.0/22", "185.30.76.0/22", "185.31.124.0/22", "185.32.128.0/22", + "185.34.160.0/22", "185.36.228.0/24", "185.36.231.0/24", "185.37.52.0/22", "185.39.180.0/22", + "185.4.0.0/22", "185.4.104.0/22", "185.4.16.0/22", "185.4.220.0/22", "185.4.28.0/22", + "185.40.16.0/24", "185.40.240.0/22", "185.41.0.0/22", "185.41.220.0/22", "185.42.212.0/22", + "185.42.224.0/22", "185.42.24.0/24", "185.44.100.0/22", "185.44.112.0/22", "185.44.36.0/22", + "185.45.188.0/22", "185.46.0.0/22", "185.46.108.0/22", "185.46.216.0/22", "185.47.48.0/22", + "185.49.104.0/22", "185.49.231.0/24", "185.49.84.0/22", "185.49.96.0/22", "185.5.156.0/22", + "185.50.36.0/22", "185.51.200.0/22", "185.51.40.0/22", "185.53.140.0/22", "185.55.224.0/22", + "185.56.92.0/22", "185.56.96.0/22", "185.57.132.0/22", "185.57.164.0/22", "185.57.200.0/22", + "185.58.240.0/22", "185.59.112.0/23", "185.60.136.0/22", "185.60.32.0/22", "185.62.232.0/22", + "185.63.113.0/24", "185.63.114.0/24", "185.63.236.0/22", "185.64.176.0/22", "185.66.224.0/21", + "185.67.100.0/22", "185.67.12.0/22", "185.67.156.0/22", "185.67.212.0/22", "185.69.108.0/22", + "185.7.212.0/24", "185.70.60.0/22", "185.71.152.0/22", "185.71.192.0/22", "185.72.24.0/22", + "185.72.80.0/22", "185.73.0.0/22", "185.73.112.0/24", "185.73.114.0/24", "185.73.226.0/24", + "185.73.76.0/22", "185.74.164.0/22", "185.75.196.0/22", "185.75.204.0/22", "185.76.248.0/22", + "185.78.20.0/22", "185.79.156.0/22", "185.79.60.0/22", "185.79.96.0/22", "185.8.172.0/22", + "185.80.100.0/22", "185.80.197.0/24", "185.80.198.0/23", "185.81.40.0/22", "185.81.96.0/23", + "185.81.99.0/24", "185.82.136.0/22", "185.82.164.0/22", "185.82.180.0/22", "185.82.28.0/22", + "185.82.64.0/22", "185.83.112.0/24", "185.83.114.0/23", "185.83.180.0/23", "185.83.183.0/24", + "185.83.184.0/22", "185.83.196.0/22", "185.83.208.0/22", "185.83.28.0/22", "185.83.76.0/22", + "185.83.80.0/22", "185.83.88.0/22", "185.84.220.0/22", "185.85.136.0/22", "185.85.68.0/22", + "185.86.180.0/22", "185.86.36.0/22", "185.88.152.0/22", "185.88.176.0/22", "185.88.252.0/22", + "185.88.48.0/22", "185.89.112.0/22", "185.92.4.0/22", "185.92.8.0/22", "185.92.40.0/22", + "185.94.96.0/22", "185.95.152.0/22", "185.95.180.0/22", "185.95.60.0/22", "185.96.240.0/22", + "185.97.116.0/22", "185.98.112.0/22", "185.99.212.0/22", "188.0.240.0/20", "188.118.64.0/18", + "188.121.96.0/19", "188.121.128.0/19", "188.122.96.0/19", "188.136.128.0/18", "188.136.192.0/19", + "188.158.0.0/15", "188.191.176.0/21", "188.208.144.0/20", "188.208.160.0/19", "188.208.200.0/22", + "188.208.208.0/21", "188.208.224.0/19", "188.209.0.0/19", "188.209.32.0/20", "188.208.56.0/21", + "188.208.64.0/19", "188.209.116.0/22", "188.209.152.0/23", "188.209.192.0/20", "188.209.64.0/20", + "188.210.232.0/22", "188.210.64.0/20", "188.210.80.0/21", "188.210.96.0/19", "188.210.128.0/18", + "188.210.192.0/20", "188.211.0.0/20", "188.211.176.0/20", "188.211.192.0/19", "188.211.32.0/19", + "188.211.64.0/18", "188.211.128.0/19", "188.212.144.0/21", "188.212.160.0/19", "188.212.200.0/21", + "188.212.208.0/20", "188.212.224.0/20", "188.212.240.0/21", "188.212.22.0/24", "188.212.48.0/20", + "188.212.64.0/19", "188.212.96.0/22", "188.213.144.0/20", "188.213.176.0/20", "188.213.192.0/21", + "188.213.208.0/22", "188.213.64.0/20", "188.213.96.0/19", "188.214.120.0/23", "188.214.160.0/19", + "188.214.216.0/21", "188.214.4.0/22", "188.214.84.0/22", "188.214.96.0/22", "188.215.128.0/20", + "188.215.160.0/19", "188.215.192.0/19", "188.215.24.0/22", "188.215.240.0/22", "188.215.88.0/22", + "188.229.0.0/17", "188.240.196.0/24", "188.240.212.0/24", "188.240.248.0/21", "188.253.2.0/23", + "188.253.4.0/22", "188.253.8.0/21", "188.253.16.0/20", "188.253.32.0/19", "188.253.64.0/18", + "188.75.64.0/18", "188.94.188.0/24", "188.95.89.0/24", "192.15.0.0/16", "193.0.156.0/24", + "193.104.212.0/24", "193.104.22.0/24", "193.104.29.0/24", "193.105.2.0/24", "193.105.234.0/24", + "193.105.6.0/24", "193.106.190.0/24", "193.108.242.0/23", "193.111.234.0/23", "193.134.100.0/23", + "193.141.126.0/23", "193.141.64.0/23", "193.142.232.0/23", "193.142.254.0/23", "193.142.30.0/24", + "193.148.64.0/22", "193.150.66.0/24", "193.151.128.0/19", "193.162.129.0/24", "193.176.240.0/22", + "193.178.200.0/22", "193.186.32.0/24", "193.189.122.0/23", "193.19.144.0/23", "193.200.102.0/23", + "193.200.148.0/24", "193.201.192.0/22", "193.201.72.0/23", "193.22.20.0/24", "193.222.51.0/24", + "193.228.136.0/24", "193.228.90.0/23", "193.242.194.0/23", "193.242.208.0/23", "193.246.160.0/23", + "193.246.164.0/23", "193.246.174.0/23", "193.246.200.0/23", "193.28.181.0/24", "193.29.24.0/24", + "193.29.26.0/24", "193.3.182.0/24", "193.3.231.0/24", "193.3.255.0/24", "193.3.31.0/24", + "193.32.80.0/23", "193.34.244.0/22", "193.35.62.0/24", "193.38.247.0/24", "193.39.9.0/24", + "193.56.107.0/24", "193.56.118.0/24", "193.56.59.0/24", "193.56.61.0/24", "193.8.139.0/24", + "194.143.140.0/23", "194.146.148.0/22", "194.146.239.0/24", "194.147.164.0/22", "194.150.68.0/22", + "194.156.140.0/22", "194.180.224.0/24", "194.225.0.0/16", "194.26.117.0/24", "194.26.2.0/23", + "194.26.20.0/23", "194.31.194.0/24", "194.33.104.0/22", "194.33.122.0/23", "194.33.124.0/22", + "194.34.163.0/24", "194.36.0.0/24", "194.36.174.0/24", "194.39.36.0/22", "194.41.48.0/22", + "194.5.175.0/24", "194.5.176.0/22", "194.5.188.0/24", "194.5.192.0/24", "194.5.195.0/24", + "194.5.205.0/24", "194.5.40.0/22", "194.50.204.0/24", "194.50.209.0/24", "194.50.216.0/24", + "194.50.218.0/24", "194.53.118.0/23", "194.53.122.0/23", "194.56.148.0/24", "194.59.170.0/23", + "194.59.214.0/23", "194.60.208.0/22", "194.60.228.0/22", "194.62.17.0/24", "194.62.43.0/24", + "194.87.23.0/24", "194.9.56.0/23", "194.9.80.0/23", "195.110.38.0/23", "195.114.4.0/23", + "195.114.8.0/23", "195.146.32.0/19", "195.181.0.0/17", "195.182.38.0/24", "195.190.130.0/24", + "195.190.139.0/24", "195.190.144.0/24", "195.191.22.0/23", "195.191.44.0/23", "195.191.74.0/23", + "195.2.234.0/24", "195.20.136.0/24", "195.211.44.0/22", "195.219.71.0/24", "195.225.232.0/24", + "195.226.223.0/24", "195.230.105.0/24", "195.230.107.0/24", "195.230.124.0/24", "195.230.97.0/24", + "195.234.191.0/24", "195.238.231.0/24", "195.238.240.0/24", "195.238.247.0/24", "195.245.70.0/23", + "195.28.10.0/23", "195.28.168.0/23", "195.8.102.0/24", "195.8.110.0/24", "195.8.112.0/24", + "195.8.114.0/24", "195.88.188.0/23", "195.96.128.0/24", "195.96.153.0/24", "196.3.91.0/24", + "2.144.0.0/14", "2.176.0.0/12", "204.18.0.0/16", "210.5.198.0/24", "210.5.208.0/23", + "210.5.218.0/24", "210.5.232.0/23", "212.1.192.0/21", "212.120.192.0/19", "212.16.64.0/19", + "212.18.108.0/24", "212.23.201.0/24", "212.23.214.0/24", "212.23.216.0/24", "212.33.192.0/19", + "212.46.45.0/24", "212.80.0.0/19", "212.86.64.0/19", "213.108.240.0/22", "213.109.199.0/24", + "213.109.240.0/20", "213.176.0.0/20", "213.176.16.0/21", "213.176.64.0/18", "213.195.0.0/20", + "213.195.16.0/21", "213.195.32.0/19", "213.207.192.0/18", "213.217.32.0/19", "213.232.124.0/22", + "213.233.160.0/19", "217.11.16.0/20", "217.114.40.0/24", "217.144.104.0/22", "217.146.208.0/20", + "217.161.16.0/24", "217.170.240.0/20", "217.171.145.0/24", "217.171.148.0/22", "217.172.102.0/23", + "217.172.104.0/21", "217.172.112.0/22", "217.172.116.0/23", "217.172.118.0/24", "217.172.120.0/21", + "217.172.98.0/23", "217.174.16.0/20", "217.198.190.0/24", "217.218.0.0/15", "217.24.144.0/20", + "217.25.48.0/20", "217.60.0.0/16", "217.66.192.0/19", "217.77.112.0/20", "31.130.176.0/20", + "31.14.112.0/20", "31.14.144.0/20", "31.14.80.0/20", "31.170.48.0/20", "31.171.216.0/21", + "31.184.128.0/18", "31.193.112.0/21", "31.2.128.0/17", "31.214.132.0/23", "31.214.146.0/23", + "31.214.154.0/24", "31.214.168.0/21", "31.214.200.0/23", "31.214.228.0/22", "31.214.248.0/21", + "31.216.62.0/24", "31.217.208.0/21", "31.24.200.0/21", "31.24.232.0/21", "31.25.104.0/21", + "31.25.128.0/21", "31.25.232.0/23", "31.25.90.0/23", "31.25.92.0/22", "31.40.0.0/23", + "31.40.2.0/24", "31.41.35.0/24", "31.47.32.0/19", "31.56.0.0/14", "31.7.64.0/21", + "31.7.72.0/22", "31.7.76.0/23", "31.7.88.0/22", "31.7.96.0/19", "31.7.128.0/20", + "37.10.109.0/24", "37.10.117.0/24", "37.10.64.0/22", "37.114.192.0/18", "37.128.240.0/20", + "37.129.0.0/16", "37.130.200.0/21", "37.137.0.0/16", "37.143.144.0/21", "37.148.0.0/17", + "37.148.248.0/22", "37.152.160.0/19", "37.153.128.0/22", "37.153.176.0/20", "37.156.0.0/22", + "37.156.100.0/22", "37.156.112.0/20", "37.156.128.0/20", "37.156.144.0/22", "37.156.152.0/21", + "37.156.160.0/21", "37.156.176.0/22", "37.156.212.0/22", "37.156.232.0/21", "37.156.240.0/22", + "37.156.248.0/22", "37.156.48.0/20", "37.156.8.0/21", "37.156.16.0/20", "37.19.80.0/20", + "37.191.64.0/19", "37.202.128.0/17", "37.221.0.0/18", "37.228.131.0/24", "37.228.133.0/24", + "37.228.135.0/24", "37.228.136.0/22", "37.235.16.0/20", "37.254.0.0/15", "37.32.0.0/19", + "37.32.32.0/20", "37.32.112.0/20", "37.44.56.0/21", "37.49.144.0/21", "37.63.128.0/17", + "37.75.240.0/21", "37.9.248.0/21", "37.98.0.0/17", "45.128.140.0/22", "45.129.116.0/22", + "45.129.36.0/22", "45.132.168.0/21", "45.132.32.0/24", "45.135.240.0/22", "45.138.132.0/22", + "45.139.100.0/22", "45.139.9.0/24", "45.139.10.0/23", "45.140.224.0/21", "45.140.28.0/22", + "45.142.188.0/22", "45.144.124.0/22", "45.144.16.0/22", "45.147.76.0/22", "45.148.248.0/22", + "45.149.76.0/22", "45.15.200.0/22", "45.15.248.0/22", "45.150.88.0/22", "45.155.192.0/22", + "45.156.180.0/22", "45.156.184.0/22", "45.156.192.0/21", "45.156.200.0/22", "45.157.244.0/22", + "45.158.120.0/22", "45.159.112.0/22", "45.159.148.0/22", "45.159.196.0/22", "45.8.160.0/22", + "45.81.16.0/22", "45.82.136.0/22", "45.84.156.0/22", "45.84.248.0/22", "45.86.196.0/22", + "45.86.4.0/22", "45.86.87.0/24", "45.87.4.0/22", "45.89.136.0/22", "45.89.200.0/22", + "45.89.236.0/22", "45.9.144.0/22", "45.9.252.0/22", "45.90.72.0/22", "45.91.152.0/22", + "45.92.92.0/22", "45.93.168.0/22", "45.94.212.0/22", "45.94.252.0/22", "46.100.0.0/16", + "46.102.120.0/21", "46.102.128.0/20", "46.102.184.0/22", "46.143.0.0/17", "46.143.204.0/22", + "46.143.208.0/21", "46.143.244.0/22", "46.143.248.0/22", "46.148.32.0/20", "46.164.64.0/18", + "46.167.128.0/19", "46.18.248.0/21", "46.182.32.0/21", "46.209.0.0/16", "46.21.80.0/20", + "46.224.0.0/15", "46.235.76.0/23", "46.245.0.0/17", "46.248.32.0/19", "46.249.120.0/21", + "46.249.96.0/24", "46.251.224.0/24", "46.251.226.0/24", "46.251.237.0/24", "46.255.216.0/21", + "46.28.72.0/21", "46.32.0.0/19", "46.34.160.0/19", "46.34.96.0/19", "46.36.96.0/20", + "46.38.128.0/19", "46.41.192.0/18", "46.51.0.0/17", "46.62.128.0/17", "5.1.43.0/24", + "5.104.208.0/21", "5.106.0.0/16", "5.112.0.0/12", "5.134.128.0/18", "5.134.192.0/21", + "5.144.128.0/21", "5.145.112.0/22", "5.145.116.0/24", "5.159.48.0/21", "5.160.0.0/16", + "5.182.44.0/22", "5.190.0.0/16", "5.198.160.0/19", "5.200.64.0/18", "5.200.128.0/17", + "5.201.128.0/17", "5.202.0.0/16", "5.208.0.0/12", "5.22.0.0/17", "5.22.192.0/21", + "5.22.200.0/22", "5.23.112.0/21", "5.232.0.0/14", "5.236.0.0/17", "5.236.128.0/20", + "5.236.144.0/21", "5.236.156.0/22", "5.236.160.0/19", "5.236.192.0/18", "5.237.0.0/16", + "5.238.0.0/15", "5.250.0.0/17", "5.252.216.0/22", "5.253.225.0/24", "5.253.24.0/22", + "5.253.96.0/22", "5.34.208.0/20", "5.42.223.0/24", "5.52.0.0/16", "5.53.32.0/19", + "5.56.128.0/22", "5.56.132.0/24", "5.56.134.0/23", "5.57.32.0/21", "5.61.24.0/23", + "5.61.26.0/24", "5.61.28.0/22", "5.62.160.0/19", "5.62.192.0/18", "5.63.8.0/21", + "5.72.0.0/15", "5.74.0.0/16", "5.75.0.0/17", "62.102.128.0/20", "62.133.46.0/24", + "62.193.0.0/19", "62.204.61.0/24", "62.220.96.0/19", "62.3.14.0/24", "62.3.41.0/24", + "62.3.42.0/24", "62.32.50.0/24", "62.32.53.0/24", "62.60.128.0/20", "62.60.144.0/23", + "62.60.160.0/22", "62.60.196.0/22", "62.60.200.0/21", "62.60.232.0/21", "62.60.240.0/21", + "62.60.252.0/22", "63.243.185.0/24", "66.79.96.0/19", "69.194.64.0/18", "77.104.64.0/18", + "77.237.160.0/19", "77.237.64.0/19", "77.238.104.0/21", "77.238.112.0/20", "77.245.224.0/20", + "77.36.128.0/17", "77.42.0.0/17", "77.77.64.0/18", "77.81.128.0/21", "77.81.144.0/20", + "77.81.192.0/19", "77.81.32.0/20", "77.81.76.0/24", "77.81.78.0/24", "77.81.82.0/23", + "77.95.220.0/24", "78.109.192.0/20", "78.110.112.0/20", "78.111.0.0/20", "78.154.32.0/19", + "78.157.32.0/19", "78.158.160.0/19", "78.31.232.0/22", "78.38.0.0/15", "79.127.0.0/17", + "79.132.192.0/23", "79.132.200.0/21", "79.132.208.0/20", "79.143.84.0/23", "79.143.86.0/24", + "79.174.160.0/21", "79.175.128.0/18", "80.191.0.0/16", "80.210.0.0/18", "80.210.128.0/17", + "80.242.0.0/20", "80.249.112.0/22", "80.250.192.0/20", "80.253.128.0/19", "80.66.176.0/20", + "80.71.112.0/20", "80.71.149.0/24", "80.75.0.0/20", "80.91.208.0/24", "81.12.0.0/17", + "81.16.112.0/20", "81.163.0.0/21", "81.28.32.0/19", "81.29.240.0/20", "81.31.160.0/19", + "81.31.224.0/22", "81.31.228.0/23", "81.31.230.0/24", "81.31.233.0/24", "81.31.234.0/23", + "81.31.236.0/22", "81.31.240.0/22", "81.31.248.0/22", "81.90.144.0/20", "81.91.128.0/19", + "81.92.216.0/24", "82.138.140.0/24", "82.180.192.0/18", "82.97.240.0/20", "82.99.192.0/18", + "83.120.0.0/14", "83.147.192.0/23", "83.147.194.0/24", "83.147.240.0/22", "83.147.252.0/24", + "83.147.254.0/24", "83.150.192.0/22", "84.241.0.0/18", "84.47.192.0/18", "85.133.128.0/19", + "85.133.160.0/22", "85.133.164.0/24", "85.133.166.0/23", "85.133.168.0/21", "85.133.176.0/20", + "85.133.192.0/23", "85.133.195.0/24", "85.133.196.0/22", "85.133.200.0/21", "85.133.208.0/21", + "85.133.216.0/24", "85.133.218.0/23", "85.133.220.0/22", "85.133.224.0/21", "85.133.232.0/22", + "85.133.237.0/24", "85.133.239.0/24", "85.133.240.0/21", "85.133.248.0/22", "85.133.252.0/24", + "85.133.254.0/23", "85.15.0.0/18", "85.185.0.0/16", "85.198.0.0/19", "85.198.48.0/20", + "85.204.104.0/23", "85.204.128.0/22", "85.204.208.0/20", "85.204.30.0/23", "85.204.76.0/23", + "85.204.80.0/20", "85.208.252.0/22", "85.239.192.0/19", "85.9.64.0/18", "86.104.232.0/21", + "86.104.240.0/21", "86.104.32.0/20", "86.104.80.0/20", "86.104.96.0/20", "86.105.128.0/20", + "86.105.40.0/21", "86.106.142.0/24", "86.106.192.0/21", "86.107.0.0/20", "86.107.144.0/20", + "86.107.172.0/22", "86.107.208.0/20", "86.107.80.0/20", "86.109.32.0/19", "86.55.0.0/16", + "86.57.0.0/17", "87.107.0.0/16", "87.236.210.0/23", "87.236.213.0/24", "87.236.214.0/24", + "87.247.168.0/21", "87.247.176.0/20", "87.248.128.0/24", "87.248.139.0/24", "87.248.140.0/23", + "87.248.142.0/24", "87.248.147.0/24", "87.248.150.0/24", "87.248.152.0/23", "87.248.154.0/24", + "87.248.159.0/24", "87.251.128.0/19", "88.135.32.0/20", "88.135.68.0/24", "89.144.128.0/18", + "89.165.0.0/17", "89.196.0.0/16", "89.198.0.0/15", "89.219.192.0/18", "89.219.64.0/18", + "89.221.80.0/20", "89.235.64.0/18", "89.32.0.0/19", "89.32.196.0/23", "89.32.248.0/22", + "89.32.96.0/20", "89.33.100.0/22", "89.33.128.0/23", "89.33.18.0/23", "89.33.204.0/23", + "89.33.234.0/23", "89.33.240.0/23", "89.34.128.0/19", "89.34.168.0/23", "89.34.176.0/23", + "89.34.20.0/23", "89.34.200.0/23", "89.34.248.0/21", "89.34.32.0/19", "89.34.88.0/23", + "89.34.94.0/23", "89.35.120.0/22", "89.35.132.0/23", "89.35.156.0/23", "89.35.176.0/23", + "89.35.180.0/22", "89.35.194.0/23", "89.35.58.0/23", "89.35.68.0/22", "89.36.16.0/23", + "89.36.176.0/20", "89.36.194.0/23", "89.36.226.0/23", "89.36.252.0/23", "89.36.48.0/20", + "89.36.96.0/20", "89.37.0.0/20", "89.37.102.0/23", "89.37.144.0/21", "89.37.152.0/22", + "89.37.168.0/22", "89.37.198.0/23", "89.37.208.0/22", "89.37.218.0/23", "89.37.240.0/20", + "89.37.30.0/23", "89.37.42.0/23", "89.38.102.0/23", "89.38.184.0/21", "89.38.192.0/21", + "89.38.212.0/22", "89.38.24.0/23", "89.38.242.0/23", "89.38.244.0/22", "89.38.80.0/20", + "89.39.186.0/23", "89.39.208.0/24", "89.39.8.0/22", "89.40.106.0/23", "89.40.110.0/23", + "89.40.128.0/23", "89.40.152.0/21", "89.40.240.0/20", "89.40.78.0/23", "89.41.184.0/22", + "89.41.192.0/19", "89.41.240.0/21", "89.41.32.0/23", "89.41.40.0/22", "89.41.58.0/23", + "89.41.8.0/21", "89.41.16.0/21", "89.42.136.0/22", "89.42.150.0/23", "89.42.184.0/21", + "89.42.196.0/22", "89.42.208.0/22", "89.42.228.0/23", "89.42.32.0/23", "89.42.44.0/22", + "89.42.56.0/23", "89.42.68.0/23", "89.42.96.0/21", "89.43.0.0/20", "89.43.144.0/21", + "89.43.182.0/23", "89.43.188.0/23", "89.43.204.0/23", "89.43.216.0/21", "89.43.224.0/21", + "89.43.36.0/23", "89.43.70.0/23", "89.43.88.0/21", "89.43.96.0/21", "89.44.112.0/23", + "89.44.118.0/23", "89.44.128.0/21", "89.44.146.0/23", "89.44.176.0/21", "89.44.190.0/23", + "89.44.202.0/23", "89.44.240.0/22", "89.45.112.0/21", "89.45.126.0/23", "89.45.152.0/21", + "89.45.230.0/23", "89.45.48.0/20", "89.45.68.0/23", "89.45.80.0/23", "89.45.89.0/24", + "89.46.184.0/21", "89.46.216.0/22", "89.46.44.0/23", "89.46.60.0/23", "89.46.94.0/23", + "89.47.128.0/19", "89.47.196.0/22", "89.47.200.0/22", "89.47.64.0/20", "91.106.64.0/19", + "91.108.128.0/19", "91.109.104.0/21", "91.133.128.0/17", "91.147.64.0/20", "91.184.64.0/19", + "91.185.128.0/19", "91.186.192.0/23", "91.186.201.0/24", "91.186.216.0/23", "91.186.218.0/24", + "91.190.88.0/21", "91.194.6.0/24", "91.199.18.0/24", "91.199.27.0/24", "91.199.30.0/24", + "91.199.9.0/24", "91.207.138.0/23", "91.207.205.0/24", "91.208.165.0/24", "91.209.179.0/24", + "91.209.183.0/24", "91.209.184.0/24", "91.209.186.0/24", "91.209.242.0/24", "91.209.96.0/24", + "91.212.16.0/24", "91.212.252.0/24", "91.213.151.0/24", "91.213.157.0/24", "91.213.167.0/24", + "91.213.172.0/24", "91.216.4.0/24", "91.217.64.0/23", "91.220.113.0/24", "91.220.243.0/24", + "91.220.79.0/24", "91.221.240.0/23", "91.222.196.0/22", "91.222.204.0/22", "91.224.110.0/23", + "91.224.176.0/23", "91.224.20.0/23", "91.225.52.0/22", "91.226.225.0/24", "91.227.246.0/23", + "91.227.84.0/22", "91.228.132.0/23", "91.228.189.0/24", "91.228.22.0/23", "91.229.214.0/23", + "91.229.46.0/23", "91.230.32.0/24", "91.232.64.0/22", "91.232.68.0/23", "91.232.72.0/22", + "91.233.56.0/22", "91.236.168.0/23", "91.237.254.0/23", "91.238.0.0/24", "91.239.108.0/22", + "91.239.14.0/24", "91.239.214.0/24", "91.240.180.0/22", "91.240.60.0/22", "91.241.20.0/23", + "91.241.92.0/24", "91.242.44.0/23", "91.243.126.0/23", "91.243.160.0/20", "91.244.120.0/22", + "91.245.228.0/22", "91.246.44.0/24", "91.247.171.0/24", "91.247.174.0/24", "91.247.66.0/23", + "91.250.224.0/20", "91.251.0.0/16", "91.92.104.0/24", "91.92.114.0/24", "91.92.121.0/24", + "91.92.122.0/23", "91.92.124.0/22", "91.92.129.0/24", "91.92.130.0/23", "91.92.132.0/22", + "91.92.145.0/24", "91.92.146.0/23", "91.92.148.0/22", "91.92.156.0/22", "91.92.164.0/22", + "91.92.172.0/22", "91.92.180.0/22", "91.92.184.0/21", "91.92.192.0/23", "91.92.204.0/22", + "91.92.208.0/21", "91.92.220.0/22", "91.92.228.0/23", "91.92.231.0/24", "91.92.236.0/22", + "91.98.0.0/15", "92.114.16.0/20", "92.114.48.0/22", "92.114.64.0/20", "92.119.57.0/24", + "92.119.58.0/24", "92.119.68.0/22", "92.242.192.0/19", "92.246.144.0/22", "92.246.156.0/22", + "92.249.56.0/22", "92.42.48.0/21", "92.43.160.0/22", "92.61.176.0/20", "93.110.0.0/16", + "93.113.224.0/20", "93.114.104.0/21", "93.114.16.0/20", "93.115.120.0/21", "93.115.144.0/21", + "93.115.216.0/21", "93.115.224.0/20", "93.117.0.0/19", "93.117.32.0/20", "93.117.176.0/20", + "93.117.96.0/19", "93.118.180.0/22", "93.118.184.0/22", "93.118.96.0/19", "93.118.128.0/19", + "93.118.160.0/20", "93.119.208.0/20", "93.119.32.0/19", "93.119.64.0/19", "93.126.0.0/18", + "93.190.24.0/21", "93.88.64.0/21", "93.88.72.0/23", "93.93.204.0/24", "94.101.128.0/20", + "94.101.176.0/20", "94.101.240.0/20", "94.139.160.0/19", "94.176.32.0/21", "94.176.8.0/21", + "94.177.72.0/21", "94.182.0.0/15", "94.184.0.0/16", "94.199.136.0/22", "94.232.168.0/21", + "94.24.0.0/20", "94.24.16.0/21", "94.24.80.0/20", "94.24.96.0/21", "94.241.164.0/22", + "94.74.128.0/18", "95.130.225.0/24", "95.130.240.0/21", "95.130.56.0/21", "95.142.224.0/20", + "95.156.222.0/23", "95.156.233.0/24", "95.156.234.0/23", "95.156.236.0/23", "95.156.248.0/23", + "95.156.252.0/22", "95.162.0.0/16", "95.215.160.0/22", "95.215.173.0/24", "95.215.59.0/24", + "95.38.0.0/16", "95.64.0.0/17", "95.80.128.0/18", "95.81.64.0/18", "95.82.0.0/18"}; + +unsigned int iran_ip_ranges_length = sizeof(iran_ip_ranges) / sizeof(iran_ip_ranges[0]); diff --git a/ww/managers/data/iprange_irancell.c b/ww/managers/data/iprange_irancell.c new file mode 100644 index 00000000..2b59b38e --- /dev/null +++ b/ww/managers/data/iprange_irancell.c @@ -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]); diff --git a/ww/managers/data/iprange_mci.c b/ww/managers/data/iprange_mci.c new file mode 100644 index 00000000..59e98de1 --- /dev/null +++ b/ww/managers/data/iprange_mci.c @@ -0,0 +1,180 @@ +#include "ipranges.h" + +/* + AS197207 Mobile Communication Company of Iran PLC · mci.ir + + Country Iran + Website mci.ir + Hosted domains 150 + Number of IPv4 2,283,520 + Number of IPv6 1.32 × 1027 + ASN type ISP + Registry RIPE + Allocated 12 years ago on Sep 17, 2012 + Updated 5 months ago on Jan 14, 2024 + +*/ + +const char *mci_ip_ranges[] = { + "5.215.128.0/18", "5.215.128.0/17", "178.131.192.0/18", "5.217.112.0/20", "5.214.176.0/20", + "5.216.192.0/18", "31.2.128.0/18", "89.198.144.0/20", "5.217.0.0/18", "5.209.32.0/20", + "91.133.128.0/17", "89.196.208.0/20", "5.201.192.0/20", "5.216.32.0/20", "5.217.64.0/18", + "83.120.128.0/20", "5.210.192.0/20", "5.210.64.0/20", "5.211.224.0/20", "91.251.32.0/20", + "5.52.48.0/20", "83.123.192.0/20", "5.106.128.0/17", "5.217.192.0/18", "83.120.80.0/20", + "192.15.0.0/20", "5.52.80.0/20", "188.209.192.0/24", "172.80.128.0/18", "5.211.32.0/20", + "192.15.96.0/20", "5.214.160.0/20", "37.63.224.0/20", "86.107.0.0/24", "204.18.112.0/20", + "89.45.49.0/24", "5.106.32.0/20", "5.52.0.0/20", "93.110.128.0/18", "5.210.96.0/20", + "5.213.208.0/20", "83.123.64.0/20", "5.217.128.0/17", "172.80.144.0/20", "37.129.48.0/20", + "5.212.192.0/20", "5.217.240.0/20", "91.133.224.0/20", "5.106.224.0/20", "93.110.176.0/20", + "91.251.176.0/20", "5.208.0.0/17", "69.194.112.0/20", "5.217.64.0/20", "5.52.64.0/20", + "5.209.80.0/20", "5.216.64.0/18", "89.196.144.0/20", "83.120.176.0/20", "83.123.192.0/18", + "109.108.160.0/20", "192.15.240.0/20", "5.22.64.0/18", "5.216.80.0/20", "204.18.80.0/20", + "83.121.0.0/20", "89.196.16.0/20", "89.199.128.0/20", "5.22.32.0/20", "5.214.96.0/20", + "86.107.8.0/21", "185.131.56.0/22", "89.196.96.0/20", "158.58.96.0/20", "37.129.192.0/18", + "5.212.224.0/20", "91.133.240.0/20", "158.58.64.0/20", "188.229.64.0/20", "5.214.0.0/17", + "2a02:4540:7000::/42", "192.15.16.0/20", "5.22.48.0/20", "5.52.96.0/20", "86.107.1.0/24", + "86.55.112.0/20", "89.199.192.0/20", "93.110.208.0/20", "113.203.0.0/20", "93.110.192.0/20", + "5.215.192.0/20", "178.131.224.0/20", "5.106.0.0/21", "5.214.128.0/20", "89.196.0.0/20", + "83.120.0.0/20", "86.107.208.0/20", "46.164.64.0/20", "5.208.16.0/20", "5.214.240.0/20", + "83.122.208.0/20", "204.18.224.0/20", "5.209.208.0/20", "5.250.0.0/18", "37.129.112.0/20", + "5.208.1.0/24", "5.213.0.0/20", "158.58.0.0/18", "5.52.128.0/20", "5.214.16.0/20", + "91.251.128.0/20", "204.18.240.0/20", "5.211.0.0/17", "5.214.32.0/20", "5.22.112.0/20", + "5.212.208.0/20", "83.121.160.0/20", "5.216.176.0/20", "91.251.16.0/20", "46.51.64.0/20", + "89.198.208.0/20", "113.203.0.0/17", "113.203.80.0/20", "89.196.48.0/20", "89.198.64.0/20", + "5.22.80.0/20", "37.129.64.0/20", "83.122.160.0/20", "37.63.240.0/20", "46.164.80.0/20", + "5.210.112.0/20", "86.107.211.0/24", "37.63.144.0/20", "95.64.64.0/20", "5.217.48.0/20", + "5.209.240.0/20", "5.52.192.0/20", "188.212.48.0/20", "37.98.0.0/20", "158.58.64.0/19", + "192.15.0.0/18", "5.52.112.0/20", "188.210.192.0/20", "91.251.64.0/20", "5.215.176.0/20", + "5.210.176.0/20", "5.214.80.0/20", "204.18.0.0/20", "82.180.224.0/20", "5.213.32.0/20", + "5.106.17.0/24", "5.209.160.0/20", "31.2.128.0/20", "188.210.64.0/20", "5.215.0.0/17", + "185.22.29.0/24", "172.80.252.0/24", "83.121.16.0/20", "86.55.0.0/20", "5.214.128.0/18", + "91.133.208.0/20", "93.110.192.0/18", "158.58.64.0/18", "83.120.64.0/20", "5.106.32.0/19", + "5.217.96.0/20", "93.110.0.0/18", "204.18.192.0/18", "89.199.208.0/20", "188.209.192.0/20", + "89.45.53.0/24", "5.216.240.0/20", "158.58.80.0/20", "5.211.208.0/20", "5.213.112.0/20", + "5.215.16.0/20", "158.58.0.0/20", "5.106.14.0/24", "204.18.208.0/20", "37.129.128.0/17", + "5.210.128.0/20", "5.201.240.0/20", "89.198.48.0/20", "5.208.0.0/16", "5.209.192.0/20", + "204.18.96.0/20", "86.107.4.0/23", "83.121.96.0/20", "5.215.0.0/18", "188.229.48.0/20", + "5.106.7.0/24", "204.18.32.0/20", "109.203.128.0/20", "83.122.240.0/20", "5.214.208.0/20", + "82.180.192.0/20", "85.239.192.0/20", "5.208.128.0/17", "2a02:4540:5040::/42", "31.2.208.0/20", + "5.218.96.0/20", "83.122.0.0/16", "37.129.64.0/18", "93.110.48.0/20", "5.106.5.0/24", + "83.122.0.0/18", "37.63.160.0/20", "2a02:4540:c000::/42", "2a02:4540:c0::/43", "46.51.112.0/20", + "5.52.208.0/20", "5.208.96.0/20", "5.218.176.0/20", "5.212.160.0/20", "172.80.192.0/20", + "5.213.80.0/20", "113.203.0.0/18", "93.110.0.0/17", "5.209.128.0/17", "93.110.32.0/20", + "5.212.0.0/18", "5.106.240.0/20", "95.64.16.0/20", "83.122.96.0/20", "5.210.144.0/20", + "109.225.176.0/20", "164.138.176.0/20", "93.110.160.0/20", "31.2.192.0/18", "86.55.48.0/20", + "204.18.160.0/20", "5.213.176.0/20", "5.106.128.0/20", "93.110.80.0/20", "83.120.48.0/20", + "158.58.32.0/20", "2a02:4540:7080::/43", "5.106.50.0/24", "5.218.64.0/20", "5.250.32.0/20", + "89.198.0.0/17", "83.122.64.0/18", "89.196.64.0/20", "192.15.128.0/18", "37.129.160.0/20", + "83.121.64.0/20", "172.80.192.0/18", "5.209.0.0/16", "188.229.117.0/24", "91.251.0.0/17", + "5.106.192.0/20", "91.251.96.0/20", "5.106.24.0/22", "91.251.240.0/20", "89.196.128.0/17", + "37.129.176.0/20", "89.45.48.0/20", "172.80.255.0/24", "5.213.128.0/18", "5.218.160.0/20", + "86.55.160.0/20", "164.138.160.0/19", "188.122.96.0/20", "5.211.192.0/20", "5.215.144.0/20", + "2a02:4540:5000::/42", "83.122.48.0/20", "94.101.240.0/20", "192.15.0.0/17", "5.106.80.0/20", + "86.55.192.0/20", "85.239.208.0/20", "5.214.0.0/18", "89.196.160.0/20", "5.106.176.0/20", + "5.212.144.0/20", "5.217.80.0/20", "204.18.144.0/20", "130.255.192.0/20", "69.194.64.0/18", + "5.106.23.0/24", "83.120.144.0/20", "5.250.16.0/20", "83.121.48.0/20", "5.212.16.0/20", + "83.122.128.0/20", "5.208.176.0/20", "37.129.80.0/20", "5.218.224.0/20", "46.51.36.0/24", + "5.106.9.0/24", "89.199.80.0/20", "37.129.128.0/18", "95.64.48.0/20", "5.214.112.0/20", + "2a02:4540:5080::/44", "83.121.80.0/20", "192.15.208.0/20", "31.2.224.0/20", "86.55.96.0/20", + "192.15.160.0/20", "5.213.64.0/20", "5.215.208.0/20", "5.218.32.0/20", "5.52.0.0/16", + "5.208.0.0/20", "89.199.32.0/20", "192.15.80.0/20", "46.51.96.0/20", "89.199.224.0/20", + "91.251.48.0/20", "5.218.16.0/20", "2a02:4540:c040::/42", "5.218.208.0/20", "2a02:4540:e080::/48", + "83.123.16.0/20", "164.138.130.0/24", "5.209.144.0/20", "95.64.112.0/20", "89.196.240.0/20", + "5.213.192.0/18", "5.106.52.0/24", "5.250.112.0/20", "89.196.0.0/17", "5.211.0.0/20", + "5.213.128.0/20", "109.108.176.0/20", "5.216.224.0/20", "130.255.240.0/20", "89.196.176.0/20", + "5.213.144.0/20", "5.213.64.0/18", "5.216.208.0/20", "5.216.128.0/20", "204.18.128.0/20", + "192.15.112.0/20", "5.211.160.0/20", "5.215.160.0/20", "188.229.0.0/18", "130.255.224.0/20", + "37.63.192.0/18", "89.45.48.0/24", "37.63.208.0/20", "5.106.16.0/20", "37.129.16.0/20", + "5.250.96.0/20", "83.122.32.0/20", "83.120.128.0/17", "83.122.176.0/20", "89.196.0.0/16", + "91.251.192.0/20", "93.110.112.0/20", "93.110.128.0/17", "5.211.128.0/17", "5.52.16.0/20", + "5.201.192.0/18", "5.106.2.0/24", "5.210.0.0/16", "5.215.224.0/20", "192.15.192.0/18", + "86.55.0.0/17", "37.129.240.0/20", "89.199.96.0/20", "5.250.80.0/20", "37.98.48.0/20", + "5.213.160.0/20", "83.122.0.0/17", "5.211.112.0/20", "5.212.64.0/20", "83.122.16.0/20", + "5.218.0.0/20", "5.217.0.0/20", "31.2.160.0/20", "5.211.240.0/20", "86.55.240.0/20", + "113.203.16.0/20", "2a02:4540:40::/42", "5.215.0.0/20", "5.214.192.0/20", "83.123.48.0/20", + "89.199.112.0/20", "5.52.240.0/20", "5.212.96.0/20", "5.218.80.0/20", "37.129.192.0/20", + "5.216.0.0/17", "89.196.128.0/20", "192.15.128.0/20", "91.133.176.0/20", "176.65.192.0/19", + "83.120.224.0/20", "192.15.176.0/20", "5.250.0.0/20", "37.129.208.0/20", "83.121.0.0/16", + "83.123.128.0/20", "188.122.96.0/19", "172.80.240.0/20", "83.122.64.0/20", "83.123.128.0/18", + "2a02:4540:7040::/42", "5.214.144.0/20", "5.106.28.0/24", "5.217.128.0/20", "5.218.128.0/20", + "83.123.160.0/20", "5.212.80.0/20", "5.52.160.0/20", "5.214.0.0/16", "37.98.0.0/18", + "95.64.96.0/20", "5.216.192.0/20", "83.122.128.0/17", "109.203.144.0/20", "5.212.0.0/17", + "37.129.128.0/20", "5.208.224.0/20", "5.106.160.0/20", "5.208.192.0/20", "5.210.224.0/20", + "5.218.112.0/20", "113.203.96.0/20", "46.51.64.0/18", "89.199.0.0/17", "93.110.144.0/20", + "185.5.159.0/24", "89.198.224.0/20", "83.123.0.0/16", "2a02:4540:90c0::/42", "5.22.0.0/20", + "5.208.80.0/20", "5.215.112.0/20", "83.123.112.0/20", "89.199.144.0/20", "5.212.128.0/18", + "89.198.192.0/20", "89.198.96.0/20", "83.123.176.0/20", "69.194.80.0/20", "89.199.128.0/17", + "192.15.64.0/20", "5.216.16.0/20", "113.203.64.0/18", "93.110.0.0/20", "5.106.0.0/16", + "69.194.96.0/20", "69.194.64.0/20", "113.203.32.0/20", "83.120.160.0/20", "5.215.96.0/20", + "5.212.176.0/20", "164.138.160.0/20", "37.63.176.0/20", "5.106.22.0/24", "5.210.0.0/20", + "5.106.96.0/20", "5.208.32.0/20", "83.120.32.0/20", "86.55.80.0/20", "95.64.32.0/20", + "5.106.12.0/24", "5.106.0.0/24", "83.120.192.0/20", "89.45.52.0/24", "5.213.0.0/17", + "172.80.192.0/19", "91.251.0.0/16", "5.211.80.0/20", "5.218.0.0/17", "82.180.192.0/18", + "83.120.240.0/20", "83.122.192.0/20", "2a02:4540:9000::/42", "5.216.0.0/16", "91.133.160.0/20", + "91.251.0.0/20", "5.22.16.0/20", "5.215.64.0/18", "93.110.64.0/18", "158.58.48.0/20", + "93.110.240.0/20", "5.208.128.0/20", "83.120.16.0/20", "5.216.0.0/20", "5.213.48.0/20", + "2a02:4540:80::/42", "83.121.208.0/20", "46.51.16.0/20", "2a02:4540:e040::/42", "5.217.128.0/18", + "83.120.96.0/20", "109.225.160.0/20", "89.198.0.0/16", "89.199.240.0/20", "109.108.160.0/19", + "93.110.128.0/20", "113.203.112.0/20", "5.210.128.0/17", "204.18.64.0/18", "5.209.176.0/20", + "2a02:4540::/42", "5.215.240.0/20", "83.121.192.0/20", "5.209.0.0/17", "5.215.32.0/20", + "5.210.208.0/20", "37.129.0.0/20", "5.213.96.0/20", "95.64.0.0/18", "5.213.0.0/16", + "188.229.116.0/24", "5.217.176.0/20", "83.121.176.0/20", "5.22.0.0/18", "91.251.160.0/20", + "89.198.112.0/20", "109.225.144.0/20", "37.63.128.0/20", "83.122.80.0/20", "91.251.112.0/20", + "91.133.192.0/18", "89.198.176.0/20", "83.121.128.0/20", "83.123.96.0/20", "89.45.51.0/24", + "5.208.160.0/20", "5.210.32.0/20", "5.211.176.0/20", "158.58.32.0/19", "5.212.64.0/18", + "5.210.80.0/20", "86.55.0.0/16", "5.217.16.0/20", "5.22.0.0/17", "5.106.0.0/17", + "204.18.128.0/18", "5.106.4.0/24", "5.214.64.0/18", "46.51.0.0/20", "89.198.0.0/20", + "89.198.16.0/20", "91.133.192.0/20", "95.64.0.0/20", "89.196.112.0/20", "5.217.224.0/20", + "93.110.64.0/20", "5.215.80.0/20", "31.2.176.0/20", "83.122.112.0/20", "86.55.208.0/20", + "5.208.48.0/20", "5.208.240.0/20", "5.214.64.0/20", "89.199.16.0/20", "5.209.48.0/20", + "83.123.224.0/20", "5.212.0.0/20", "83.121.0.0/17", "83.121.32.0/20", "109.225.128.0/18", + "2a02:4540:e000::/42", "5.212.192.0/18", "5.213.128.0/17", "5.218.0.0/16", "5.106.13.0/24", + "89.198.160.0/20", "5.217.0.0/17", "5.52.32.0/20", "5.216.128.0/17", "37.63.128.0/18", + "5.214.192.0/18", "86.107.0.0/23", "91.133.128.0/18", "91.133.128.0/20", "5.209.224.0/20", + "83.122.128.0/18", "5.209.16.0/20", "172.80.160.0/20", "83.121.240.0/20", "5.209.112.0/20", + "188.229.32.0/20", "5.209.128.0/20", "172.80.176.0/20", "46.164.64.0/18", "89.199.0.0/16", + "188.229.80.0/20", "37.129.144.0/20", "93.110.16.0/20", "5.211.64.0/20", "5.213.16.0/20", + "83.121.144.0/20", "188.229.16.0/20", "5.214.0.0/20", "5.215.64.0/20", "5.106.10.0/24", + "188.229.0.0/20", "158.58.16.0/20", "5.216.144.0/20", "46.164.112.0/20", "5.106.112.0/20", + "5.250.0.0/17", "188.212.48.0/24", "93.110.224.0/20", "37.129.0.0/18", "192.15.224.0/20", + "5.214.224.0/20", "5.52.224.0/20", "5.106.64.0/20", "5.201.208.0/20", "37.63.128.0/17", + "83.123.80.0/20", "204.18.0.0/16", "204.18.48.0/20", "5.218.192.0/20", "46.164.96.0/20", + "5.106.29.0/24", "82.180.240.0/20", "5.213.0.0/18", "188.229.0.0/17", "5.217.144.0/20", + "192.15.192.0/20", "37.129.0.0/16", "83.120.0.0/17", "204.18.176.0/20", "5.106.0.0/20", + "5.106.64.0/18", "5.209.96.0/20", "5.250.64.0/18", "91.251.224.0/20", "172.80.208.0/20", + "185.5.156.0/22", "89.199.48.0/20", "5.106.8.0/24", "5.52.128.0/17", "5.106.144.0/20", + "5.216.112.0/20", "83.120.0.0/16", "86.55.32.0/20", "37.129.96.0/20", "91.251.128.0/17", + "113.203.64.0/20", "5.210.240.0/20", "95.64.64.0/18", "83.122.0.0/20", "5.209.0.0/20", + "80.242.0.0/20", "5.208.208.0/20", "204.18.0.0/18", "5.210.0.0/17", "5.217.160.0/20", + "86.55.176.0/20", "86.107.2.0/23", "5.52.144.0/20", "83.123.64.0/18", "89.198.240.0/20", + "158.58.0.0/17", "5.210.160.0/20", "5.217.192.0/20", "31.2.240.0/20", "83.121.112.0/20", + "86.55.224.0/20", "5.211.0.0/16", "5.216.64.0/20", "5.218.240.0/20", "86.55.128.0/17", + "89.196.32.0/20", "5.212.128.0/17", "89.198.32.0/20", "2a02:4540:9040::/42", "192.15.0.0/16", + "172.80.253.0/24", "192.15.64.0/18", "5.211.128.0/20", "86.55.16.0/20", "178.131.208.0/20", + "5.217.208.0/20", "5.106.20.0/24", "91.251.144.0/20", "83.120.208.0/20", "5.215.128.0/20", + "185.5.157.0/24", "5.211.144.0/20", "91.251.208.0/20", "86.107.208.0/24", "5.22.64.0/20", + "5.214.48.0/20", "5.215.192.0/18", "37.129.0.0/17", "89.199.160.0/20", "5.216.160.0/20", + "5.208.144.0/20", "83.121.128.0/17", "86.55.128.0/20", "5.213.224.0/20", "5.217.32.0/20", + "204.18.192.0/20", "5.212.240.0/20", "109.203.128.0/19", "172.80.254.0/24", "5.212.32.0/20", + "192.15.32.0/20", "5.106.15.0/24", "89.198.128.0/17", "130.255.192.0/18", "5.212.128.0/20", + "5.216.128.0/18", "93.110.96.0/20", "5.106.6.0/24", "2a02:4540:9080::/42", "172.80.128.0/20", + "5.218.128.0/17", "164.138.128.0/18", "5.106.16.0/24", "83.120.112.0/20", "89.199.0.0/20", + "83.123.128.0/17", "5.209.64.0/20", "91.133.144.0/20", "204.18.64.0/20", "185.5.156.0/24", + "5.52.176.0/20", "37.98.16.0/20", "89.198.80.0/20", "5.208.64.0/20", "5.210.16.0/20", + "5.106.11.0/24", "5.214.128.0/17", "37.129.224.0/20", "5.250.64.0/20", "31.2.192.0/20", + "82.180.208.0/20", "5.218.144.0/20", "89.196.80.0/20", "5.216.0.0/18", "83.123.32.0/20", + "89.45.54.0/24", "89.196.192.0/20", "37.63.192.0/20", "178.131.240.0/20", "91.251.80.0/20", + "5.208.112.0/20", "46.51.80.0/20", "5.213.240.0/20", "158.58.96.0/19", "204.18.16.0/20", + "93.110.0.0/16", "5.216.48.0/20", "158.58.0.0/19", "192.15.128.0/17", "83.123.0.0/17", + "130.255.208.0/20", "89.196.224.0/20", "5.211.16.0/20", "37.129.32.0/20", "109.225.128.0/20", + "158.58.112.0/20", "89.198.128.0/20", "83.123.0.0/18", "2a02:4540:5090::/44", "5.211.96.0/20", + "83.122.144.0/20", "83.123.144.0/20", "5.201.224.0/20", "5.212.112.0/20", "86.55.64.0/20", + "86.55.144.0/20", "5.210.48.0/20", "2a02:4540:70a0::/43", "172.80.128.0/17", "5.215.48.0/20", + "5.22.96.0/20", "31.2.128.0/17", "178.131.192.0/20", "31.2.144.0/20", "95.64.80.0/20", + "5.211.48.0/20", "5.216.96.0/20", "83.123.0.0/20", "172.80.224.0/20", "89.199.64.0/20", + "5.213.192.0/20", "89.199.176.0/20", "37.98.32.0/20", "5.106.208.0/20", "95.64.0.0/17", + "192.15.144.0/20", "83.122.224.0/20", "83.122.192.0/18", "113.203.48.0/20", "85.239.192.0/19", + "83.123.208.0/20", "192.15.48.0/20", "188.122.112.0/20", "5.52.0.0/17", "83.121.224.0/20", + "5.250.48.0/20", "83.123.240.0/20", "5.218.48.0/20", "5.212.48.0/20"}; + +unsigned int mci_ip_ranges_length = sizeof(mci_ip_ranges) / sizeof(mci_ip_ranges[0]); diff --git a/ww/managers/data/iprange_mokhaberat.c b/ww/managers/data/iprange_mokhaberat.c new file mode 100644 index 00000000..9273c0d1 --- /dev/null +++ b/ww/managers/data/iprange_mokhaberat.c @@ -0,0 +1,291 @@ +#include "ipranges.h" + +/* + AS58224 Iran Telecommunication Company PJS · tci.ir + + Country Iran + Website tci.ir + Hosted domains 7,639 + Number of IPv4 3,396,352 + Number of IPv6 1.21 × 1024 + ASN type ISP + Registry RIPE + Allocated 12 years ago on May 29, 2012 + Updated 2 months ago on May 08, 2024 +*/ + +const char *mokhaberat_ip_ranges[] = { + "80.191.80.0/24", "151.234.96.0/22", "2.187.15.0/24", "80.191.1.0/24", "5.239.0.0/17", + "80.191.88.0/21", "85.185.31.0/24", "2.181.32.0/22", "2.189.224.0/22", "151.234.144.0/23", + "89.42.100.0/22", "85.185.16.0/23", "5.236.96.0/21", "2.189.246.0/23", "37.202.196.0/22", + "151.245.40.0/22", "85.185.133.0/24", "217.219.160.0/20", "217.77.120.0/21", "78.39.158.0/24", + "89.39.8.0/22", "2.182.168.0/23", "5.238.0.0/17", "85.185.12.0/23", "5.239.144.0/20", + "37.202.192.0/22", "151.243.214.0/23", "151.245.160.0/22", "78.39.174.0/24", "89.36.108.0/22", + "2.183.236.0/23", "5.236.152.0/22", "195.181.64.0/20", "217.219.248.0/23", "5.237.192.0/18", + "109.74.224.0/20", "5.235.211.0/24", "212.33.208.0/23", "217.219.144.0/21", "5.200.201.0/24", + "188.212.64.0/19", "151.245.240.0/22", "89.235.104.0/22", "80.191.138.0/23", "78.39.186.0/23", + "46.100.32.0/20", "151.234.208.0/20", "86.107.172.0/22", "2.182.40.0/22", "37.202.160.0/22", + "89.38.80.0/20", "77.238.112.0/21", "5.236.144.0/21", "37.148.48.0/22", "217.218.66.0/24", + "185.131.108.0/22", "217.218.208.0/21", "78.39.42.0/24", "89.44.128.0/21", "46.100.156.0/22", + "151.247.172.0/22", "37.254.0.0/18", "188.209.8.0/21", "87.251.156.0/22", "85.185.164.0/23", + "78.39.132.0/22", "89.235.108.0/22", "151.245.44.0/22", "151.247.96.0/22", "217.218.156.0/24", + "80.191.216.0/22", "217.218.207.0/24", "85.185.235.0/24", "37.153.128.0/22", "2.182.212.0/23", + "151.234.8.0/21", "85.185.110.0/24", "217.219.16.0/22", "93.118.104.0/22", "85.185.252.0/22", + "185.116.44.0/22", "5.237.48.0/20", "5.234.0.0/19", "85.185.152.0/22", "151.234.204.0/22", + "85.185.48.0/20", "5.200.240.0/21", "86.107.80.0/20", "46.100.180.0/22", "2.189.20.0/22", + "37.148.44.0/22", "78.39.200.0/22", "91.92.180.0/22", "89.46.184.0/21", "151.247.168.0/22", + "2.183.56.0/22", "78.39.224.0/21", "37.202.152.0/22", "2.182.164.0/22", "37.148.52.0/22", + "85.185.254.0/24", "91.92.220.0/22", "78.38.24.0/23", "85.185.210.0/24", "87.251.152.0/22", + "195.181.48.0/21", "5.238.0.0/19", "151.247.150.0/23", "46.100.58.0/24", "2.182.208.0/22", + "151.235.64.0/18", "5.236.24.0/21", "80.191.174.0/23", "2.185.240.0/21", "89.219.64.0/18", + "188.209.16.0/20", "217.218.158.0/23", "2.181.160.0/20", "217.219.216.0/22", "5.219.128.0/17", + "78.39.88.0/21", "2.181.176.0/21", "89.37.208.0/22", "151.234.242.0/24", "46.100.164.0/22", + "5.232.176.0/20", "5.236.40.0/21", "84.47.220.0/22", "2.183.192.0/21", "89.37.152.0/22", + "2.185.160.0/19", "37.148.8.0/22", "2.182.104.0/22", "151.232.0.0/17", "185.131.148.0/22", + "37.156.128.0/20", "89.36.176.0/20", "151.245.164.0/22", "2.181.64.0/20", "2.182.202.0/23", + "2.183.232.0/23", "217.218.2.0/24", "151.234.176.0/21", "5.238.96.0/21", "37.202.156.0/22", + "151.234.0.0/22", "2.187.208.0/20", "2.179.176.0/20", "2.179.224.0/19", "37.255.137.0/24", + "151.234.6.0/24", "151.245.120.0/22", "217.219.254.0/24", "2.183.200.0/23", "151.245.232.0/22", + "151.234.68.0/23", "89.43.224.0/21", "80.191.240.0/21", "151.235.128.0/19", "5.200.224.0/20", + "2.181.216.0/22", "78.38.128.0/20", "151.245.32.0/22", "2.182.32.0/22", "188.210.232.0/22", + "2.183.136.0/22", "151.245.20.0/22", "151.234.240.0/24", "151.232.74.0/23", "5.233.224.0/20", + "78.39.32.0/21", "185.106.228.0/23", "151.232.104.0/23", "5.235.192.0/20", "92.246.144.0/22", + "91.92.124.0/22", "2.183.184.0/22", "2.187.18.0/24", "2.179.224.0/20", "46.100.140.0/24", + "188.215.176.0/20", "217.219.240.0/22", "89.43.144.0/22", "80.191.90.0/24", "89.37.148.0/23", + "2.185.128.0/19", "2.182.160.0/23", "46.100.96.0/22", "91.92.231.0/24", "151.234.128.0/21", + "151.247.116.0/22", "5.200.192.0/21", "78.39.222.0/23", "5.200.248.0/21", "37.148.90.0/23", + "85.185.154.0/24", "85.185.212.0/22", "151.234.146.0/23", "85.185.200.0/23", "89.235.102.0/23", + "151.247.252.0/22", "78.38.192.0/19", "80.191.198.0/24", "5.236.198.0/23", "2.182.112.0/21", + "85.185.234.0/24", "85.185.4.0/23", "151.234.148.0/24", "2.185.96.0/19", "195.181.120.0/21", + "93.118.108.0/23", "2.190.0.0/15", "89.37.144.0/23", "151.245.184.0/22", "217.218.154.0/24", + "151.234.252.0/22", "2.181.40.0/21", "37.148.28.0/22", "5.239.242.0/24", "2.189.248.0/23", + "151.245.36.0/22", "93.88.68.0/22", "2.181.196.0/22", "91.92.104.0/24", "217.218.62.0/24", + "5.236.208.0/20", "188.209.0.0/22", "5.236.88.0/21", "93.118.160.0/20", "151.245.144.0/22", + "151.243.192.0/23", "89.37.150.0/23", "2.187.40.0/21", "87.251.146.0/24", "151.234.200.0/22", + "185.131.128.0/22", "87.251.150.0/23", "80.191.58.0/23", "2.189.32.0/22", "2.184.0.0/19", + "85.185.84.0/22", "2.185.224.0/20", "91.92.134.0/23", "85.185.160.0/22", "78.39.138.0/23", + "188.212.224.0/20", "5.200.144.0/20", "5.238.192.0/18", "217.219.192.0/21", "5.237.128.0/18", + "86.105.40.0/21", "2.183.60.0/22", "151.232.126.0/23", "86.104.240.0/21", "188.0.247.0/24", + "2.182.216.0/21", "2.182.152.0/22", "5.104.208.0/21", "2.182.100.0/22", "5.200.128.0/20", + "151.234.48.0/22", "217.219.244.0/22", "217.218.124.0/24", "85.185.230.0/23", "85.185.232.0/23", + "151.234.198.0/23", "5.239.172.0/22", "188.213.176.0/20", "151.234.188.0/22", "217.218.220.0/22", + "46.100.228.0/22", "2.187.17.0/24", "2.181.80.0/20", "151.247.124.0/22", "78.38.48.0/23", + "2.181.48.0/21", "93.119.64.0/19", "78.39.140.0/23", "5.200.176.0/20", "78.38.234.0/23", + "2.179.52.0/23", "89.40.240.0/20", "195.181.112.0/21", "2.179.192.0/21", "217.218.188.0/22", + "80.191.128.0/20", "151.234.4.0/23", "217.218.183.0/24", "217.218.126.0/24", "78.39.129.0/24", + "185.107.34.0/23", "85.185.172.0/24", "93.118.112.0/20", "93.115.120.0/21", "78.38.104.0/23", + "151.234.104.0/21", "185.131.84.0/22", "78.38.230.0/23", "185.111.80.0/22", "93.114.104.0/21", + "5.239.192.0/20", "80.250.196.0/22", "85.185.204.0/23", "151.243.240.0/23", "151.247.100.0/22", + "91.92.121.0/24", "31.7.112.0/21", "217.172.112.0/23", "80.210.160.0/20", "85.185.228.0/23", + "2.182.204.0/22", "78.39.80.0/21", "151.234.165.0/24", "2.179.0.0/21", "217.218.248.0/21", + "80.191.224.0/21", "151.247.52.0/22", "37.254.128.0/18", "37.156.240.0/22", "85.185.211.0/24", + "92.246.156.0/22", "2.184.172.0/22", "78.38.56.0/21", "78.39.180.0/22", "188.214.96.0/22", + "2.183.234.0/23", "78.39.240.0/22", "188.211.216.0/21", "151.234.136.0/21", "2.187.240.0/21", + "80.191.192.0/23", "93.117.0.0/19", "5.234.128.0/19", "31.7.120.0/24", "91.92.156.0/22", + "2.182.64.0/19", "2.182.136.0/21", "2.176.0.0/15", "31.7.96.0/21", "78.39.252.0/23", + "78.39.176.0/23", "85.185.156.0/22", "2.182.98.0/23", "151.247.48.0/22", "151.247.144.0/22", + "185.131.100.0/22", "2.184.128.0/19", "5.234.64.0/19", "87.251.147.0/24", "85.204.208.0/20", + "151.234.192.0/24", "5.234.208.0/21", "46.100.76.0/22", "151.234.112.0/21", "151.247.120.0/22", + "31.7.104.0/22", "78.39.220.0/24", "46.100.72.0/22", "151.245.124.0/22", "213.109.240.0/21", + "2.189.216.0/22", "2.182.248.0/22", "2.184.160.0/23", "37.255.0.0/18", "151.235.180.0/22", + "2.182.252.0/24", "78.39.142.0/23", "5.235.212.0/22", "185.124.156.0/22", "151.234.16.0/22", + "5.238.152.0/21", "89.36.100.0/22", "151.245.172.0/22", "2.182.176.0/20", "5.190.128.0/17", + "5.236.128.0/20", "80.191.20.0/24", "217.218.204.0/23", "5.234.184.0/21", "151.235.160.0/20", + "37.202.144.0/22", "151.234.60.0/22", "151.245.200.0/22", "151.232.106.0/23", "151.245.112.0/22", + "188.213.144.0/20", "151.234.154.0/23", "5.238.48.0/22", "66.79.96.0/21", "5.234.48.0/20", + "151.235.184.0/21", "217.218.192.0/21", "85.185.30.0/24", "185.80.100.0/22", "188.208.56.0/21", + "5.238.144.0/22", "31.7.122.0/23", "85.185.76.0/22", "85.185.108.0/22", "85.185.24.0/22", + "2.189.36.0/23", "5.235.148.0/23", "86.104.96.0/20", "217.218.176.0/22", "217.219.184.0/21", + "151.245.100.0/22", "5.53.32.0/19", "2.180.0.0/17", "91.92.192.0/23", "151.245.92.0/22", + "85.185.192.0/21", "2.183.208.0/20", "85.185.216.0/21", "85.185.20.0/22", "84.47.232.0/22", + "151.234.150.0/23", "151.232.64.0/22", "151.235.0.0/19", "46.100.56.0/23", "37.254.0.0/15", + "85.185.248.0/23", "2.179.172.0/22", "78.39.154.0/24", "89.33.100.0/22", "5.233.248.0/23", + "5.239.128.0/20", "78.38.50.0/24", "94.176.8.0/21", "31.7.121.0/24", "185.131.168.0/23", + "185.131.140.0/22", "188.211.208.0/21", "151.234.87.0/24", "5.233.240.0/21", "217.219.120.0/21", + "78.38.232.0/23", "151.234.120.0/21", "78.39.192.0/21", "80.210.208.0/20", "185.105.100.0/22", + "217.218.240.0/21", "188.213.208.0/23", "77.238.124.0/22", "185.107.32.0/23", "80.191.26.0/23", + "217.219.0.0/20", "5.235.150.0/23", "2.181.112.0/20", "85.185.208.0/23", "80.210.20.0/22", + "2.179.112.0/20", "217.218.232.0/21", "217.218.128.0/20", "5.236.192.0/22", "85.185.44.0/22", + "85.185.224.0/22", "185.112.128.0/22", "5.233.46.0/23", "151.234.244.0/23", "178.238.192.0/23", + "185.131.136.0/22", "91.244.120.0/22", "80.191.248.0/22", "217.218.68.0/22", "151.247.24.0/22", + "84.47.238.0/23", "151.234.152.0/23", "46.100.68.0/22", "46.100.120.0/21", "5.219.0.0/17", + "46.100.84.0/22", "151.234.70.0/23", "46.100.216.0/21", "188.212.200.0/21", "151.247.86.0/23", + "151.245.176.0/22", "5.238.32.0/20", "2.187.160.0/19", "2.179.164.0/22", "217.218.196.0/23", + "91.92.228.0/23", "151.234.248.0/22", "151.232.68.0/23", "2.179.56.0/22", "5.53.56.0/24", + "5.232.208.0/21", "85.185.188.0/22", "2.184.170.0/23", "151.234.224.0/20", "78.38.40.0/23", + "5.237.0.0/16", "5.237.32.0/20", "217.218.202.0/23", "188.214.216.0/21", "188.209.32.0/20", + "78.38.0.0/21", "151.247.112.0/22", "85.185.43.0/24", "80.191.188.0/22", "2.189.24.0/23", + "80.250.192.0/22", "85.185.112.0/21", "78.38.96.0/22", "80.210.176.0/20", "151.247.152.0/22", + "2.179.8.0/22", "151.234.100.0/22", "2.183.120.0/22", "151.234.24.0/21", "2.187.192.0/20", + "78.39.0.0/20", "151.245.196.0/22", "217.219.52.0/22", "2.183.64.0/20", "77.81.144.0/20", + "46.100.152.0/22", "46.102.184.0/22", "46.100.102.0/23", "5.234.220.0/22", "78.39.64.0/20", + "5.234.168.0/21", "176.223.80.0/21", "78.39.232.0/22", "188.0.248.0/21", "5.236.80.0/21", + "151.234.186.0/23", "151.247.92.0/22", "2.179.54.0/23", "37.202.164.0/22", "89.40.152.0/21", + "151.243.228.0/22", "217.172.104.0/21", "80.191.110.0/23", "2.184.192.0/18", "78.38.224.0/23", + "80.191.96.0/22", "84.47.236.0/24", "91.190.88.0/21", "89.37.146.0/23", "85.185.136.0/24", + "178.236.96.0/20", "89.38.184.0/21", "85.185.0.0/22", "46.100.236.0/22", "217.219.32.0/21", + "178.238.206.0/23", "176.65.248.0/22", "151.245.116.0/22", "2.179.208.0/20", "2.187.32.0/19", + "5.235.216.0/21", "2.181.56.0/21", "85.185.28.0/23", "5.234.160.0/21", "185.136.172.0/22", + "5.238.104.0/22", "5.233.40.0/22", "85.185.186.0/23", "151.233.56.0/22", "5.236.0.0/20", + "91.92.130.0/23", "5.198.166.0/23", "2.181.194.0/23", "87.251.128.0/21", "5.233.128.0/19", + "2.182.96.0/23", "78.39.166.0/24", "185.131.124.0/22", "2.179.48.0/22", "37.156.112.0/20", + "80.191.60.0/22", "5.239.208.0/21", "80.210.240.0/21", "85.185.88.0/21", "217.219.208.0/22", + "85.185.128.0/21", "93.117.32.0/20", "217.218.143.0/24", "217.218.180.0/24", "2.182.162.0/23", + "89.45.112.0/21", "2.183.142.0/23", "5.232.192.0/20", "151.234.88.0/23", "217.219.56.0/21", + "46.100.128.0/22", "151.232.110.0/23", "2.183.16.0/20", "78.38.8.0/21", "80.191.100.0/22", + "91.92.236.0/22", "80.191.66.0/24", "85.185.138.0/23", "217.172.102.0/23", "46.248.32.0/19", + "84.47.254.0/23", "85.185.100.0/22", "84.47.212.0/22", "5.235.152.0/21", "176.65.232.0/21", + "86.104.80.0/20", "151.245.72.0/22", "89.42.184.0/21", "151.234.32.0/20", "2.185.32.0/19", + "2.189.228.0/22", "185.106.230.0/23", "78.38.44.0/22", "2.181.36.0/22", "176.65.224.0/21", + "151.245.60.0/22", "188.211.192.0/19", "31.7.108.0/23", "2.179.160.0/22", "217.218.206.0/24", + "89.45.152.0/21", "78.39.254.0/23", "151.232.10.0/24", "2.182.240.0/21", "151.245.108.0/22", + "80.191.252.0/22", "188.0.244.0/24", "80.191.61.0/24", "217.218.178.0/24", "151.232.128.0/17", + "80.191.84.0/22", "80.191.64.0/20", "185.131.90.0/23", "5.198.160.0/22", "2.183.80.0/20", + "5.235.0.0/17", "46.100.144.0/21", "78.39.246.0/24", "37.202.132.0/22", "151.245.76.0/22", + "5.233.44.0/23", "37.148.12.0/22", "78.38.32.0/21", "151.234.246.0/23", "151.245.88.0/22", + "2.183.152.0/22", "46.100.61.0/24", "85.185.40.0/23", "188.213.96.0/19", "5.238.148.0/22", + "5.237.64.0/20", "78.39.16.0/21", "2.184.162.0/23", "185.131.164.0/22", "2.184.176.0/20", + "91.92.148.0/22", "80.191.208.0/22", "188.215.128.0/20", "5.232.64.0/19", "5.233.192.0/19", + "2.183.160.0/20", "89.42.96.0/23", "5.235.176.0/21", "151.247.136.0/22", "2.179.128.0/19", + "151.245.208.0/21", "2.179.20.0/22", "78.39.136.0/24", "188.215.240.0/23", "2.189.236.0/22", + "85.185.207.0/24", "93.119.32.0/19", "5.234.44.0/23", "37.202.136.0/22", "46.100.168.0/22", + "2.181.224.0/19", "78.39.248.0/22", "217.219.44.0/22", "2.182.128.0/21", "2.182.175.0/24", + "80.191.25.0/24", "85.185.173.0/24", "217.219.88.0/21", "2.184.168.0/23", "188.211.128.0/19", + "37.148.20.0/22", "80.210.128.0/20", "5.234.224.0/19", "217.218.125.0/24", "2.181.220.0/23", + "185.131.92.0/22", "212.33.214.0/23", "151.245.188.0/22", "37.148.60.0/22", "91.92.164.0/22", + "46.100.100.0/23", "37.255.128.0/18", "66.79.104.0/24", "2.179.96.0/20", "2.181.188.0/22", + "217.219.224.0/21", "89.235.80.0/21", "151.234.194.0/23", "37.148.24.0/22", "93.117.120.0/21", + "80.191.194.0/23", "37.148.36.0/22", "78.39.160.0/20", "46.100.59.0/24", "2.182.48.0/20", + "5.238.128.0/20", "37.156.176.0/22", "151.233.48.0/21", "84.47.192.0/20", "2.187.248.0/22", + "37.148.104.0/22", "78.39.144.0/22", "80.191.232.0/22", "80.191.104.0/22", "66.79.116.0/23", + "185.18.156.0/22", "31.14.80.0/20", "5.234.176.0/21", "31.7.110.0/23", "195.181.0.0/19", + "217.219.64.0/20", "185.115.76.0/23", "80.250.200.0/21", "31.14.144.0/20", "46.100.104.0/23", + "2.182.144.0/21", "85.185.240.0/23", "2.179.16.0/22", "5.239.245.0/24", "151.245.56.0/22", + "5.234.40.0/22", "46.100.208.0/21", "78.38.72.0/21", "5.200.160.0/20", "85.185.42.0/24", + "86.105.128.0/20", "37.255.192.0/18", "80.191.152.0/21", "2.179.169.0/24", "217.218.186.0/23", + "2.179.80.0/20", "85.185.220.0/24", "2.179.200.0/21", "178.238.204.0/23", "212.33.210.0/23", + "93.115.216.0/21", "2.179.60.0/23", "78.38.152.0/21", "89.40.245.0/24", "151.233.128.0/17", + "80.191.160.0/21", "93.118.96.0/21", "46.100.160.0/22", "2.189.244.0/23", "185.133.164.0/22", + "2.181.200.0/21", "151.234.80.0/22", "185.120.246.0/23", "78.39.247.0/24", "78.38.80.0/21", + "195.181.56.0/21", "217.171.148.0/22", "2.182.120.0/22", "80.191.168.0/22", "217.218.144.0/21", + "217.77.112.0/21", "2.187.128.0/19", "84.47.211.0/24", "151.232.100.0/22", "217.171.145.0/24", + "151.232.76.0/24", "46.100.172.0/22", "80.191.0.0/20", "78.39.44.0/23", "151.245.104.0/22", + "151.245.64.0/22", "2.187.48.0/20", "185.131.88.0/22", "151.232.124.0/23", "89.44.176.0/21", + "85.204.80.0/20", "85.185.250.0/23", "151.247.84.0/23", "151.245.156.0/22", "2.179.64.0/20", + "31.7.124.0/22", "2.183.188.0/22", "5.233.252.0/23", "5.200.208.0/20", "5.200.202.0/23", + "46.100.6.0/23", "78.39.178.0/23", "217.218.120.0/22", "5.236.224.0/19", "185.133.125.0/24", + "2.181.96.0/20", "66.79.118.0/23", "151.232.70.0/23", "86.107.144.0/20", "151.247.243.0/24", + "85.185.8.0/22", "2.185.0.0/20", "37.156.212.0/22", "85.185.184.0/23", "80.191.112.0/20", + "46.100.48.0/21", "178.238.202.0/23", "5.238.160.0/19", "151.245.84.0/22", "5.198.160.0/19", + "80.210.248.0/21", "2a04:2680:13::/48", "5.234.192.0/20", "188.213.210.0/23", "217.219.96.0/20", + "151.247.160.0/22", "185.88.48.0/23", "78.38.168.0/21", "2.180.128.0/17", "5.239.224.0/20", + "78.38.52.0/24", "5.239.252.0/22", "80.210.192.0/20", "93.88.72.0/23", "2.183.112.0/21", + "5.239.216.0/21", "91.250.224.0/20", "217.219.176.0/21", "5.236.32.0/21", "5.239.180.0/22", + "185.120.244.0/23", "37.148.0.0/22", "5.236.160.0/19", "85.185.120.0/21", "5.235.128.0/20", + "37.202.200.0/22", "80.210.32.0/19", "217.219.24.0/21", "217.218.164.0/24", "151.247.88.0/22", + "151.247.140.0/22", "46.100.64.0/22", "151.234.241.0/24", "2.189.240.0/23", "2.189.250.0/23", + "178.238.198.0/23", "2.178.0.0/16", "2.189.8.0/22", "176.65.160.0/19", "188.211.64.0/18", + "2.181.184.0/22", "2.183.144.0/21", "78.39.221.0/24", "178.238.200.0/23", "78.38.100.0/22", + "85.185.14.0/23", "213.109.248.0/21", "2.185.252.0/23", "85.185.236.0/22", "217.219.112.0/21", + "217.218.124.0/23", "185.131.152.0/21", "188.212.160.0/19", "151.245.228.0/22", "2.182.124.0/22", + "78.38.42.0/23", "151.247.72.0/22", "217.218.72.0/21", "78.38.26.0/23", "151.243.250.0/23", + "37.148.124.0/22", "2.183.48.0/21", "151.232.108.0/23", "217.218.200.0/22", "5.236.108.0/23", + "78.39.137.0/24", "46.100.98.0/24", "84.47.210.0/24", "2.187.6.0/23", "80.191.182.0/23", + "5.236.112.0/20", "5.236.16.0/21", "78.38.228.0/23", "46.235.76.0/23", "217.218.218.0/23", + "37.202.188.0/22", "151.247.156.0/22", "80.191.180.0/23", "188.210.80.0/21", "2.182.170.0/23", + "5.234.96.0/19", "84.47.240.0/21", "151.243.224.0/22", "78.38.28.0/22", "217.218.123.0/24", + "151.247.28.0/22", "80.191.186.0/23", "89.235.100.0/23", "87.251.136.0/22", "85.185.64.0/22", + "80.191.109.0/24", "5.235.192.0/18", "188.240.248.0/21", "217.24.144.0/20", "78.38.108.0/22", + "85.185.80.0/22", "78.39.112.0/22", "217.219.128.0/20", "87.251.140.0/22", "151.233.0.0/17", + "151.234.72.0/21", "5.232.0.0/18", "217.218.26.0/24", "185.72.80.0/22", "80.210.18.0/23", + "2.182.174.0/24", "2.187.96.0/19", "151.247.82.0/23", "217.218.160.0/22", "217.218.180.0/22", + "2.179.40.0/21", "80.191.178.0/24", "91.92.129.0/24", "217.218.0.0/18", "46.100.5.0/24", + "85.185.203.0/24", "91.92.204.0/22", "37.156.160.0/21", "46.100.224.0/22", "2.183.140.0/23", + "151.245.168.0/22", "217.218.152.0/23", "5.233.96.0/20", "5.236.196.0/23", "5.236.156.0/22", + "2.183.124.0/22", "37.156.248.0/22", "217.218.224.0/21", "217.219.152.0/21", "217.219.212.0/22", + "37.148.56.0/22", "212.33.212.0/23", "2.179.240.0/20", "217.218.184.0/24", "46.100.112.0/22", + "80.191.200.0/21", "5.236.64.0/20", "151.243.242.0/23", "2.183.240.0/20", "151.234.156.0/22", + "78.39.130.0/23", "151.245.52.0/22", "151.234.160.0/24", "188.209.64.0/20", "151.232.77.0/24", + "217.172.118.0/24", "80.210.144.0/20", "217.219.80.0/21", "185.136.220.0/22", "78.38.226.0/23", + "5.233.120.0/21", "78.38.16.0/21", "78.38.148.0/22", "2.185.48.0/20", "84.47.252.0/24", + "5.239.176.0/22", "2.182.173.0/24", "85.185.168.0/22", "188.211.200.0/21", "78.39.60.0/23", + "78.39.96.0/21", "80.191.108.0/24", "2.182.0.0/19", "80.191.197.0/24", "78.39.244.0/23", + "5.237.0.0/20", "80.191.48.0/21", "151.247.132.0/22", "37.148.100.0/22", "80.191.28.0/22", + "80.191.82.0/23", "80.191.82.0/24", "151.245.132.0/22", "2.182.44.0/22", "151.234.90.0/23", + "66.79.105.0/24", "185.108.96.0/22", "188.0.246.0/24", "46.100.60.0/24", "78.39.118.0/23", + "80.210.0.0/20", "188.211.176.0/20", "85.185.72.0/22", "151.247.128.0/22", "217.172.116.0/23", + "66.79.114.0/23", "2.189.232.0/22", "5.235.144.0/22", "151.245.80.0/22", "151.243.232.0/22", + "46.100.240.0/22", "176.65.244.0/22", "77.81.128.0/21", "78.39.216.0/22", "151.234.243.0/24", + "217.218.117.0/24", "86.106.192.0/21", "5.232.160.0/20", "89.34.248.0/21", "77.81.32.0/20", + "151.235.192.0/18", "151.245.192.0/22", "5.235.188.0/22", "91.92.208.0/21", "89.37.248.0/21", + "151.235.32.0/19", "5.235.160.0/20", "188.208.202.0/23", "5.200.204.0/22", "151.245.136.0/22", + "46.100.248.0/22", "91.109.104.0/21", "2.186.0.0/16", "178.238.194.0/23", "5.233.160.0/19", + "89.43.148.0/22", "85.185.202.0/24", "2.184.64.0/18", "217.218.216.0/23", "2.183.176.0/21", + "188.211.32.0/19", "195.181.32.0/20", "5.234.32.0/22", "93.118.110.0/23", "80.191.32.0/21", + "80.191.57.0/24", "85.185.140.0/23", "5.234.216.0/22", "78.38.176.0/20", "151.245.96.0/22", + "188.215.192.0/19", "37.148.32.0/22", "78.38.236.0/24", "78.39.148.0/22", "151.235.176.0/22", + "78.38.64.0/21", "80.191.16.0/21", "2.183.204.0/22", "185.117.48.0/22", "85.185.231.0/24", + "2.183.0.0/20", "5.233.0.0/19", "151.245.244.0/22", "80.191.184.0/23", "78.38.160.0/21", + "2.189.16.0/22", "85.204.128.0/22", "185.71.152.0/22", "2.183.96.0/20", "85.185.6.0/23", + "2.183.132.0/22", "80.210.224.0/20", "80.191.212.0/22", "91.92.114.0/24", "2.183.202.0/23", + "2.185.64.0/19", "81.16.112.0/20", "151.245.24.0/22", "151.245.28.0/22", "2.182.110.0/23", + "89.43.216.0/21", "5.233.64.0/19", "91.92.145.0/24", "217.218.96.0/20", "185.131.170.0/23", + "151.234.196.0/23", "185.165.206.0/24", "93.115.224.0/20", "78.39.159.0/24", "91.147.64.0/20", + "89.235.112.0/20", "46.100.8.0/21", "78.38.213.0/24", "2.182.254.0/24", "80.191.74.0/24", + "46.100.118.0/23", "217.219.232.0/21", "89.40.240.0/22", "217.218.166.0/23", "85.185.142.0/23", + "89.35.120.0/22", "2.184.32.0/19", "185.120.236.0/22", "89.38.192.0/21", "178.238.196.0/23", + "85.185.186.0/24", "37.202.140.0/22", "80.191.8.0/24", "5.239.244.0/24", "46.100.252.0/23", + "5.239.184.0/21", "2.183.238.0/23", "151.232.9.0/24", "2.189.38.0/23", "2.179.62.0/23", + "5.235.186.0/23", "85.185.95.0/24", "85.185.206.0/24", "151.247.208.0/22", "195.181.80.0/20", + "2.184.164.0/22", "78.38.144.0/22", "5.233.48.0/20", "93.117.96.0/20", "217.219.200.0/21", + "81.12.28.0/24", "78.38.219.0/24", "80.191.40.0/21", "2.183.156.0/22", "5.235.236.0/22", + "46.100.188.0/22", "185.79.156.0/22", "5.200.128.0/19", "2.189.220.0/22", "2.187.16.0/24", + "151.232.96.0/22", "85.185.166.0/23", "5.236.48.0/20", "151.245.216.0/21", "2.179.170.0/24", + "85.185.176.0/21", "2.189.252.0/23", "78.38.106.0/23", "217.219.40.0/22", "46.100.116.0/23", + "85.185.71.0/24", "5.239.244.0/23", "46.100.88.0/21", "5.236.200.0/21", "66.79.112.0/23", + "78.39.188.0/22", "217.218.87.0/24", "5.236.110.0/23", "46.100.62.0/23", "2.185.192.0/19", + "217.219.250.0/23", "151.243.244.0/23", "37.156.100.0/22", "2.189.28.0/22", "217.218.157.0/24", + "2.179.32.0/21", "46.100.142.0/23", "2.182.200.0/24", "66.79.120.0/21", "89.42.98.0/23", + "151.234.20.0/22", "151.245.180.0/22", "188.211.192.0/21", "213.195.52.0/22", "2.182.224.0/20", + "5.237.16.0/20", "5.233.254.0/23", "46.100.176.0/22", "89.36.48.0/20", "46.100.136.0/22", + "2.182.253.0/24", "78.38.54.0/24", "85.185.104.0/22", "89.38.244.0/22", "89.219.192.0/18", + "185.120.228.0/22", "46.102.120.0/21", "5.238.108.0/23", "5.233.250.0/23", "46.100.161.0/24", + "5.75.0.0/17", "217.218.168.0/21", "37.254.192.0/18", "89.36.106.0/23", "2.187.19.0/24", + "2.187.224.0/20", "5.232.224.0/19", "188.209.4.0/22", "78.39.52.0/24", "151.245.204.0/22", + "78.38.112.0/21", "78.39.24.0/21", "84.47.248.0/22", "91.227.84.0/22", "217.219.20.0/22", + "217.218.6.0/24", "151.234.92.0/22", "84.47.253.0/24", "151.234.56.0/22", "217.218.9.0/24", + "188.214.160.0/19", "151.245.236.0/22", "66.79.106.0/23", "2.187.0.0/19", "188.212.144.0/21", + "85.185.244.0/22", "80.191.144.0/21", "80.210.17.0/24", "188.215.242.0/23", "151.232.120.0/22", + "151.234.7.0/24", "185.115.78.0/24", "2.185.16.0/20", "2.185.248.0/22", "5.190.240.0/20", + "37.202.148.0/22", "5.234.36.0/22", "85.185.32.0/22", "85.185.68.0/23", "217.218.15.0/24", + "5.200.200.0/24", "151.234.163.0/24", "217.218.112.0/21", "5.238.64.0/19", "151.234.52.0/22", + "151.234.166.0/24", "66.79.108.0/22", "80.191.196.0/24", "5.236.104.0/23", "93.88.64.0/22", + "2.179.28.0/22", "151.245.128.0/22", "89.235.88.0/21", "185.131.116.0/22", "5.233.112.0/21", + "91.92.132.0/23", "91.92.146.0/23", "78.39.236.0/22", "78.39.204.0/22", "151.245.140.0/22", + "5.190.0.0/17", "5.234.46.0/23", "212.33.216.0/21", "5.235.240.0/20", "5.62.160.0/19", + "217.172.114.0/23", "46.100.244.0/22", "78.39.184.0/22", "151.243.248.0/23", "46.182.32.0/21", + "78.38.120.0/21", "78.39.104.0/21", "2.183.128.0/22", "5.74.0.0/16", "78.39.120.0/21", + "78.38.88.0/21", "185.131.112.0/22", "93.118.128.0/19", "37.202.128.0/22", "85.185.96.0/22", + "80.191.176.0/23", "80.191.236.0/22", "46.100.80.0/22", "188.208.200.0/23", "46.100.132.0/22", + "151.245.152.0/22", "151.247.56.0/22", "2.189.12.0/22", "91.222.204.0/22", "2.187.64.0/19", + "37.148.4.0/22", "91.92.184.0/21", "151.234.193.0/24", "2.179.24.0/22", "2.182.201.0/24", + "89.36.104.0/23", "217.218.80.0/20", "87.251.144.0/23", "5.239.240.0/23", "93.118.184.0/22", + "46.100.106.0/23", "80.191.199.0/24", "80.191.19.0/24", "80.191.231.0/24", "46.100.184.0/22", + "2.182.108.0/23", "89.37.168.0/22", "2.181.179.0/24", "78.38.53.0/24", "217.172.119.0/24", + "80.191.179.0/24", "2.182.192.0/21", "46.100.232.0/22", "85.185.174.0/23", "195.181.96.0/20", + "46.100.16.0/20", "151.234.64.0/22", "80.191.220.0/22", "5.233.32.0/21", "5.198.164.0/23", + "37.148.16.0/22", "78.39.41.0/24", "2.182.214.0/23", "217.219.252.0/23", "37.255.210.0/24", + "151.245.48.0/22", "185.120.212.0/22", "2.181.0.0/19", "5.232.216.0/21", "2.182.156.0/22", + "5.235.184.0/23", "151.234.84.0/23", "151.243.200.0/23", "213.195.56.0/21", "37.255.64.0/18", + "85.185.242.0/23", "2.179.12.0/22", "85.185.18.0/23", "188.215.160.0/20", "2.181.208.0/21", + "91.92.122.0/23", "151.245.68.0/22", "5.232.96.0/19", "37.156.232.0/21", "151.234.86.0/24", + "37.148.40.0/22", "46.100.0.0/22", "188.212.208.0/20", "78.39.208.0/21", "2.181.128.0/19", + "188.210.128.0/18", "151.234.160.0/20", "151.247.164.0/22", "217.218.96.0/24", "80.210.24.0/21", + "85.185.137.0/24", "85.185.144.0/21", "5.238.112.0/20", "2.182.36.0/22", "185.147.40.0/22", + "2.183.224.0/21", "151.243.124.0/23", "89.36.96.0/22", "217.219.220.0/22", "2.184.68.0/23", + "89.37.240.0/20", "217.218.53.0/24", "78.38.55.0/24", "2.183.32.0/20", "151.247.80.0/23", + "80.191.22.0/24", "185.115.79.0/24", "5.232.128.0/19", "151.232.117.0/24", "84.47.208.0/23", + "151.245.148.0/22", "78.39.116.0/23", "46.100.192.0/20", "78.38.196.0/24", "5.235.224.0/21", + "84.47.216.0/22", "92.43.160.0/22", "195.146.50.0/24"}; + +unsigned int mokhaberat_ip_ranges_length = sizeof(mokhaberat_ip_ranges) / sizeof(mokhaberat_ip_ranges[0]); diff --git a/ww/managers/data/iprange_rightel.c b/ww/managers/data/iprange_rightel.c new file mode 100644 index 00000000..db5e367c --- /dev/null +++ b/ww/managers/data/iprange_rightel.c @@ -0,0 +1,51 @@ +#include "ipranges.h" + +/* + AS57218 Rightel Communication Service Company PJS · rightel.ir + + + Country Iran + Website rightel.ir + Hosted domains 20 + Number of IPv4 433,152 + Number of IPv6 1.19 × 1029 + ASN type ISP + Registry RIPE + Allocated 13 years ago on Aug 25, 2011 + Updated 5 years ago on Feb 13, 2019 + +*/ +const char *rightel_ip_ranges[] = { + "37.156.156.0/22", "5.134.168.0/22", "213.195.48.0/22", "89.34.128.0/20", "77.81.192.0/20", + "188.208.64.0/19", "94.24.80.0/21", "5.72.160.0/19", "188.208.240.0/20", "37.44.60.0/22", + "5.62.192.0/19", "92.114.64.0/21", "185.24.136.0/24", "188.208.152.0/21", "37.156.48.0/20", + "5.62.224.0/19", "92.114.72.0/21", "188.215.26.0/23", "5.134.191.0/24", "94.24.16.0/21", + "5.200.112.0/20", "5.134.160.0/22", "185.24.230.0/23", "5.73.64.0/19", "5.200.96.0/20", + "188.214.84.0/22", "5.134.176.0/22", "5.134.172.0/22", "91.229.215.0/24", "5.72.64.0/19", + "185.24.136.0/23", "2a03:ef43:c000::/48", "185.24.137.0/24", "5.73.96.0/19", "37.156.56.0/21", + "213.195.32.0/20", "37.137.128.0/18", "37.137.128.0/17", "94.24.8.0/21", "5.72.128.0/19", + "89.41.192.0/20", "5.73.192.0/19", "2a03:ef44::/34", "77.81.192.0/19", "5.134.164.0/22", + "37.156.152.0/22", "213.195.50.0/23", "5.73.0.0/19", "91.229.214.0/24", "188.214.6.0/23", + "188.214.84.0/23", "94.24.0.0/21", "94.24.16.0/22", "188.215.88.0/23", "5.134.180.0/22", + "37.156.152.0/21", "89.32.16.0/20", "93.114.24.0/21", "95.162.0.0/20", "188.208.160.0/20", + "95.162.32.0/19", "95.162.224.0/20", "37.153.176.0/21", "89.32.0.0/19", "188.208.80.0/20", + "5.72.0.0/19", "5.72.32.0/19", "95.162.0.0/19", "37.156.48.0/21", "37.137.192.0/18", + "37.153.176.0/20", "92.114.64.0/20", "37.44.56.0/21", "94.24.80.0/20", "95.162.128.0/17", + "2a03:ef43::/43", "5.134.152.0/22", "2a03:ef42:c000::/34", "93.114.16.0/21", "89.34.144.0/20", + "213.195.40.0/21", "5.134.156.0/22", "185.24.228.0/22", "188.214.86.0/23", "94.24.88.0/21", + "95.162.176.0/21", "89.41.192.0/19", "89.47.64.0/21", "77.81.208.0/20", "2a03:ef43:3::/48", + "5.72.96.0/19", "89.41.208.0/20", "94.24.20.0/22", "185.24.228.0/23", "188.214.4.0/22", + "37.44.56.0/22", "89.47.64.0/20", "188.215.24.0/22", "188.208.144.0/21", "188.208.144.0/20", + "89.34.128.0/19", "5.134.128.0/18", "89.32.96.0/20", "188.208.224.0/19", "94.24.100.0/22", + "94.24.96.0/22", "188.214.4.0/23", "213.195.48.0/23", "188.208.160.0/19", "89.47.128.0/19", + "188.208.64.0/20", "89.47.128.0/20", "95.162.0.0/17", "188.215.24.0/23", "2a03:ef42::/34", + "188.215.88.0/22", "5.134.136.0/22", "5.72.192.0/19", "188.208.224.0/20", "37.137.0.0/17", + "89.34.48.0/20", "89.32.0.0/20", "37.137.64.0/18", "89.34.32.0/20", "188.215.90.0/23", + "5.72.0.0/16", "5.73.224.0/19", "93.114.16.0/20", "89.32.96.0/21", "94.24.96.0/21", + "213.195.32.0/21", "5.72.224.0/19", "5.73.128.0/19", "5.62.192.0/18", "5.73.32.0/19", + "5.73.160.0/19", "89.47.72.0/21", "94.24.0.0/20", "5.73.0.0/16", "89.34.32.0/19", + "37.153.184.0/21", "188.208.176.0/20", "91.229.214.0/23", "2a03:ef42:4000::/34", "5.200.96.0/19", + "2a03:ef42:8000::/34", "2a03:ef43::/34", "89.32.104.0/21", "89.47.144.0/20", "5.134.184.0/22", + "37.137.0.0/18"}; + +unsigned int rightel_ip_ranges_length = sizeof(rightel_ip_ranges) / sizeof(rightel_ip_ranges[0]); diff --git a/ww/managers/data/ipranges.h b/ww/managers/data/ipranges.h new file mode 100644 index 00000000..9b5d663f --- /dev/null +++ b/ww/managers/data/ipranges.h @@ -0,0 +1,16 @@ +#pragma once + +extern const char *irancell_ip_ranges[]; +extern unsigned int irancell_ip_ranges_length; + +extern const char *mci_ip_ranges[]; +extern unsigned int mci_ip_ranges_length; + +extern const char *rightel_ip_ranges[]; +extern unsigned int rightel_ip_ranges_length; + +extern const char *mokhaberat_ip_ranges[]; +extern unsigned int mokhaberat_ip_ranges_length; + +extern const char *iran_ip_ranges[]; +extern unsigned int iran_ip_ranges_length; diff --git a/ww/managers/socket_manager.c b/ww/managers/socket_manager.c index d9e7c8c6..4336852c 100644 --- a/ww/managers/socket_manager.c +++ b/ww/managers/socket_manager.c @@ -1,6 +1,7 @@ #include "socket_manager.h" #include "basic_types.h" #include "buffer_pool.h" +#include "frand.h" #include "generic_pool.h" #include "hloop.h" #include "hmutex.h" @@ -8,9 +9,17 @@ #include "loggers/network_logger.h" #include "stc/common.h" #include "tunnel.h" +#include "utils/hashutils.h" #include "utils/procutils.h" +#include "utils/sockutils.h" #include "ww.h" +#define i_type balancegroup_registry_t // NOLINT +#define i_key hash_t // NOLINT +#define i_val idle_table_t * // NOLINT + +#include "stc/hmap.h" + typedef struct socket_filter_s { union { @@ -20,6 +29,7 @@ typedef struct socket_filter_s socket_filter_option_t option; tunnel_t *tunnel; onAccept cb; + } socket_filter_t; #define i_key socket_filter_t * // NOLINT @@ -30,9 +40,11 @@ typedef struct socket_filter_s #define SUPPORT_V6 false enum { - kSoOriginalDest = 80, - kFilterLevels = 4, - kAcceptThreadIdOffset = 0 + kSoOriginalDest = 80, + kFilterLevels = 4, + kMaxBalanceSelections = 64, + kAcceptThreadIdOffset = 0, + kDefalultBalanceInterval = 60 * 1000 }; typedef struct socket_manager_s @@ -41,20 +53,22 @@ typedef struct socket_manager_s struct { - generic_pool_t *pool; /* holds udp_payload_t*/ + generic_pool_t *pool; /* holds udp_payload_t */ hhybridmutex_t mutex; } *udp_pools; struct { - generic_pool_t *pool; /* holds socket_accept_result_t*/ + generic_pool_t *pool; /* holds socket_accept_result_t */ hhybridmutex_t mutex; } *tcp_pools; - hthread_t accept_thread; - hhybridmutex_t mutex; + hhybridmutex_t mutex; + balancegroup_registry_t balance_groups; + hthread_t accept_thread; + hloop_t *loop; uint16_t last_round_tid; bool iptables_installed; @@ -62,6 +76,7 @@ typedef struct socket_manager_s bool lsof_installed; bool iptable_cleaned; bool iptables_used; + bool started; } socket_manager_state_t; @@ -340,11 +355,38 @@ void parseWhiteListOption(socket_filter_option_t *option) exit(1); } } + + if (option->balance_group_name) + { + hash_t name_hash = CALC_HASH_BYTES(option->balance_group_name, strlen(option->balance_group_name)); + idle_table_t *b_table = NULL; + hhybridmutex_lock(&(state->mutex)); + + balancegroup_registry_t_iter find_result = balancegroup_registry_t_find(&(state->balance_groups), name_hash); + + if (find_result.ref == balancegroup_registry_t_end(&(state->balance_groups)).ref) + { + b_table = newIdleTable(state->loop); + balancegroup_registry_t_insert(&(state->balance_groups), name_hash, b_table); + } + else + { + b_table = (find_result.ref->second); + } + + hhybridmutex_unlock(&(state->mutex)); + + option->shared_balance_table = b_table; + } } void registerSocketAcceptor(tunnel_t *tunnel, socket_filter_option_t option, onAccept cb) { - + if (state->started) + { + LOGF("SocketManager: cannot register after accept thread starts"); + exit(1); + } socket_filter_t *filter = malloc(sizeof(socket_filter_t)); unsigned int pirority = 0; if (option.multiport_backend == kMultiportBackendNothing) @@ -372,6 +414,7 @@ static inline uint16_t getCurrentDistributeTid(void) { return state->last_round_tid; } + static inline void incrementDistributeTid(void) { state->last_round_tid++; @@ -401,6 +444,7 @@ static void distributeSocket(void *io, socket_filter_t *filter, uint16_t local_p hloop_post_event(worker_loop, &ev); } + static void noTcpSocketConsumerFound(hio_t *io) { char localaddrstr[SOCKADDR_STRLEN] = {0}; @@ -444,9 +488,15 @@ static bool checkIpIsWhiteList(sockaddr_u *addr, const socket_filter_option_t op static void distributeTcpSocket(hio_t *io, uint16_t local_port) { - hhybridmutex_lock(&(state->mutex)); sockaddr_u *paddr = (sockaddr_u *) hio_peeraddr(io); + static socket_filter_t *balance_selection_filters[kMaxBalanceSelections]; + uint8_t balance_selection_filters_length = 0; + idle_table_t *selected_balance_table = NULL; + hash_t src_hash; + bool src_hashed = false; + const uint8_t this_tid = workers_count + kAcceptThreadIdOffset; + for (int ri = (kFilterLevels - 1); ri >= 0; ri--) { c_foreach(k, filters_t, state->filters[ri]) @@ -456,6 +506,10 @@ static void distributeTcpSocket(hio_t *io, uint16_t local_port) uint16_t port_min = option.port_min; uint16_t port_max = option.port_max; + if (selected_balance_table != NULL && option.shared_balance_table != selected_balance_table) + { + continue; + } if (option.protocol != kSapTcp || port_min > local_port || port_max < local_port) { continue; @@ -468,19 +522,61 @@ static void distributeTcpSocket(hio_t *io, uint16_t local_port) } } + if (option.shared_balance_table) + { + if (! src_hashed) + { + src_hash = sockAddrCalcHash((sockaddr_u *) hio_peeraddr(io)); + } + idle_item_t *idle_item = getIdleItemByHash(this_tid, option.shared_balance_table, src_hash); + + if (idle_item) + { + socket_filter_t *target_filter = idle_item->userdata; + keepIdleItemForAtleast(option.shared_balance_table, idle_item, + option.balance_group_interval == 0 ? kDefalultBalanceInterval + : option.balance_group_interval); + if (option.no_delay) + { + tcp_nodelay(hio_fd(io), 1); + } + hio_detach(io); + distributeSocket(io, target_filter, local_port); + return; + } + + if (WW_UNLIKELY(balance_selection_filters_length >= kMaxBalanceSelections)) + { + // probably never but the limit can be simply increased + LOGW("SocketManager: balance between more than %d tunnels is not supported", kMaxBalanceSelections); + } + balance_selection_filters[balance_selection_filters_length++] = filter; + selected_balance_table = option.shared_balance_table; + continue; + } + if (option.no_delay) { tcp_nodelay(hio_fd(io), 1); } hio_detach(io); - hhybridmutex_unlock(&(state->mutex)); distributeSocket(io, filter, local_port); return; } } - hhybridmutex_unlock(&(state->mutex)); - noTcpSocketConsumerFound(io); + if (balance_selection_filters_length > 0) + { + socket_filter_t *filter = balance_selection_filters[fastRand() % balance_selection_filters_length]; + newIdleItem(filter->option.shared_balance_table, src_hash, filter, NULL, this_tid, + filter->option.balance_group_interval == 0 ? kDefalultBalanceInterval + : filter->option.balance_group_interval); + distributeSocket(io, filter, local_port); + } + else + { + noTcpSocketConsumerFound(io); + } } static void onAcceptTcpSinglePort(hio_t *io) @@ -565,6 +661,7 @@ static void listenTcpMultiPortIptables(hloop_t *loop, socket_filter_t *filter, c redirectPortRangeTcp(port_min, port_max, main_port); LOGI("SocketManager: listening on %s:[%u - %u] >> %d (%s)", host, port_min, port_max, main_port, "TCP"); } + static void listenTcpMultiPortSockets(hloop_t *loop, socket_filter_t *filter, char *host, uint16_t port_min, uint8_t *ports_overlapped, uint16_t port_max) { @@ -592,6 +689,7 @@ static void listenTcpMultiPortSockets(hloop_t *loop, socket_filter_t *filter, ch LOGI("SocketManager: listening on %s:[%u] (%s)", host, p, "TCP"); } } + static void listenTcpSinglePort(hloop_t *loop, socket_filter_t *filter, char *host, uint16_t port, uint8_t *ports_overlapped) { @@ -652,20 +750,23 @@ static void listenTcp(hloop_t *loop, uint8_t *ports_overlapped) } } -static void noUdpSocketConsumerFound(udp_payload_t *upl) +static void noUdpSocketConsumerFound(const udp_payload_t upl) { char localaddrstr[SOCKADDR_STRLEN] = {0}; char peeraddrstr[SOCKADDR_STRLEN] = {0}; LOGE("SocketManager: could not find consumer for Udp socket [%s] <= [%s]", - SOCKADDR_STR(hio_localaddr(upl->sock->io), localaddrstr), - SOCKADDR_STR(hio_peeraddr(upl->sock->io), peeraddrstr)); - - destroyUdpPayload(upl); + SOCKADDR_STR(hio_localaddr(upl.sock->io), localaddrstr), + SOCKADDR_STR(hio_peeraddr(upl.sock->io), peeraddrstr)); } -static void postPayload(udp_payload_t *pl, socket_filter_t *filter) +static void postPayload(udp_payload_t post_pl, socket_filter_t *filter) { + hhybridmutex_lock(&(state->udp_pools[post_pl.tid].mutex)); + udp_payload_t *pl = popPoolItem(state->udp_pools[post_pl.tid].pool); + hhybridmutex_unlock(&(state->udp_pools[post_pl.tid].mutex)); + *pl = post_pl; + pl->tunnel = filter->tunnel; hloop_t *worker_loop = loops[pl->tid]; hevent_t ev = (hevent_t){.loop = worker_loop, .cb = filter->cb}; @@ -673,11 +774,20 @@ static void postPayload(udp_payload_t *pl, socket_filter_t *filter) hloop_post_event(worker_loop, &ev); } -static void distributeUdpPayload(udp_payload_t *pl) + +static void distributeUdpPayload(const udp_payload_t pl) { - hhybridmutex_lock(&(state->mutex)); - sockaddr_u *paddr = (sockaddr_u *) hio_peeraddr(pl->sock->io); - uint16_t local_port = pl->real_localport; + // hhybridmutex_lock(&(state->mutex)); new socket manager will not lock here + sockaddr_u *paddr = (sockaddr_u *) hio_peeraddr(pl.sock->io); + uint16_t local_port = pl.real_localport; + + static socket_filter_t *balance_selection_filters[kMaxBalanceSelections]; + uint8_t balance_selection_filters_length = 0; + idle_table_t *selected_balance_table = NULL; + hash_t src_hash; + bool src_hashed = false; + const uint8_t this_tid = workers_count + kAcceptThreadIdOffset; + for (int ri = (kFilterLevels - 1); ri >= 0; ri--) { c_foreach(k, filters_t, state->filters[ri]) @@ -688,6 +798,11 @@ static void distributeUdpPayload(udp_payload_t *pl) uint16_t port_min = option.port_min; uint16_t port_max = option.port_max; + if (selected_balance_table != NULL && option.shared_balance_table != selected_balance_table) + { + continue; + } + if (option.protocol != kSapUdp || port_min > local_port || port_max < local_port) { continue; @@ -699,30 +814,64 @@ static void distributeUdpPayload(udp_payload_t *pl) continue; } } - hhybridmutex_unlock(&(state->mutex)); + if (option.shared_balance_table) + { + if (! src_hashed) + { + src_hash = sockAddrCalcHash((sockaddr_u *) hio_peeraddr(pl.sock->io)); + } + idle_item_t *idle_item = getIdleItemByHash(this_tid, option.shared_balance_table, src_hash); + + if (idle_item) + { + socket_filter_t *target_filter = idle_item->userdata; + keepIdleItemForAtleast(option.shared_balance_table, idle_item, + option.balance_group_interval == 0 ? kDefalultBalanceInterval + : option.balance_group_interval); + postPayload(pl, target_filter); + return; + } + + if (WW_UNLIKELY(balance_selection_filters_length >= kMaxBalanceSelections)) + { + // probably never but the limit can be simply increased + LOGW("SocketManager: balance between more than %d tunnels is not supported", kMaxBalanceSelections); + } + balance_selection_filters[balance_selection_filters_length++] = filter; + selected_balance_table = option.shared_balance_table; + continue; + } + postPayload(pl, filter); return; } } - - hhybridmutex_unlock(&(state->mutex)); - noUdpSocketConsumerFound(pl); + if (balance_selection_filters_length > 0) + { + socket_filter_t *filter = balance_selection_filters[fastRand() % balance_selection_filters_length]; + newIdleItem(filter->option.shared_balance_table, src_hash, filter, NULL, this_tid, + filter->option.balance_group_interval == 0 ? kDefalultBalanceInterval + : filter->option.balance_group_interval); + postPayload(pl, filter); + } + else + { + noUdpSocketConsumerFound(pl); + } } + static void onRecvFrom(hio_t *io, shift_buffer_t *buf) { udpsock_t *socket = hevent_userdata(io); uint16_t local_port = sockaddr_port((sockaddr_u *) hio_localaddr(io)); - uint8_t target_tid = local_port % workers_count; + // TODO (check) + uint8_t target_tid = local_port % workers_count; - hhybridmutex_lock(&(state->udp_pools[target_tid].mutex)); - udp_payload_t *item = popPoolItem(state->udp_pools[target_tid].pool); - hhybridmutex_unlock(&(state->udp_pools[target_tid].mutex)); - - *item = (udp_payload_t){.sock = socket, - .buf = buf, - .tid = target_tid, - .peer_addr = *(sockaddr_u *) hio_peeraddr(io), - .real_localport = local_port}; + udp_payload_t item = (udp_payload_t){.sock = socket, + .buf = buf, + .tid = target_tid, + .peer_addr = *(sockaddr_u *) hio_peeraddr(io), + .real_localport = local_port}; distributeUdpPayload(item); } @@ -802,6 +951,7 @@ static void writeUdpThisLoop(hevent_t *ev) (void) nwrite; destroyUdpPayload(upl); } + void postUdpWrite(udpsock_t *socket_io, uint8_t tid_from, shift_buffer_t *buf) { @@ -824,23 +974,23 @@ static HTHREAD_ROUTINE(accept_thread) // NOLINT shift_buffer_pools[tid] = newGenericPoolWithCap((64) + ram_profile, allocShiftBufferPoolHandle, destroyShiftBufferPoolHandle); buffer_pools[tid] = createBufferPool(tid); - hloop_t *loop = hloop_new(HLOOP_FLAG_AUTO_FREE, buffer_pools[tid], tid); - loops[tid] = loop; + state->loop = hloop_new(HLOOP_FLAG_AUTO_FREE, buffer_pools[tid], tid); + loops[tid] = state->loop; hhybridmutex_lock(&(state->mutex)); - // state->table = newIdleTable(loop, onUdpSocketExpire); { uint8_t ports_overlapped[65536] = {0}; - listenTcp(loop, ports_overlapped); + listenTcp(state->loop, ports_overlapped); } { uint8_t ports_overlapped[65536] = {0}; - listenUdp(loop, ports_overlapped); + listenUdp(state->loop, ports_overlapped); } + state->started = true; hhybridmutex_unlock(&(state->mutex)); - hloop_run(loop); + hloop_run(state->loop); LOGW("AcceptThread eventloop finished!"); return 0; } diff --git a/ww/managers/socket_manager.h b/ww/managers/socket_manager.h index 301f5691..add1fda2 100644 --- a/ww/managers/socket_manager.h +++ b/ww/managers/socket_manager.h @@ -18,6 +18,8 @@ typedef enum kMultiportBackendSockets } multiport_backend_t; +struct balance_group_s; + typedef struct socket_filter_option_s { char *host; @@ -29,6 +31,8 @@ typedef struct socket_filter_option_s char **black_list_raddr; bool fast_open; bool no_delay; + char *balance_group_name; + uint16_t balance_group_interval; // private unsigned int white_list_parsed_length; @@ -36,9 +40,10 @@ typedef struct socket_filter_option_s { struct in6_addr ip_bytes_buf; struct in6_addr mask_bytes_buf; - } *white_list_parsed; + idle_table_t *shared_balance_table; + } socket_filter_option_t; // user data of accept event @@ -81,4 +86,4 @@ struct socket_manager_s *createSocketManager(void); void setSocketManager(struct socket_manager_s *state); void startSocketManager(void); void registerSocketAcceptor(tunnel_t *tunnel, socket_filter_option_t option, onAccept cb); -void postUdpWrite(udpsock_t *socket_io,uint8_t tid_from, shift_buffer_t *buf); +void postUdpWrite(udpsock_t *socket_io, uint8_t tid_from, shift_buffer_t *buf);