From 7ae5a5939e4328ed4a1d8c025ea6769265574260 Mon Sep 17 00:00:00 2001 From: xchaos Date: Tue, 26 Nov 2013 14:06:48 +0000 Subject: [PATCH] http proxy is obsolete featre in 2013 (https:// everywhere , etc.) git-svn-id: https://dev.arachne.cz/repos/prometheus/trunk@238 251d49ef-1d17-4917-a970-b30cf55b089b --- parseiptables.c | 28 ++++++++++++++++++---------- prometheus.c | 8 ++++---- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/parseiptables.c b/parseiptables.c index cfd1add..cad8364 100644 --- a/parseiptables.c +++ b/parseiptables.c @@ -8,7 +8,7 @@ /* globals declared in prometheus.c */ extern struct IP *ips, *ip, *sharedip; extern char *mark; -extern char *proxy_ip; +/* extern char *proxy_ip; */ extern int free_min; extern int free_max; extern int include_upload; @@ -36,7 +36,7 @@ void get_traffic_statistics(const char *whichiptables, int ipv6) for_each(line,lines) { - int col, accept = 0, proxyflag = 0, valid = 1, setchainname = 0, commonflag = 0; + int col, accept = 0, /*proxyflag = 0, */valid = 1, setchainname = 0, commonflag = 0; unsigned long long traffic = 0; unsigned long pkts = 0; char *ipaddr = NULL,*ptr; @@ -98,14 +98,19 @@ void get_traffic_statistics(const char *whichiptables, int ipv6) } else if(!ipv6) { - if(downloadflag) + +/* if(downloadflag) { if(strstr(proxy_ip,ptr)) { proxyflag = 1; } - } - else + + } + else + { +*/ + if(!downloadflag) { ipaddr = ptr; } @@ -131,12 +136,14 @@ void get_traffic_statistics(const char *whichiptables, int ipv6) { printf("(IPv4) "); } - +/* if(proxyflag) { printf("(proxy) "); } - else if(!downloadflag) + else +*/ + if(!downloadflag) { printf("(up) "); } @@ -165,15 +172,16 @@ void get_traffic_statistics(const char *whichiptables, int ipv6) if(downloadflag) { +/* if(proxyflag) { ip->proxy = traffic; } else - { + {*/ ip->traffic += traffic; - } - ip->direct += ip->traffic-ip->upload-ip->proxy; +/* } */ +/* ip->direct += ip->traffic-ip->upload; /*-ip->proxy;*/ ip->pktsdown += pkts; } else diff --git a/prometheus.c b/prometheus.c index b6807fd..1227592 100644 --- a/prometheus.c +++ b/prometheus.c @@ -101,8 +101,8 @@ char *qos_free_zone = NULL; /* QoS free zone */ /* int qos_proxy = TRUE; include proxy port to QoS */ int found_lmsid = FALSE; /* show links to users in LMS information system */ int include_upload = TRUE; /* upload+download=total traffic */ -char *proxy_ip = "192.168.1.1/32"; /* our IP with proxy port */ -int proxy_port = 3128; /* proxy port number */ +/* char *proxy_ip = "192.168.1.1/32"; our IP with proxy port */ +/* int proxy_port = 3128; proxy port number */ long long int line = 1024; /* WAN/ISP download in kbps */ long long int up = 1024; /* WAN/ISP upload in kbps */ int free_min = 256; /* minimum guaranted bandwidth for all undefined hosts */ @@ -311,9 +311,9 @@ void get_config(char *config_filename) option("qos-free-zone",qos_free_zone); ioption("qos-free-delay",qos_free_delay); /* ioption("qos-proxy-enable",qos_proxy); */ - option("qos-proxy-ip",proxy_ip); +/* option("qos-proxy-ip",proxy_ip);*/ option("htb-leaf-discipline",qos_leaf); - ioption("qos-proxy-port",proxy_port); +/* ioption("qos-proxy-port",proxy_port); */ ioption("free-rate",free_min); ioption("free-ceil",free_max); ioption("htb-burst",burst); -- 2.30.2