From ae74187f41672e352476f3b2283ba33d254a2527 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Sun, 18 Oct 2015 09:33:59 +0200 Subject: lightsquid package reworked - fix English and clean up the GUI - provide instructions to users and add corresponding input validation; completely stop touching Squid packages configuration directly - fix 'Skip URL(s)' handling and add some basic validation to it as well - fix copyright header, indentation, whitespace - fix file permissions - add privileges configuration --- config/lightsquid/lightsquid.xml | 508 +++++++++++++++++++-------------------- 1 file changed, 241 insertions(+), 267 deletions(-) (limited to 'config/lightsquid/lightsquid.xml') diff --git a/config/lightsquid/lightsquid.xml b/config/lightsquid/lightsquid.xml index f5f09b94..9dd8d820 100644 --- a/config/lightsquid/lightsquid.xml +++ b/config/lightsquid/lightsquid.xml @@ -2,453 +2,427 @@ - - +. - All rights reserved. - */ -/* ========================================================================== */ + lightsquid.xml + part of pfSense (https://www.pfSense.org/) + Copyright (C) 2006-2012 Sergey Dvoriancev + Copyright (C) 2015 ESF, LLC + All rights reserved. +*/ +/* ====================================================================================== */ /* - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - */ -/* ========================================================================== */ - ]]> - - Describe your package here - Describe your package requirements here - Currently there are no FAQ items provided. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* ====================================================================================== */ + ]]> + lightsquid - 2.41 - Services: Proxy Reports (LightSquid, SQStat) -> Settings + 2.42 + Squid Proxy Reports: Settings Status /usr/local/pkg/lightsquid.inc - Proxy report - Proxy server statistic report + Squid Proxy Reports + Proxy Server Statistic Reports
Status
- /pkg_edit.php?xml=lightsquid.xml&id=0 + /pkg_edit.php?xml=lightsquid.xml
- - - Settings - /pkg_edit.php?xml=lightsquid.xml&id=0 - - - - Lightsquid Report - /lightsquid/index.cgi - - - Proxy State - /sqstat/sqstat.php - - - - /usr/local/pkg/ - 0755 - https://packages.pfsense.org/packages/config/lightsquid/lightsquid.inc - - - /usr/local/www/sqstat/ - 0644 - https://packages.pfsense.org/packages/config/lightsquid/sqstat.class.php - - - /usr/local/www/sqstat/ - 0644 - https://packages.pfsense.org/packages/config/lightsquid/sqstat.php - - - /usr/local/www/sqstat/ - 0644 - https://packages.pfsense.org/packages/config/lightsquid/sqstat.css - - - /usr/local/www/sqstat/ - 0644 - https://packages.pfsense.org/packages/config/lightsquid/zhabascript.js - + + + Settings + /pkg_edit.php?xml=lightsquid.xml + + + + Lightsquid Report + /lightsquid/index.cgi + + + Proxy Status + /sqstat/sqstat.php + + + + /usr/local/pkg/ + https://packages.pfsense.org/packages/config/lightsquid/lightsquid.inc + + + /etc/inc/priv/ + https://packages.pfsense.org/packages/config/lightsquid/lightsquid.priv.inc + + + /usr/local/www/sqstat/ + https://packages.pfsense.org/packages/config/lightsquid/sqstat.class.php + + + /usr/local/www/sqstat/ + https://packages.pfsense.org/packages/config/lightsquid/sqstat.php + + + /usr/local/www/sqstat/ + https://packages.pfsense.org/packages/config/lightsquid/sqstat.css + + + /usr/local/www/sqstat/ + https://packages.pfsense.org/packages/config/lightsquid/zhabascript.js + /usr/local/share/lightsquid/tpl/novopf/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novopf/bigfiles.html /usr/local/share/lightsquid/tpl/novopf/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novopf/day_detail.html /usr/local/share/lightsquid/tpl/novopf/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novopf/graph.html /usr/local/share/lightsquid/tpl/novopf/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novopf/group_detail.html /usr/local/share/lightsquid/tpl/novopf/images/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novopf/images/datetime.png /usr/local/share/lightsquid/tpl/novopf/images/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novopf/images/flag_red.png /usr/local/share/lightsquid/tpl/novopf/images/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novopf/images/graph.png /usr/local/share/lightsquid/tpl/novopf/images/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novopf/images/groups.png /usr/local/share/lightsquid/tpl/novopf/images/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novopf/images/printer.png /usr/local/share/lightsquid/tpl/novopf/images/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novopf/images/users.png /usr/local/share/lightsquid/tpl/novopf/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novopf/index.html /usr/local/share/lightsquid/tpl/novopf/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novopf/month_detail.html /usr/local/share/lightsquid/tpl/novopf/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novopf/print.css /usr/local/share/lightsquid/tpl/novopf/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novopf/screen.css /usr/local/share/lightsquid/tpl/novopf/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novopf/topsites.html /usr/local/share/lightsquid/tpl/novopf/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novopf/user_detail.html /usr/local/share/lightsquid/tpl/novopf/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novopf/user_month.html /usr/local/share/lightsquid/tpl/novopf/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novopf/user_time.html /usr/local/share/lightsquid/tpl/novopf/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novopf/whousesite.html /usr/local/share/lightsquid/tpl/novosea/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novosea/bigfiles.html /usr/local/share/lightsquid/tpl/novosea/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novosea/day_detail.html /usr/local/share/lightsquid/tpl/novosea/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novosea/graph.html /usr/local/share/lightsquid/tpl/novosea/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novosea/group_detail.html /usr/local/share/lightsquid/tpl/novosea/images/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novosea/images/datetime.png /usr/local/share/lightsquid/tpl/novosea/images/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novosea/images/flag_red.png /usr/local/share/lightsquid/tpl/novosea/images/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novosea/images/graph.png /usr/local/share/lightsquid/tpl/novosea/images/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novosea/images/groups.png /usr/local/share/lightsquid/tpl/novosea/images/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novosea/images/printer.png /usr/local/share/lightsquid/tpl/novosea/images/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novosea/images/users.png /usr/local/share/lightsquid/tpl/novosea/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novosea/index.html /usr/local/share/lightsquid/tpl/novosea/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novosea/month_detail.html /usr/local/share/lightsquid/tpl/novosea/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novosea/print.css /usr/local/share/lightsquid/tpl/novosea/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novosea/screen.css /usr/local/share/lightsquid/tpl/novosea/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novosea/topsites.html /usr/local/share/lightsquid/tpl/novosea/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novosea/user_detail.html /usr/local/share/lightsquid/tpl/novosea/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novosea/user_month.html /usr/local/share/lightsquid/tpl/novosea/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novosea/user_time.html /usr/local/share/lightsquid/tpl/novosea/ - 0444 https://packages.pfsense.org/packages/config/lightsquid/tpl/novosea/whousesite.html - - - Language - lightsquid_lang - Select report language - select - eng - - - - - - - - - - - - - - - - Bar color - lightsquid_barcolor - Select bar color - select - orange - - - - - - - - - - - Report scheme - lightsquid_template - Select report scheme - select - base - - - - - - - - - IP resolve method (future) - lightsquid_ip2name - - <table cellpadding=1 cellspacing=0 style="text-align: left;"> <tbody> - <tr><th colspan=2> Select IP to Name resolve method (take effect only on new data): </th><tr> - <tr><th> IP </th><td> - return IP </td><tr> - <tr><th> Demo </th><td> - return AUTHNAME, else DNSNAME, else IP </td><tr> - <tr><th> DNS </th><td> - return DNSNAME </td><tr> - <tr><th> Simple </th><td> - return AUTHNAME else IP </td><tr> - <tr><th> SMB </th><td> - return SMB name of pc </td><tr> - <tr><th> Squidauth </th><td> - return AUTHNAME else IP, allow cyrilyc name </td><tr> - </tbody> </table> - - select - dns - - - - - - - - - - - Refresh sheduler - lightsquid_refreshsheduler_time - - Select data refresh period. System will execute task every XX time as from 00:00 hours. <br> - For example: if selected 2h - system wil start task at 0-2-4-..-24h. <br> - Note: (!),(*) - use only for powerful system; (+) - recomended. <br><br> - <input type="submit" name="Submit" value="Refresh now"><br> - <input type="submit" name="Submit" value="Refresh full"> - <br> Press button for start background refresh (this take some time). - <br> <span style="color: rgb(153, 51, 0);"> Note after installation: - <br> Firstly - enable log in squid package with "/var/squid/logs" path. - <br> Secondly - press Refresh button to create lightsquid reports, else you will have an error diagnostic page.</span> + + + Instructions + listtopic + + + info + + IMPORTANT: Perform these steps after install: + ]]> + + + Enable 'Access Logging' in the Squid package! It is strongly suggested to leave the 'Log Store Directory' in Squid package at default '/var/squid/logs' value.

+ 2/ Configure Squid - General - Proxy Interface(s) to include 'loopback' interface (in addition to any other interfaces you want Squid to bind on).
+ Note: If using Squid 2.7 package, also do not forget to add '127.0.0.1' to Squid - Access Control - External Cache-Managers. (This is not needed for Squid 3.x.)

+ 3/ Configure 'Report Template Settings' and 'Reporting Settings and Scheduler' below and Save when finished.

+ 4/ Use the Refresh buttons in the 'Manual Refresh' section below to create initial LightSquid reports; otherwise you will get an error diagnostic page.
+ - "Refresh now" will (re)parse today's entires only in Squid's current access.log.
+ - "Refresh full" will (re)parse all entries in all Squid's access logs, including the rotated ones. Note: This may take long time to finish!
+ ]]>
- select - lhp_none - - - - - - - - - - - - - - - - -
- + dns + + + + + + + + +
- Skip url - lightsquid_skipurl + Skip URL(s) + lightsquid_skipurl - If you want skip some sites from stat, example our local www server - Example, if you want skip LOCAL site, put it here - zdd.com|192.168.1.|cnn.com + + Separate multiple entries by | character.

