/* Prometheus QoS - you can "steal fire" from your ISP */\r
/* "fair-per-IP" quality of service (QoS) utility */\r
/* requires Linux 2.4.x or 2.6.x with HTB support */\r
-/* Copyright(C) 2005-2017 Michael Polak, Arachne Aerospace */\r
+/* Copyright(C) 2005-2019 Michael Polak, Arachne Aerospace */\r
/* iptables-restore support Copyright(C) 2007-2008 ludva */\r
/* Credit: CZFree.Net,Martin Devera,Netdave,Aquarius,Gandalf */\r
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\r
\r
-/* Modified by: xChaos, 20171106\r
+/* Modified by: xChaos, 20190912\r
ludva, 20080415\r
\r
Prometheus QoS is free software; you can redistribute it and/or\r
#include "cll1-0.6.2.h"\r
#include "ipstruct.h"\r
\r
-const char *version = "0.9.0-b";\r
+const char *version = "0.9.0-c";\r
\r
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\r
/* Versions: 0.9.0 is development release, 1.0 will be "stable" */\r
char *ip6prefix = NULL; /* Prefix for global /48 IPv6 subnet */\r
char *qos_leaf = "sfq perturb 5"; /* leaf discipline */\r
char *qos_free_zone = NULL; /* QoS free zone */\r
+char *qos_free_dst_ipset = NULL; /* QoS free zone - dst match ipset name, must be prepared outside prometheus */\r
+char *qos_free_src_ipset = NULL; /* QoS free zone - src match ipset name, must be prepared outside prometheus */\r
/* int qos_proxy = TRUE; include proxy port to QoS */\r
int found_lmsid = FALSE; /* show links to users in LMS information system */\r
int include_upload = TRUE; /* upload+download=total traffic */\r
option("lms-url",lms_url);\r
ioption("use-jquery-popups",use_jquery_popups);\r
option("qos-free-zone",qos_free_zone);\r
+ option("qos-free-dst-ipset",qos_free_dst_ipset);\r
+ option("qos-free-src-ipset",qos_free_src_ipset);\r
ioption("qos-free-delay",qos_free_delay);\r
/* ioption("qos-proxy-enable",qos_proxy); */\r
/* option("qos-proxy-ip",proxy_ip);*/\r
iptables_save_line(ip6preamble, IPv6);\r
}\r
\r
- if(qos_free_zone && *qos_free_zone!='0') /* this is currently supported only for IPv4 */\r
+ if(qos_free_zone && *qos_free_zone != '0') /* this is currently supported only for IPv4 */\r
{\r
for_each(interface, interfaces)\r
{\r
iptables_save_line(str, IPv4);\r
}\r
}\r
+\r
+ if(qos_free_dst_ipset && *qos_free_dst_ipset != '0') /* this is currently supported only for IPv4 */\r
+ {\r
+ for_each(interface, interfaces)\r
+ {\r
+ sprintf(str,"-A %s -m set --match-set %s %s -o %s -j ACCEPT", interface->chain, (interface->is_upstream?"dst":"src"), qos_free_dst_ipset, interface->name);\r
+ iptables_save_line(str, IPv4);\r
+ }\r
+ }\r
+\r
+ if(qos_free_src_ipset && *qos_free_src_ipset != '0') /* this is currently supported only for IPv4 */\r
+ {\r
+ for_each(interface, interfaces)\r
+ {\r
+ sprintf(str,"-A %s -m set --match-set %s %s -o %s -j ACCEPT", interface->chain, (interface->is_upstream?"src":"dst"), qos_free_src_ipset, interface->name);\r
+ iptables_save_line(str, IPv4);\r
+ }\r
+ }\r
\r
for_each(qosfreeinterface, qosfreeinterfaces)\r
{\r