From f1d24481b1af528e74d4c96c6af2c56e3b976a69 Mon Sep 17 00:00:00 2001 From: "Luiz G. Costa" Date: Thu, 26 Sep 2013 15:50:34 -0300 Subject: Add package Squidguard 1.5 beta option --- config/squidGuard-devel/sgerror.php | 292 +++ config/squidGuard-devel/squidguard.inc | 1651 +++++++++++++ config/squidGuard-devel/squidguard.xml | 260 ++ config/squidGuard-devel/squidguard_acl.xml | 245 ++ config/squidGuard-devel/squidguard_blacklist.php | 329 +++ .../squidGuard-devel/squidguard_configurator.inc | 2532 ++++++++++++++++++++ config/squidGuard-devel/squidguard_default.xml | 149 ++ config/squidGuard-devel/squidguard_dest.xml | 189 ++ config/squidGuard-devel/squidguard_log.php | 327 +++ config/squidGuard-devel/squidguard_rewr.xml | 144 ++ config/squidGuard-devel/squidguard_sync.xml | 171 ++ config/squidGuard-devel/squidguard_time.xml | 144 ++ 12 files changed, 6433 insertions(+) create mode 100644 config/squidGuard-devel/sgerror.php create mode 100644 config/squidGuard-devel/squidguard.inc create mode 100644 config/squidGuard-devel/squidguard.xml create mode 100644 config/squidGuard-devel/squidguard_acl.xml create mode 100644 config/squidGuard-devel/squidguard_blacklist.php create mode 100644 config/squidGuard-devel/squidguard_configurator.inc create mode 100644 config/squidGuard-devel/squidguard_default.xml create mode 100644 config/squidGuard-devel/squidguard_dest.xml create mode 100644 config/squidGuard-devel/squidguard_log.php create mode 100644 config/squidGuard-devel/squidguard_rewr.xml create mode 100644 config/squidGuard-devel/squidguard_sync.xml create mode 100644 config/squidGuard-devel/squidguard_time.xml (limited to 'config/squidGuard-devel') diff --git a/config/squidGuard-devel/sgerror.php b/config/squidGuard-devel/sgerror.php new file mode 100644 index 00000000..e1e49385 --- /dev/null +++ b/config/squidGuard-devel/sgerror.php @@ -0,0 +1,292 @@ + $val) { + if (strpos(strtolower($url), strval($key)) === 0) { + $err_id = $key; + break; + } + } + + # blank page + if ($url === TAG_BLANK) { + echo get_page(''); + } + # blank image + elseif ($url === TAG_BLANK_IMG) { + $msg = trim($msg); + if(strpos($msg, "maxlen_") !== false) { + $maxlen = intval(trim(str_replace("maxlen_", "", $url))); + filter_by_image_size($cl['u'], $maxlen); + exit(); + } + else { + # -------------------------------------------------------------- + # return blank image + # -------------------------------------------------------------- + header("Content-Type: image/gif;"); // charset=windows-1251"); + echo GIF_BODY; + } + } + # error code + elseif ($err_id !== 0) { + $er_msg = strstr($_GET['url'], ' '); + echo get_error_page($err_id, $er_msg); + } + # redirect url + elseif ((strpos(strtolower($url), "http://") === 0) or (strpos(strtolower($url), "https://") === 0)) { + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + # redirect to specified url + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + header("HTTP/1.0"); + header("Location: $url", '', 302); + } + // error arguments + else { + echo get_page("sgerror: error arguments $url"); + } +} +else { + echo get_page($_SERVER['QUERY_STRING']); //$url . implode(" ", $_GET)); +# echo get_error_page(500); +} + +# ~~~~~~~~~~ +# Exit +# ~~~~~~~~~~ +exit(); + +# ---------------------------------------------------------------------------------------------------------------------- +# functions +# ---------------------------------------------------------------------------------------------------------------------- +function get_page($body) { + $str = Array(); + $str[] = ''; + $str[] = "\n$body\n"; + $str[] = ''; + return implode("\n", $str); +} + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# IE displayed self-page, if them size > 1024 +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +function get_error_page($er_code_id, $err_msg='') { + global $err_code; + global $cl; + global $g; + global $config; + $str = Array(); + + header("HTTP/1.1 " . $err_code[$er_code_id]); + + $str[] = ''; + $str[] = ''; + if ($config['installedpackages']['squidguarddefault']['config'][0]['deniedmessage']) { + $str[] = "