+ Example: example.com|192.168.1.|example.net + ]]>
textarea 60 5
+ + Refresh Scheduler + lightsquid_refreshsheduler_time + + + Legend: (!),(*) - use only with fast hardware; (+) - recommended values.
+ ]]> +
+ select + lhp_none + + + + + + + + + + + + + + + + +
+ + info + Manual Refresh + + will (re)parse today's entires only in Squid's current access.log.

+ will (re)parse all entries in all Squid's access logs, including the rotated ones. + Note: This may take long time to finish!

+ Press a button above to start background refresh (this will take some time).
+ ]]> +
+
- - lightsquid_resync(); - lightsquid_install(); - lightsquid_resync(); lightsquid_deinstall(); + + + + + lightsquid_validate_input($_POST, $input_errors); +
-- cgit v1.2.3 From 7a289c0e10b6c47c4646e04e9bceae8b3f808f49 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Sun, 18 Oct 2015 19:01:50 +0200 Subject: Typo fix --- config/lightsquid/lightsquid.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config/lightsquid/lightsquid.xml') diff --git a/config/lightsquid/lightsquid.xml b/config/lightsquid/lightsquid.xml index 9dd8d820..a7d68530 100644 --- a/config/lightsquid/lightsquid.xml +++ b/config/lightsquid/lightsquid.xml @@ -262,7 +262,7 @@ Note: If using Squid 2.7 package, also do not forget to add '127.0.0.1' to Squid - Access Control - External Cache-Managers. (This is not needed for Squid 3.x.)

3/ Configure 'Report Template Settings' and 'Reporting Settings and Scheduler' below and Save when finished.

4/ Use the Refresh buttons in the 'Manual Refresh' section below to create initial LightSquid reports; otherwise you will get an error diagnostic page.
- - "Refresh now" will (re)parse today's entires only in Squid's current access.log.
+ - "Refresh now" will (re)parse today's entries only in Squid's current access.log.
- "Refresh full" will (re)parse all entries in all Squid's access logs, including the rotated ones. Note: This may take long time to finish!
]]> @@ -399,7 +399,7 @@ Manual Refresh will (re)parse today's entires only in Squid's current access.log.

+ will (re)parse today's entries only in Squid's current access.log.

will (re)parse all entries in all Squid's access logs, including the rotated ones. Note: This may take long time to finish!

Press a button above to start background refresh (this will take some time).
-- cgit v1.2.3 From 434b6aad60b37ae68f5e81fa1526ce242e07c9e3 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Tue, 20 Oct 2015 11:10:24 +0200 Subject: Update instructions to account for transparent proxy setup --- config/lightsquid/lightsquid.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'config/lightsquid/lightsquid.xml') diff --git a/config/lightsquid/lightsquid.xml b/config/lightsquid/lightsquid.xml index a7d68530..834efd46 100644 --- a/config/lightsquid/lightsquid.xml +++ b/config/lightsquid/lightsquid.xml @@ -258,8 +258,10 @@ Enable 'Access Logging' in the Squid package! It is strongly suggested to leave the 'Log Store Directory' in Squid package at default '/var/squid/logs' value.

- 2/ Configure Squid - General - Proxy Interface(s) to include 'loopback' interface (in addition to any other interfaces you want Squid to bind on).
- Note: If using Squid 2.7 package, also do not forget to add '127.0.0.1' to Squid - Access Control - External Cache-Managers. (This is not needed for Squid 3.x.)

+ 2a/ ONLY if Squid is NOT set up as transparent proxy:
+ - Configure Squid - General - Proxy Interface(s) to include 'loopback' interface (in addition to any other interfaces you want Squid to bind on).
+ 2b/ ONLY if using Squid 2.7 package (this is not needed for Squid 3.x.):
+ - Add '127.0.0.1' to Squid - Access Control - External Cache-Managers.

3/ Configure 'Report Template Settings' and 'Reporting Settings and Scheduler' below and Save when finished.

4/ Use the Refresh buttons in the 'Manual Refresh' section below to create initial LightSquid reports; otherwise you will get an error diagnostic page.
- "Refresh now" will (re)parse today's entries only in Squid's current access.log.
-- cgit v1.2.3