{$config['installedpackages']['squidguarddefault']['config'][0]['deniedmessage']}: {$err_code[$er_code_id]}

"; + } else { + $str[] = "

Request denied by {$g['product_name']} proxy: {$err_code[$er_code_id]}

"; + } + if ($err_msg) $str[] = " Reason: $err_msg"; + $str[] = '
'; + if ($cl['a']) $str[] = " Client address: {$cl['a']}
"; + if ($cl['n']) $str[] = " Client name: {$cl['n']}
"; + if ($cl['i']) $str[] = " Client user: {$cl['i']}
"; + if ($cl['s']) $str[] = " Client group: {$cl['s']}
"; + if ($cl['t']) $str[] = " Target group: {$cl['t']}
"; + if ($cl['u']) $str[] = " URL: {$cl['u']}
"; + $str[] = '
'; + $str[] = ""; + $str[] = ""; + + return implode("\n", $str); +} + +function get_about() { + global $err_code; + global $page_info; + $str = Array(); + + // about info + $s = str_replace("\n", "
", $page_info); + $str[] = $s; + $str[] = "
"; + + $str[] = ''; + $str[] = ' HTTP error codes (ERROR_CODE):'; + foreach($err_code as $val) { + $str []= "
$val"; + } + $str[] = '
'; + + return implode("\n", $str); +} + +function filter_by_image_size($url, $val_size) { + + # load url header + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_HEADER, 1); + curl_setopt($ch, CURLOPT_NOBODY, 1); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + $hd = curl_exec($ch); + curl_close($ch); + + $size = 0; + $SKEY = "content-length:"; + $s_tmp = strtolower($hd); + $s_tmp = str_replace("\n", " ", $s_tmp); # replace all "\n" + if (strpos($s_tmp, $SKEY) !== false) { + $s_tmp = trim(substr($s_tmp, strpos($s_tmp, $SKEY) + strlen($SKEY))); + $s_tmp = trim(substr($s_tmp, 0, strpos($s_tmp, " "))); + if (is_numeric($s_tmp)) + $size = intval($s_tmp); + else $size = 0; + } + + # === check url type and content size === + # redirect to specified url + if (($size !== 0) && ($size < $val_size)) { + header("HTTP/1.0"); + header("Location: $url", '', 302); + } + # return blank image + else { + header("Content-Type: image/gif;"); + echo GIF_BODY; + } +} +?> \ No newline at end of file diff --git a/config/squidGuard-devel/squidguard.inc b/config/squidGuard-devel/squidguard.inc new file mode 100644 index 00000000..d58dfb79 --- /dev/null +++ b/config/squidGuard-devel/squidguard.inc @@ -0,0 +1,1651 @@ + + Copyright (C) 2013 Marcello Coutinho + + part of pfSense (www.pfSense.com) + + 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. + + 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. +*/ +# ------------------------------------------------------------------------------ + +require_once('globals.inc'); +require_once('config.inc'); +require_once('util.inc'); +require_once('pfsense-utils.inc'); +require_once('pkg-utils.inc'); +require_once('filter.inc'); +require_once('service-utils.inc'); +require_once('squidguard_configurator.inc'); + +# ------------------------------------------------------------------------------ +# fields +define('F_NAME', 'name'); +define('F_DEST', 'dest'); +define('F_SOURCE', 'source'); +define('F_DESTINATION', 'dest'); +define('F_REWRITE', 'rewrite'); +define('F_REDIRECT', 'redirect'); +define('F_TIME', 'time'); +define('F_OVERDESTINATION', 'overdestination'); +define('F_OVERREWRITE', 'overrewrite'); +define('F_OVERREDIRECT', 'overredirect'); +define('F_TARGETURL', 'targeturl'); +define('F_REPLACETO', 'replaceto'); +define('F_TIMETYPE', 'timetype'); +define('F_TIMEDAYS', 'timedays'); +define('F_DATERANGE', 'daterange'); +define('F_TIMERANGE', 'sg_timerange'); +define('F_IPLIST', 'iplist'); +define('F_DESCRIPTION', 'description'); +define('F_EXPRESSIONS', 'expressions'); +define('F_DOMAINS', 'domains'); +define('F_URLS', 'urls'); +define('F_DISABLED', 'disabled'); +define('F_SQUIDGUARDENABLE', 'squidguard_enable'); +define('F_BLACKLIST', 'blacklist'); + +# prefixes +define('PREF_UPTIME', 'uptime_'); +define('PREF_UPTIME_DENY', 'uptimedeny_'); +define('PREF_OVERTIME', 'overtime_'); +define('PREF_OVERTIME_DENY', 'overtimedeny_'); +# modules +define('MODULE_GENERAL', 'squidguardgeneral'); +define('MODULE_DEFAULT', 'squidguarddefault'); +define('MODULE_ACL', 'squidguardacl'); +define('MODULE_DESTINATION', 'squidguarddest'); +define('MODULE_REWRITE', 'squidguardrewrite'); +define('MODULE_SOURCE', 'squidguardsrc'); +define('MODULE_TIME', 'squidguardtime'); +define('MODULE_LOG', 'squidguardlog'); +# blacklist +define('BLACKLIST_DEFAULT_URL', 'http://squidguard.mesd.k12.or.us/blacklists.tgz'); # 5Mb +define('BLACKLIST_DEFAULT_URL1', 'http://www.shallalist.de/Downloads/shallalist.tar.gz'); # ~7Mb +define('BLACKLIST_TMP_FILE', '/var/tmp/blacklists.tar.gz'); +define('BLACKLIST_BTN_URL', 'Upload Url'); +define('BLACKLIST_BTN_DEFAULT', 'Restore default'); +define('BLACKLIST_LOGFILE', 'blacklist.log'); +# +define('APPLY_BTN', 'Apply'); +define('SAFESEARCH', 'safesearch'); + +# ============================================================================== +# Initialization +# ============================================================================== +# use global variable $squidguard_config, defined in squidguard_configurator.inc +sg_init(convert_pfxml_to_sgxml()); + +# ============================================================================== +# Validations +# ============================================================================== +function squidguard_validate($post, $input_errors) +{ + $submit = isset($_GET['submit']) ? $_GET['submit'] : $_POST['submit']; + + # check config if 'Apply' + if ($submit === APPLY_BTN) sg_check_config_data(&$input_errors); +} + +# ------------------------------------------------------------------------------ +# validate default +# ------------------------------------------------------------------------------ +function squidguard_validate_default($post, $input_errors) +{ + squidguard_validate_acl($post, &$input_errors); +} + +# ------------------------------------------------------------------------------ +# validate acl +# ------------------------------------------------------------------------------ +function squidguard_validate_acl($post, $input_errors) +{ + $pass_up = array(); + $deny_up = array(); + $pass_up_val = ''; + $pass_over = array(); + $deny_over = array(); + $pass_over_val = ''; + $id = get_item_id(); + + # check name ('source') + $name = trim($post[F_NAME]); + if(!empty($name)) { + # validate name format + check_name_format($name, &$input_errors); + + # check unique name + if (!sg_check_unique_name(F_ACLS, $name)) + $input_errors[] = "Name '$name' already exists."; + + # check reserved + if (!sg_check_reserved_name($name)) + $input_errors[] = "Name '$name' is reserved."; + + # check source + $sgx = array(); + $sgx[F_NAME] = $post[F_NAME]; + $sgx[F_SOURCE] = $post[F_SOURCE]; + sg_check_src($sgx, &$input_errors); + } + + # store destinations to 'dest' value + foreach ($post as $key => $val) { + if (substr_count($key, PREF_UPTIME) != 0) { + $name = str_replace(PREF_UPTIME, '', $key); + if ($name) { + switch($val) { + case "allow": $pass_up_val .= " $name"; break; + case "white": $pass_up_val .= " ^$name"; break; + case "deny" : $pass_up_val .= " !$name"; break; + } + } + } + elseif (substr_count($key, PREF_OVERTIME) != 0) { + $name = str_replace(PREF_OVERTIME, '', $key); + if ($name) { + switch($val) { + case "allow": $pass_over_val .= " $name"; break; + case "white": $pass_over_val .= " ^$name"; break; + case "deny" : $pass_over_val .= " !$name"; break; + } + } + } + } + + # !ATTENTION! on pfSense XML config must be must(shell) be '!all' instead of 'none' - it is a must for correct work GUI + + # if not exists key 'all', then add 'none' - default 'deny all' + if ((substr_count($pass_up_val, 'all') == 0)) { + $pass_up_val .= ' !all'; + } + + if (!empty($pass_over_val) && (substr_count($pass_over_val, 'all') == 0)) { + $pass_over_val .= ' !all'; + } + + if (empty($pass_over_val)) + $post[F_DEST] = "$pass_up_val"; + else $post[F_DEST] = "$pass_up_val [$pass_over_val]"; + + # check redirect + $errmsg = ''; + if (!sg_check_redirect($post[F_RMOD], $post[F_REDIRECT], &$errmsg)) { + $input_errors[] = "Redirect info error. $errmsg"; + } +} + +# ------------------------------------------------------------------------------ +# validate times +# Format: +# date: ]]> + textarea + 65 + 2 + + + Redirect mode + redirect_mode + + Select redirect mode here. + <br> Note: if you use 'transparent proxy', then 'int' redirect mode will not accessible. + + <br> Options: + <A title="To 'url' will added special client information;" > + <span style="background-color: #dddddd;" >ext url err page</span></A> , + <A title="Client view 'url' content without any notification about;" > + <span style="background-color: #dddddd;" > ext url redirect</span></A> , + <A title="Client will moved to specified url with displaying url in addres bar;" > + <span style="background-color: #dddddd;" > ext url as 'move'</span></A> , + <A title="Client will moved to specified url with showing progress(only!) in status bar;" > + <span style="background-color: #dddddd;" > ext url as 'found'.</span></A> + </u> + + select + rmod_none + + + + + + + + + + + + + + Redirect info + redirect + + textarea + 65 + 2 + + + Use SafeSearch engine + safesearch + + At the moment it is supported by Google, Yandex, Yahoo, MSN, Live Search and Bing. Make sure that the search engines can be accessed. It is recommended to prohibit access to others.
+ Note: This option overrides 'Rewrite' setting. + ]]>
+ checkbox +
+ + Rewrite + rewrite + + select + + + Log + enablelog + + checkbox + + + + squidguard_validate_acl(&$_POST, &$input_errors); + + + squidguard_before_form_acl(&$pkg, false); + + + squidGuard_print_javascript(); + + + +// squidguard_resync(); + + diff --git a/config/squidGuard-devel/squidguard_dest.xml b/config/squidGuard-devel/squidguard_dest.xml new file mode 100644 index 00000000..3525098e --- /dev/null +++ b/config/squidGuard-devel/squidguard_dest.xml @@ -0,0 +1,189 @@ + + + + + + Describe your package requirements here + Currently there are no FAQ items provided. + squidguarddest + none + Proxy filter SquidGuard: Target categories + /usr/local/pkg/squidguard.inc + A proxy server user has been deleted. + A proxy server user has been created/modified. + + + General settings + /pkg_edit.php?xml=squidguard.xml&id=0 + + + Common ACL + /pkg_edit.php?xml=squidguard_default.xml&id=0 + + + Groups ACL + /pkg.php?xml=squidguard_acl.xml + + + Target categories + /pkg.php?xml=squidguard_dest.xml + + + + Times + /pkg.php?xml=squidguard_time.xml + + + Rewrites + /pkg.php?xml=squidguard_rewr.xml + + + Blacklist + /squidGuard/squidguard_blacklist.php + + + Log + /squidGuard/squidguard_log.php + + + XMLRPC Sync + /pkg_edit.php?xml=squidguard_sync.xml + + + + + Name + name + + + Redirect + redirect + + + Description + description + + + + + Name + name + + The name must consist between 2 and 15 symbols [a-Z_0-9]. The first one must be a letter.
+ ]]>
+ input + 100 + +
+ + Order + order + + ]]> + select + + + Domain List + domains + + Example: mail.ru e-mail.ru yahoo.com 192.168.1.1 + ]]> + textarea + 60 + 10 + + + URL List + urls + + Example: host.com/xxx 12.10.220.125/alisa + ]]> + textarea + 60 + 10 + + + Regular Expression + expressions + | . + Example: mail|casino|game|\.rsdf$ + ]]> + textarea + 60 + 10 + + + Redirect mode + redirect_mode + + Select redirect mode here. + <br> Note: if you use 'transparent proxy', then 'int' redirect mode will not accessible. + + <br> Options: + <A title="To 'url' will added special client information;" > + <span style="background-color: #dddddd;" >ext url err page</span></A> , + <A title="Client view 'url' content without any notification about;" > + <span style="background-color: #dddddd;" > ext url redirect</span></A> , + <A title="Client will moved to specified url with displaying url in addres bar;" > + <span style="background-color: #dddddd;" > ext url as 'move'</span></A> , + <A title="Client will moved to specified url with showing progress(only!) in status bar;" > + <span style="background-color: #dddddd;" > ext url as 'found'.</span></A> + </u> + + select + rmod_none + + + + + + + + + + + + + + Redirect + redirect + + textarea + 60 + 2 + + + Description + description + + input + 90 + + + Log + enablelog + checkbox + + +
+ + squidguard_before_form_dest(&$pkg); + + + squidguard_validate_destination($_POST, &$input_errors); + + + squidguard_resync_dest(); + + + squidguard_resync_dest(); + + + squidGuard_print_javascript(); + +
diff --git a/config/squidGuard-devel/squidguard_log.php b/config/squidGuard-devel/squidguard_log.php new file mode 100644 index 00000000..8eba2311 --- /dev/null +++ b/config/squidGuard-devel/squidguard_log.php @@ -0,0 +1,327 @@ +"; + $res .= "Show top 50 entries. List from the line: " . + "<<" . + " 0 " . + ">> " . + ""; + + foreach($dump as $dm) { + if (!$dm[0] || !$dm[1]) continue; + # datetime + $dm[0] = date("d.m.Y H:i:s", strtotime($dm[0])); + $res .= "{$dm[0]}"; + + # col 1 + $dm[1] = htmlentities($dm[1]); + $dm[1] = squidguard_html_autowrap($dm[1]); + $res .= "{$dm[1]}"; + + # for blocked rep + if (count($dm) > 2) { + $dm[2] = htmlentities($dm[2]); + $dm[2] = squidguard_html_autowrap($dm[2]); + $res .= "{$dm[2]}"; + $res .= "{$dm[3]}"; + } + $res .= ""; + } + $res .= ""; + } + else $res = "{$dump}"; + } else { + $res = "No data."; + } + + $res = "el(\"reportarea\").innerHTML = \"{$res}\";"; + return $res; +} + +function squidguard_prepfor_JS($cont) +{ + # replace for JS + $cont = str_replace("\n", "\\n", $cont); + $cont = str_replace("\r", "\\r", $cont); + $cont = str_replace("\t", "\\t", $cont); + $cont = str_replace("\"", "\'", $cont); + return $cont; +} + +function squidguard_prep_textareacont($cont) +{ + $cont = squidguard_prepfor_JS($cont); + return + "el('reportarea').innerHTML = \"
\";" . + "el('pconf').innerHTML = '$cont';"; +} + +function squidguard_html_autowrap($cont) +{ + # split strings + $p = 0; + $pstep = 25; + $str = $cont; + $cont = ''; + for ( $p = 0; $p < strlen($str); $p += $pstep ) { + $s = substr( $str, $p, $pstep ); + if ( !$s ) break; + $cont .= $s . ""; + } + + return $cont; +} + +# ------------------------------------------------------------------------------ +# HTML Page +# ------------------------------------------------------------------------------ + +include("head.inc"); +echo "\t\n"; +?> + + + + + + + +
+ + + + + + + + + + +
+ +
+
+ + + + + + + +
+ +| "; + foreach ($tab_array as $ta) { + $id = "hd_{$ta[2]}"; + $bb = $ta[1] ? "font-weight: bold;" : ''; + echo "{$ta[0]} | "; + } + echo ""; +?> +
+
+
+
+ + + + + + diff --git a/config/squidGuard-devel/squidguard_rewr.xml b/config/squidGuard-devel/squidguard_rewr.xml new file mode 100644 index 00000000..c21cb1c0 --- /dev/null +++ b/config/squidGuard-devel/squidguard_rewr.xml @@ -0,0 +1,144 @@ + + + + + + Describe your package requirements here + Currently there are no FAQ items provided. + squidguardrewrite + none + Proxy filter SquidGuard: Rewrites + /usr/local/pkg/squidguard.inc + + + General settings + /pkg_edit.php?xml=squidguard.xml&id=0 + + + Common ACL + /pkg_edit.php?xml=squidguard_default.xml&id=0 + + + Groups ACL + /pkg.php?xml=squidguard_acl.xml + + + Target categories + /pkg.php?xml=squidguard_dest.xml + + + Times + /pkg.php?xml=squidguard_time.xml + + + Rewrites + /pkg.php?xml=squidguard_rewr.xml + + + + Blacklist + /squidGuard/squidguard_blacklist.php + + + Log + /squidGuard/squidguard_log.php + + + XMLRPC Sync + /pkg_edit.php?xml=squidguard_sync.xml + + + + + Name + name + + + Description + description + + + + + Name + name + + The name must consist between 2 and 15 symbols [a-Z_0-9]. The first one must be a letter.
+ ]]>
+ input + + 100 +
+ + + <b>Rewrite rule.</b><br> + Define how url will be replaced. + rowhelper + + + Target URL or regular expression + targeturl + input + 35 + + + Replace to URL + replaceto + input + 35 + + + Opt. + mode + select + no + + + + + + + + + + + + Log + enablelog + + checkbox + + + Description + description + + Note:
+ Rewrite rule: Define how the URL will be replaced.
+ Target URL or Regular Expression: Contains destination URL or regular expression. This is the URL or RegEx the user wants to visit.
+ Replace to URL: Contains the replacing URL. This is the URL the user will see instead the original one. + ]]>
+ input + 100 +
+
+ + squidGuard_print_javascript(); + + + squidguard_validate_rewrite($_POST, &$input_errors); + + +// squidguard_resync_rewrite(); + +
diff --git a/config/squidGuard-devel/squidguard_sync.xml b/config/squidGuard-devel/squidguard_sync.xml new file mode 100644 index 00000000..f0537faf --- /dev/null +++ b/config/squidGuard-devel/squidguard_sync.xml @@ -0,0 +1,171 @@ + + + + + + +Copyright (C) 2013 Marcello Coutinho +based on pfblocker_sync.xml +All rights reserved. + +Based on m0n0wall (http://m0n0.ch/wall) +Copyright (C) 2003-2006 Manuel Kasper . +All rights reserved. +*/ +/* ========================================================================== */ +/* +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. + +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 requirements here + Currently there are no FAQ items provided. + squidguardsync + 1.3_1 pkg v.1.9 + Proxy filter SquidGuard: XMLRPC Sync + /usr/local/pkg/squidguard.inc + + + General settings + /pkg_edit.php?xml=squidguard.xml&id=0 + + + Common ACL + /pkg_edit.php?xml=squidguard_default.xml&id=0 + + + Groups ACL + /pkg.php?xml=squidguard_acl.xml + + + Target categories + /pkg.php?xml=squidguard_dest.xml + + + Times + /pkg.php?xml=squidguard_time.xml + + + Rewrites + /pkg.php?xml=squidguard_rewr.xml + + + Blacklist + /squidGuard/squidguard_blacklist.php + + + Log + /squidGuard/squidguard_log.php + + + XMLRPC Sync + /pkg_edit.php?xml=squidguard_sync.xml&id=0 + + + + + + SquidGuard XMLRPC Sync + listtopic + + + Enable Sync + varsyncenablexmlrpc + + Important: While using "Sync to hosts defined below", only sync from host A to B, A to C but do not enable XMLRPC sync to A. This will result in a loop!]]> + select + + auto + + + + + + + + XMLRPC timeout + varsynctimeout + + input + 150 + 5 + + + + Destination Server + none + rowhelper + + + Enable + varsyncdestinenable + checkbox + + + GUI Protocol + varsyncprotocol + http or https]]> + select + HTTP + + + + + + + GUI IP-Address + varsyncipaddress + + input + 15 + + + GUI Port + varsyncport + + input + 3 + + + GUI Admin Password + varsyncpassword + + password + 20 + + + + + + squidguard_sync_on_changes(); + + + squidguard_sync_on_changes(); + + diff --git a/config/squidGuard-devel/squidguard_time.xml b/config/squidGuard-devel/squidguard_time.xml new file mode 100644 index 00000000..dfd589aa --- /dev/null +++ b/config/squidGuard-devel/squidguard_time.xml @@ -0,0 +1,144 @@ + + + + + + Describe your package requirements here + Currently there are no FAQ items provided. + squidguardtime + none + Proxy filter SquidGuard: Times + /usr/local/pkg/squidguard.inc + A proxy server user has been deleted. + A proxy server user has been created/modified. + + + General settings + /pkg_edit.php?xml=squidguard.xml&id=0 + + + Common ACL + /pkg_edit.php?xml=squidguard_default.xml&id=0 + + + Groups ACL + /pkg.php?xml=squidguard_acl.xml + + + Target categories + /pkg.php?xml=squidguard_dest.xml + + + Times + /pkg.php?xml=squidguard_time.xml + + + + Rewrites + /pkg.php?xml=squidguard_rewr.xml + + + Blacklist + /squidGuard/squidguard_blacklist.php + + + Log + /squidGuard/squidguard_log.php + + + XMLRPC Sync + /pkg_edit.php?xml=squidguard_sync.xml + + + + + Name + name + + + Description + description + + + + + Name + name + + The name must consist between 2 and 15 symbols [a-Z_0-9]. The first one must be a letter.
+ ]]>
+ input + + 100 +
+ + Values + rowhelper + + + Time type + timetype + + select + weekly + + + + + + + Days + timedays + + select + * + + + + + + + + + + + + + Date or Date range + daterange + input + 40 + + + Time range + sg_timerange + + input + 20 + 00:00-23:59 + + + + + Description + description + + Note:
+ Example for Date or Date Range: 2007.12.31 or 2007.11.31-2007.12.31 or *.12.31 or 2007.*.31
+ Example for Time Range: 08:00-18:00 + ]]>
+ input + 80 +
+
+ + squidGuard_print_javascript(); + + + squidguard_validate_times(&$_POST, &$input_errors); + + +// squidguard_resync_time(); + +
-- cgit v1.2.3