aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAlexander Wilke <nachtfalkeaw@web.de>2013-01-09 12:46:20 -0800
committerAlexander Wilke <nachtfalkeaw@web.de>2013-01-09 12:46:20 -0800
commit7267355c2f576d2c3a1b1f698459b3a402dada26 (patch)
tree0175b40942a6ffd5b27137fa95574bbba8cd6098 /config
parent47bc7bba2324c0b1b53acc56bc40284b7c4db5fe (diff)
parente494a0ececc576cf891c03f34612952e4925b60c (diff)
downloadpfsense-packages-7267355c2f576d2c3a1b1f698459b3a402dada26.tar.gz
pfsense-packages-7267355c2f576d2c3a1b1f698459b3a402dada26.tar.bz2
pfsense-packages-7267355c2f576d2c3a1b1f698459b3a402dada26.zip
Merge pull request #349 from Nachtfalkeaw/master
squidguard: added XMLRPC Sync and some cosmetics on GUI descriptions
Diffstat (limited to 'config')
-rw-r--r--config/squidGuard/squidguard.inc159
-rw-r--r--config/squidGuard/squidguard.xml38
-rw-r--r--config/squidGuard/squidguard_acl.xml353
-rw-r--r--config/squidGuard/squidguard_blacklist.php1
-rw-r--r--config/squidGuard/squidguard_configurator.inc13
-rw-r--r--config/squidGuard/squidguard_default.xml189
-rw-r--r--config/squidGuard/squidguard_dest.xml236
-rw-r--r--config/squidGuard/squidguard_log.php3
-rw-r--r--config/squidGuard/squidguard_rewr.xml45
-rw-r--r--config/squidGuard/squidguard_sync.xml163
-rw-r--r--config/squidGuard/squidguard_time.xml34
11 files changed, 785 insertions, 449 deletions
diff --git a/config/squidGuard/squidguard.inc b/config/squidGuard/squidguard.inc
index 7b10536d..fb7fad28 100644
--- a/config/squidGuard/squidguard.inc
+++ b/config/squidGuard/squidguard.inc
@@ -332,6 +332,7 @@ function squidguard_resync() {
//}
squidguard_cron_install();
+ squidguard_sync_on_changes();
}
# -----------------------------------------------------------------------------
@@ -1399,4 +1400,160 @@ function squidguard_blacklist_list()
return $res;
}
-?> \ No newline at end of file
+
+// ##### The following part is based on the code of pfblocker #####
+
+/* Uses XMLRPC to synchronize the changes to a remote node */
+function squidguard_sync_on_changes() {
+ global $config, $g;
+ $varsyncenablexmlrpc = $config['installedpackages']['squidguardsync']['config'][0]['varsyncenablexmlrpc'];
+ $varsynctimeout = $config['installedpackages']['squidguardsync']['config'][0]['varsynctimeout'];
+
+ // if checkbox is NOT checked do nothing
+ if(!$varsyncenablexmlrpc) {
+ return;
+ }
+
+ log_error("SquidGuard: Starting XMLRPC process (squidguard_do_xmlrpc_sync) with timeout {$varsynctimeout} seconds.");
+
+ // if checkbox is checked get IP and password of the destination hosts
+ foreach ($config['installedpackages']['squidguardsync']['config'] as $rs ){
+ foreach($rs['row'] as $sh){
+ // if checkbox is NOT checked do nothing
+ if($sh['varsyncdestinenable']) {
+ $varsyncprotocol = $sh['varsyncprotocol'];
+ $sync_to_ip = $sh['varsyncipaddress'];
+ $password = $sh['varsyncpassword'];
+ $varsyncport = $sh['varsyncport'];
+ // check if all credentials are complete for this host
+ if($password && $sync_to_ip && $varsyncport && $varsyncprotocol) {
+ squidguard_do_xmlrpc_sync($sync_to_ip, $password, $varsyncport, $varsyncprotocol);
+ }
+ else {
+ log_error("SquidGuard: XMLRPC Sync with {$sh['varsyncipaddress']} has incomplete credentials. No XMLRPC Sync done!");
+ }
+ }
+ else {
+ log_error("SquidGuard: XMLRPC Sync with {$sh['varsyncipaddress']} is disabled");
+ }
+ }
+ }
+ log_error("SquidGuard: Finished XMLRPC process (squidguard_do_xmlrpc_sync).");
+}
+
+/* Do the actual XMLRPC sync */
+function squidguard_do_xmlrpc_sync($sync_to_ip, $password, $varsyncport, $varsyncprotocol) {
+ global $config, $g;
+
+ $varsynctimeout = $config['installedpackages']['squidguardsync']['config'][0]['varsynctimeout'];
+
+ if($varsynctimeout == '' || $varsynctimeout == 0) {
+ $varsynctimeout = 150;
+ }
+
+ // log_error("SquidGuard: Starting XMLRPC process (squidguard_do_xmlrpc_sync) with timeout {$varsynctimeout} seconds.");
+
+ if(!$password)
+ return;
+
+ if(!$sync_to_ip)
+ return;
+
+ if(!$varsyncport)
+ return;
+
+ if(!$varsyncprotocol)
+ return;
+
+ // Check and choose correct protocol type, port number and IP address
+ $synchronizetoip .= "$varsyncprotocol" . '://';
+ $port = "$varsyncport";
+
+ $synchronizetoip .= $sync_to_ip;
+
+ /* xml will hold the sections to sync */
+ $xml = array();
+ $xml['squidguardgeneral'] = $config['installedpackages']['squidguardgeneral'];
+ $xml['squidguardacl'] = $config['installedpackages']['squidguardacl'];
+ $xml['squidguarddefault'] = $config['installedpackages']['squidguarddefault'];
+ $xml['squidguarddest'] = $config['installedpackages']['squidguarddest'];
+ $xml['squidguardrewrite'] = $config['installedpackages']['squidguardrewrite'];
+ $xml['squidguardtime'] = $config['installedpackages']['squidguardtime'];
+
+ /* assemble xmlrpc payload */
+ $params = array(
+ XML_RPC_encode($password),
+ XML_RPC_encode($xml)
+ );
+
+ /* set a few variables needed for sync code borrowed from filter.inc */
+ $url = $synchronizetoip;
+ log_error("SquidGuard: Beginning squidguard XMLRPC sync with {$url}:{$port}.");
+ $method = 'pfsense.merge_installedpackages_section_xmlrpc';
+ $msg = new XML_RPC_Message($method, $params);
+ $cli = new XML_RPC_Client('/xmlrpc.php', $url, $port);
+ $cli->setCredentials('admin', $password);
+ if($g['debug'])
+ $cli->setDebug(1);
+ /* send our XMLRPC message and timeout after $varsynctimeout seconds */
+ $resp = $cli->send($msg, $varsynctimeout);
+ if(!$resp) {
+ $error = "A communications error occurred while squidguard was attempting XMLRPC sync with {$url}:{$port}.";
+ log_error("SquidGuard: $error");
+ file_notice("sync_settings", $error, "squidguard Settings Sync", "");
+ } elseif($resp->faultCode()) {
+ $cli->setDebug(1);
+ $resp = $cli->send($msg, $varsynctimeout);
+ $error = "An error code was received while squidguard XMLRPC was attempting to sync with {$url}:{$port} - Code " . $resp->faultCode() . ": " . $resp->faultString();
+ log_error("SquidGuard: $error");
+ file_notice("sync_settings", $error, "squidguard Settings Sync", "");
+ } else {
+ log_error("SquidGuard: XMLRPC has synced data successfully with {$url}:{$port}.");
+ }
+
+ /* tell squidguard to reload our settings on the destionation sync host. */
+ $method = 'pfsense.exec_php';
+ $execcmd = "require_once('/usr/local/pkg/squidguard.inc');\n";
+ // pfblocker just needed one fuction to reload after XMLRPC. squidguard needs more so we point to a fuction below which contains all fuctions
+ $execcmd .= "squidguard_all_after_XMLRPC_resync();";
+
+ /* assemble xmlrpc payload */
+ $params = array(
+ XML_RPC_encode($password),
+ XML_RPC_encode($execcmd)
+ );
+
+ log_error("SquidGuard XMLRPC is reloading data on {$url}:{$port}.");
+ $msg = new XML_RPC_Message($method, $params);
+ $cli = new XML_RPC_Client('/xmlrpc.php', $url, $port);
+ $cli->setCredentials('admin', $password);
+ $resp = $cli->send($msg, $varsynctimeout);
+ if(!$resp) {
+ $error = "A communications error occurred while squidguard was attempting XMLRPC sync with {$url}:{$port} (exec_php).";
+ log_error($error);
+ file_notice("sync_settings", $error, "squidguard Settings Sync", "");
+ } elseif($resp->faultCode()) {
+ $cli->setDebug(1);
+ $resp = $cli->send($msg, $varsynctimeout);
+ $error = "An error code was received while squidguard XMLRPC was attempting to sync with {$url}:{$port} - Code " . $resp->faultCode() . ": " . $resp->faultString();
+ log_error($error);
+ file_notice("sync_settings", $error, "squidguard Settings Sync", "");
+ } else {
+ log_error("SquidGuard: XMLRPC has reloaded data successfully on {$url}:{$port} (exec_php).");
+ }
+
+}
+
+// ##### The part above is based on the code of pfblocker #####
+
+// This function restarts all other needed functions after XMLRPC so that the content of .XML + .INC will be written in the files
+// Adding more functions will increase the time to sync
+function squidguard_all_after_XMLRPC_resync() {
+
+ squidguard_resync_acl();
+ squidguard_resync();
+
+ log_error("SquidGuard: Finished XMLRPC process. It should be OK. For more information look at the host which started sync.");
+}
+
+?>
diff --git a/config/squidGuard/squidguard.xml b/config/squidGuard/squidguard.xml
index d84d53ab..36064fdb 100644
--- a/config/squidGuard/squidguard.xml
+++ b/config/squidGuard/squidguard.xml
@@ -2,7 +2,7 @@
<!DOCTYPE packagegui SYSTEM "../schema/packages.dtd">
<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?>
<packagegui>
- <description>Describe your package here</description>
+ <description>[<![CDATA[Describe your package here]]></description>
<requirements>Describe your package requirements here</requirements>
<faq>Currently there are no FAQ items provided.</faq>
<name>squidguardgeneral</name>
@@ -50,10 +50,14 @@
<text>Log</text>
<url>/squidGuard/squidguard_log.php</url>
</tab>
+ <tab>
+ <text>XMLRPC Sync</text>
+ <url>/pkg_edit.php?xml=squidguard_sync.xml</url>
+ </tab>
</tabs>
<service>
<name>squidGuard</name>
- <description>Proxy server filter Service</description>
+ <description><![CDATA[Proxy server filter Service]]></description>
<executable>squidGuard</executable>
</service>
<additional_files_needed>
@@ -110,31 +114,39 @@
<field>
<fielddescr>Enable</fielddescr>
<fieldname>squidguard_enable</fieldname>
- <description>Check this for enable squidGuard</description>
+ <description><![CDATA[Check this option to enable squidGuard]]></description>
<type>checkbox</type>
</field>
+ <field>
+ <name>Logging options</name>
+ <type>listtopic</type>
+ </field>
<field>
<fielddescr>Enable GUI log</fielddescr>
<fieldname>enable_guilog</fieldname>
- <description>Check this for enable GUI log.</description>
+ <description><![CDATA[Check this option to log the access to the Proxy Filter GUI.]]></description>
<type>checkbox</type>
</field>
<field>
<fielddescr>Enable log</fielddescr>
<fieldname>enable_log</fieldname>
- <description>Check this for enable log of the proxy filter. Usually log used for testing filter settings.</description>
+ <description><![CDATA[Check this option to log the proxy filter settings like blocked websites in Common ACL, Group ACL and Target Categories. This option is usually used to check the filter settings.]]></description>
<type>checkbox</type>
</field>
<field>
<fielddescr>Enable log rotation</fielddescr>
<fieldname>log_rotation</fieldname>
- <description>Check this for enable daily rotate a log of the proxy filter. Use this option for limit log file size.</description>
+ <description><![CDATA[Check this option to rotate the logs every day. This is recommended if you enable any kind of logging to limit file size and do not run out of disk space.]]></description>
<type>checkbox</type>
</field>
+ <field>
+ <name>Miscellaneous</name>
+ <type>listtopic</type>
+ </field>
<field>
<fielddescr>Clean Advertising</fielddescr>
<fieldname>adv_blankimg</fieldname>
- <description>Check this to display a blank gif image instead the default block page. With this option you get a cleaner page.</description>
+ <description><![CDATA[Check this option to display a blank gif image instead of the default block page. With this option the user gets a cleaner webpage.]]></description>
<type>checkbox</type>
</field>
<field>
@@ -144,24 +156,24 @@
<field>
<fielddescr>Blacklist</fielddescr>
<fieldname>blacklist</fieldname>
- <description>Check this for enable blacklist</description>
+ <description><![CDATA[Check this option to enable blacklist]]></description>
<type>checkbox</type>
</field>
<field>
<fielddescr>Blacklist proxy</fielddescr>
<fieldname>blacklist_proxy</fieldname>
- <description>
- Blacklist upload proxy - enter here, or leave blank.
- Format: host:[port login:pass] . Default proxy port 1080.
+ <description><![CDATA[<br>
+ Blacklist upload proxy - enter here, or leave blank.<br>
+ Format: host:[port login:pass] . Default proxy port 1080.<br>
Example: '192.168.0.1:8080 user:pass'
- </description>
+ ]]></description>
<type>input</type>
<size>100</size>
</field>
<field>
<fielddescr>Blacklist URL</fielddescr>
<fieldname>blacklist_url</fieldname>
- <description>Enter FTP, HTTP or LOCAL (firewall) URL blacklist archive, or leave blank.</description>
+ <description><![CDATA[Enter the path to the blacklist (blacklist.tar.gz) here. You can use FTP, HTTP or LOCAL URL blacklist archive or leave blank. The LOCAL path could be your pfsense (/tmp/blacklist.tar.gz).]]></description>
<type>input</type>
<size>100</size>
</field>
diff --git a/config/squidGuard/squidguard_acl.xml b/config/squidGuard/squidguard_acl.xml
index 1b631ca3..07ecd71b 100644
--- a/config/squidGuard/squidguard_acl.xml
+++ b/config/squidGuard/squidguard_acl.xml
@@ -2,7 +2,7 @@
<!DOCTYPE packagegui SYSTEM "../schema/packages.dtd">
<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?>
<packagegui>
- <description>Describe your package here</description>
+ <description><![CDATA[Describe your package here]]></description>
<requirements>Describe your package requirements here</requirements>
<faq>Currently there are no FAQ items provided.</faq>
<name>squidguardacl</name>
@@ -45,201 +45,198 @@
<text>Log</text>
<url>/squidGuard/squidguard_log.php</url>
</tab>
+ <tab>
+ <text>XMLRPC Sync</text>
+ <url>/pkg_edit.php?xml=squidguard_sync.xml</url>
+ </tab>
</tabs>
<adddeleteeditpagefields>
- <columnitem>
- <fielddescr>Disabled</fielddescr>
- <fieldname>disabled</fieldname>
- </columnitem>
- <columnitem>
- <fielddescr>Name</fielddescr>
- <fieldname>name</fieldname>
- </columnitem>
- <columnitem>
- <fielddescr>Time</fielddescr>
- <fieldname>time</fieldname>
- </columnitem>
- <columnitem>
- <fielddescr>Description</fielddescr>
- <fieldname>description</fieldname>
- </columnitem>
+ <columnitem>
+ <fielddescr>Disabled</fielddescr>
+ <fieldname>disabled</fieldname>
+ </columnitem>
+ <columnitem>
+ <fielddescr>Name</fielddescr>
+ <fieldname>name</fieldname>
+ </columnitem>
+ <columnitem>
+ <fielddescr>Time</fielddescr>
+ <fieldname>time</fieldname>
+ </columnitem>
+ <columnitem>
+ <fielddescr>Description</fielddescr>
+ <fieldname>description</fieldname>
+ </columnitem>
</adddeleteeditpagefields>
<fields>
- <field>
- <fielddescr>Disabled</fielddescr>
- <fieldname>disabled</fieldname>
- <description>Check this for disable this ACL rule.</description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Name</fielddescr>
- <fieldname>name</fieldname>
- <description>
- Enter the unique name here.
- Name must consist of minimum 2 symbols, first from which letter. &lt;br&gt;
- All other symbols must be [a-Z_0-9].
- </description>
- <type>input</type>
- <required/>
- <size>100</size>
- </field>
- <field>
- <fielddescr>Order</fielddescr>
- <fieldname>order</fieldname>
- <description>
- Select the new position for ACL item. ACL are evaluated on a first-match source basis.&lt;br&gt;
- &lt;b&gt;Note:&lt;/b&gt; &lt;br&gt;
- Search for a suitable ACL by field 'source' will occur before the first match. If you want to define an exception for some sources (IP) from the IP range, put them on first of the list. &lt;br&gt;
- &lt;b&gt;For example:&lt;/b&gt; &lt;br&gt;
- ACL with single (or short range) source ip 10.0.0.15, must be placed before ACL with more large ip range 10.0.0.0/24 &lt;br&gt;
- </description>
- <type>select</type>
- </field>
- <field>
- <fielddescr>Client (source)</fielddescr>
- <fieldname>source</fieldname>
- <description>
- Enter client's IP address or domain or "username" here. For separate use space.
- &lt;br&gt;&lt;b&gt;Example:&lt;/b&gt;
- &lt;br&gt;ip: 192.168.0.1 or subnet 192.168.0.0/24 or subnet 192.168.1.0/255.255.255.0 or range 192.168.1.1-192.168.1.10
- &lt;br&gt;domain: foo.bar match foo.bar or *.foo.bar
- &lt;br&gt;username: 'user1'
- </description>
- <type>textarea</type>
- <cols>65</cols>
- <rows>3</rows>
- <required/>
- </field>
- <field>
- <fielddescr>Time</fielddescr>
- <fieldname>time</fieldname>
- <description>Select time in which 'Target Rules' will operate, or leave 'none' for action of rules without time restriction. If this option is set, then in off-time will operate the second rule set.</description>
- <type>select</type>
- </field>
- <field>
- <fielddescr>Target Rules</fielddescr>
- <fieldname>dest</fieldname>
- <description></description>
- <type>input</type>
- <size>100</size>
- </field>
- <field>
- <fielddescr>Not to allow IP addresses in URL</fielddescr>
- <fieldname>notallowingip</fieldname>
- <description>
- To make sure that people don't bypass the URL filter.
- by simply using the IP addresses instead of the fully qualified domain names, you can check this option.
- This option has no effect on the WhiteList.
- </description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Redirect mode</fielddescr>
- <fieldname>redirect_mode</fieldname>
- <description>
- Select redirect mode here.
- &lt;br&gt; Note: if you use 'transparent proxy', then 'int' redirect mode will not accessible.
-<!-- &lt;br&gt;&lt;b&gt; int size limit :&lt;/b&gt; if content size 0 or > 'size limit', then client moved to 'blank image' page; -->
- &lt;br&gt; Options:
- &lt;A title="To 'url' will added special client information;" &gt;
- &lt;span style="background-color: #dddddd;" &gt;ext url err page&lt;/span&gt;&lt;/A&gt; ,
- &lt;A title="Client view 'url' content without any notification about;" &gt;
- &lt;span style="background-color: #dddddd;" &gt; ext url redirect&lt;/span&gt;&lt;/A&gt; ,
- &lt;A title="Client will moved to specified url with displaying url in addres bar;" &gt;
- &lt;span style="background-color: #dddddd;" &gt; ext url as 'move'&lt;/span&gt;&lt;/A&gt; ,
- &lt;A title="Client will moved to specified url with showing progress(only!) in status bar;" &gt;
- &lt;span style="background-color: #dddddd;" &gt; ext url as 'found'.&lt;/span&gt;&lt;/A&gt;
- &lt;/u&gt;
- </description>
- <type>select</type>
- <value>rmod_none</value>
- <options>
- <option><name>none</name> <value>rmod_none</value></option>
- <option><name>int error page (enter error message)</name> <value>rmod_int</value></option>
- <option><name>int blank page </name> <value>rmod_int_bpg</value></option>
-<!-- <option><name>int blank image</name> <value>rmod_int_bim</value></option> -->
-<!-- <option><name>int size limit (enter size in bytes)</name> <value>rmod_int_szl</value></option> -->
- <option><name>ext url err page (enter URL)</name> <value>rmod_ext_err</value></option>
- <option><name>ext url redirect (enter URL)</name> <value>rmod_ext_rdr</value></option>
- <option><name>ext url move (enter URL)</name> <value>rmod_ext_mov</value></option>
- <option><name>ext url found (enter URL)</name> <value>rmod_ext_fnd</value></option>
- </options>
- </field>
- <field>
- <fielddescr>Redirect</fielddescr>
- <fieldname>redirect</fieldname>
- <description>
- Enter external redirection URL, error message or size (bytes) here.
- </description>
- <type>textarea</type>
- <cols>65</cols>
- <rows>2</rows>
- </field>
+ <field>
+ <fielddescr>Disabled</fielddescr>
+ <fieldname>disabled</fieldname>
+ <description><![CDATA[Check this to disable this ACL rule.]]></description>
+ <type>checkbox</type>
+ </field>
+ <field>
+ <fielddescr>Name</fielddescr>
+ <fieldname>name</fieldname>
+ <description><![CDATA[
+ Enter a unique name of this rule here.<br>
+ The name must consist between 2 and 15 symbols [a-Z_0-9]. The first one must be a letter.<br>
+ ]]></description>
+ <type>input</type>
+ <required/>
+ <size>100</size>
+ </field>
+ <field>
+ <fielddescr>Order</fielddescr>
+ <fieldname>order</fieldname>
+ <description><![CDATA[
+ Select the new position for this ACL item. ACLs are evaluated on a first-match source basis.<br>
+ <b>Note:</b><br>
+ Search for a suitable ACL by field 'source' will occur before the first match. If you want to define an exception for some sources (IP) from the IP range, put them on first of the list.<br>
+ <b>Example:</b><br>
+ ACL with single (or short range) source ip 10.0.0.15 must be placed before ACL with more large ip range 10.0.0.0/24.<br>
+ ]]></description>
+ <type>select</type>
+ </field>
+ <field>
+ <fielddescr>Client (source)</fielddescr>
+ <fieldname>source</fieldname>
+ <description><![CDATA[
+ Enter client's IP address or domain or "username" here. To separate them use space.<br>
+ <b>Example:</b><br>
+ <b>IP:</b> 192.168.0.1 - <b>Subnet:</b> 192.168.0.0/24 or 192.168.1.0/255.255.255.0 - <b>IP-Range:</b> 192.168.1.1-192.168.1.10<br>
+ <b>Domain:</b> foo.bar matches foo.bar or *.foo.bar<br>
+ <b>Username:</b> 'user1'
+ ]]></description>
+ <type>textarea</type>
+ <cols>65</cols>
+ <rows>3</rows>
+ <required/>
+ </field>
+ <field>
+ <fielddescr>Time</fielddescr>
+ <fieldname>time</fieldname>
+ <description><![CDATA[Select the time in which 'Target Rules' will operate or leave 'none' for rules without time restriction. If this option is set then in off-time the second ruleset will operate.]]></description>
+ <type>select</type>
+ </field>
+ <field>
+ <fielddescr>Target Rules</fielddescr>
+ <fieldname>dest</fieldname>
+ <description><![CDATA[]]></description>
+ <type>input</type>
+ <size>100</size>
+ </field>
+ <field>
+ <fielddescr>Do not allow IP-Addresses in URL</fielddescr>
+ <fieldname>notallowingip</fieldname>
+ <description><![CDATA[To make sure that people do not bypass the URL filter by simply using the IP-Addresses instead of the FQDN you can check this option. This option has no effect on the whitelist.]]></description>
+ <type>checkbox</type>
+ </field>
+ <field>
+ <fielddescr>Redirect mode</fielddescr>
+ <fieldname>redirect_mode</fieldname>
+ <description>
+ Select redirect mode here.
+ &lt;br&gt; Note: if you use 'transparent proxy', then 'int' redirect mode will not accessible.
+<!-- &lt;br&gt;&lt;b&gt; int size limit :&lt;/b&gt; if content size 0 or > 'size limit', then client moved to 'blank image' page; -->
+ &lt;br&gt; Options:
+ &lt;A title="To 'url' will added special client information;" &gt;
+ &lt;span style="background-color: #dddddd;" &gt;ext url err page&lt;/span&gt;&lt;/A&gt; ,
+ &lt;A title="Client view 'url' content without any notification about;" &gt;
+ &lt;span style="background-color: #dddddd;" &gt; ext url redirect&lt;/span&gt;&lt;/A&gt; ,
+ &lt;A title="Client will moved to specified url with displaying url in addres bar;" &gt;
+ &lt;span style="background-color: #dddddd;" &gt; ext url as 'move'&lt;/span&gt;&lt;/A&gt; ,
+ &lt;A title="Client will moved to specified url with showing progress(only!) in status bar;" &gt;
+ &lt;span style="background-color: #dddddd;" &gt; ext url as 'found'.&lt;/span&gt;&lt;/A&gt;
+ &lt;/u&gt;
+ </description>
+ <type>select</type>
+ <value>rmod_none</value>
+ <options>
+ <option><name>none</name> <value>rmod_none</value></option>
+ <option><name>int error page (enter error message)</name> <value>rmod_int</value></option>
+ <option><name>int blank page </name> <value>rmod_int_bpg</value></option>
+<!-- <option><name>int blank image</name> <value>rmod_int_bim</value></option> -->
+<!-- <option><name>int size limit (enter size in bytes)</name> <value>rmod_int_szl</value></option> -->
+ <option><name>ext url err page (enter URL)</name> <value>rmod_ext_err</value></option>
+ <option><name>ext url redirect (enter URL)</name> <value>rmod_ext_rdr</value></option>
+ <option><name>ext url move (enter URL)</name> <value>rmod_ext_mov</value></option>
+ <option><name>ext url found (enter URL)</name> <value>rmod_ext_fnd</value></option>
+ </options>
+ </field>
+ <field>
+ <fielddescr>Redirect</fielddescr>
+ <fieldname>redirect</fieldname>
+ <description><![CDATA[Enter the external redirection URL, error message or size (bytes) here.]]></description>
+ <type>textarea</type>
+ <cols>65</cols>
+ <rows>2</rows>
+ </field>
<!-- not need now
- <field>
- <fielddescr>Redirect for off-time</fielddescr>
- <fieldname>overredirect</fieldname>
- <description>
- Enter external redirection URL, error message or size (bytes) here.
- </description>
- <type>textarea</type>
- <cols>65</cols>
- <rows>2</rows>
- </field>
+ <field>
+ <fielddescr>Redirect for off-time</fielddescr>
+ <fieldname>overredirect</fieldname>
+ <description><![CDATA[
+ Enter external redirection URL, error message or size (bytes) here.
+ ]]></description>
+ <type>textarea</type>
+ <cols>65</cols>
+ <rows>2</rows>
+ </field>
-->
- <field>
- <fielddescr>Use SafeSearch engine</fielddescr>
- <fieldname>safesearch</fieldname>
- <description>
- To protect your children from adult content, you can use the protected mode of search engines.
- Now it is supported by Google, Yandex, Yahoo, MSN, Live Search, Bing. Make sure that the search engines can, and others, it is recommended to prohibit.
- &lt;br&gt;Note: ! This option overrides 'Rewrite' setting. !
- </description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Rewrite</fielddescr>
- <fieldname>rewrite</fieldname>
- <description>Enter rewrite condition name for this rule, or leave blank.</description>
- <type>select</type>
- </field>
- <field>
- <fielddescr>Rewrite for off-time</fielddescr>
- <fieldname>overrewrite</fieldname>
- <description>Enter rewrite condition name for this rule, or leave blank.</description>
- <type>select</type>
- </field>
- <field>
- <fielddescr>Description</fielddescr>
- <fieldname>description</fieldname>
- <description>You may enter a description here for your reference (not parsed).</description>
- <type>input</type>
- <size>100</size>
- </field>
- <field>
- <fielddescr>Log</fielddescr>
- <fieldname>enablelog</fieldname>
- <description>Check this for log this item.</description>
- <type>checkbox</type>
- </field>
+ <field>
+ <fielddescr>Use SafeSearch engine</fielddescr>
+ <fieldname>safesearch</fieldname>
+ <description><![CDATA[
+ To protect your children from adult content you can use the protected mode of search engines.<br>
+ 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.<br>
+ <b>Note:</b> This option overrides 'Rewrite' setting.
+ ]]></description>
+ <type>checkbox</type>
+ </field>
+ <field>
+ <fielddescr>Rewrite</fielddescr>
+ <fieldname>rewrite</fieldname>
+ <description><![CDATA[Enter the rewrite condition name for this rule or leave it blank.]]></description>
+ <type>select</type>
+ </field>
+ <field>
+ <fielddescr>Rewrite for off-time</fielddescr>
+ <fieldname>overrewrite</fieldname>
+ <description><![CDATA[Enter the rewrite condition name for this rule or leave it blank.]]></description>
+ <type>select</type>
+ </field>
+ <field>
+ <fielddescr>Description</fielddescr>
+ <fieldname>description</fieldname>
+ <description><![CDATA[You may enter any description here for your reference.]]></description>
+ <type>input</type>
+ <size>100</size>
+ </field>
+ <field>
+ <fielddescr>Log</fielddescr>
+ <fieldname>enablelog</fieldname>
+ <description><![CDATA[Check this option to enable logging for this ACL.]]></description>
+ <type>checkbox</type>
+ </field>
</fields>
<custom_php_validation_command>
- squidguard_validate_acl(&amp;$_POST, &amp;$input_errors);
+ squidguard_validate_acl(&amp;$_POST, &amp;$input_errors);
</custom_php_validation_command>
<custom_php_command_before_form>
- squidguard_before_form_acl(&amp;$pkg);
+ squidguard_before_form_acl(&amp;$pkg);
</custom_php_command_before_form>
<custom_php_after_form_command>
- squidGuard_print_javascript();
+ squidGuard_print_javascript();
</custom_php_after_form_command>
<custom_php_resync_config_command>
- squidguard_resync_acl();
+ squidguard_resync_acl();
</custom_php_resync_config_command>
<custom_delete_php_command>
- squidguard_resync_acl();
+ squidguard_resync_acl();
</custom_delete_php_command>
<custom_add_php_command>
</custom_add_php_command>
<custom_add_php_command_late>
</custom_add_php_command_late>
-</packagegui> \ No newline at end of file
+</packagegui>
diff --git a/config/squidGuard/squidguard_blacklist.php b/config/squidGuard/squidguard_blacklist.php
index 5e8382ae..98e0aecd 100644
--- a/config/squidGuard/squidguard_blacklist.php
+++ b/config/squidGuard/squidguard_blacklist.php
@@ -236,6 +236,7 @@ window.setTimeout('getactivity()', 150);
$tab_array[] = array(gettext("Rewrites"), false, "/pkg.php?xml=squidguard_rewr.xml");
$tab_array[] = array(gettext("Blacklist"), true, "/squidGuard/squidguard_blacklist.php");
$tab_array[] = array(gettext("Log"), false, "/squidGuard/squidguard_log.php");
+ $tab_array[] = array(gettext("XMLRPC Sync"), false, "/pkg_edit.php?xml=squidguard_sync.xml&amp;id=0");
display_top_tabs($tab_array);
?>
</td>
diff --git a/config/squidGuard/squidguard_configurator.inc b/config/squidGuard/squidguard_configurator.inc
index 5cef11cb..0100fba4 100644
--- a/config/squidGuard/squidguard_configurator.inc
+++ b/config/squidGuard/squidguard_configurator.inc
@@ -1883,17 +1883,18 @@ function acl_remove_blacklist_items($items)
# -----------------------------------------------------------------------------
function sg_script_logrotate()
{
- $lines = 1000; # SG logfile truncate lines count
- global $squidguard_config;
- $sglogname = $squidguard_config[F_LOGDIR] . "/" . SQUIDGUARD_LOGFILE;
+ global $squidguard_config;
+
+ $sglogname = $squidguard_config[F_LOGDIR] . "/" . SQUIDGUARD_LOGFILE;
$sgguilogname = $squidguard_config[F_LOGDIR] . "/" . SQUIDGUARD_GUILOGFILE;
+ $sgconflogname = $squidguard_config[F_LOGDIR] . "/" . SQUIDGUARD_CONFLOGFILE;
$res =
<<<EOD
#!/bin/sh
#
# This file generated automaticly with SquidGuard configurator
-# Rotates the block logile
+# Rotates the block logfile
tail -{$lines} {$sglogname} > {$sglogname}.0
tail -{$lines} {$sglogname}.0 > {$sglogname}
rm -f {$sglogname}.0
@@ -1901,6 +1902,10 @@ rm -f {$sglogname}.0
tail -{$lines} {$sgguilogname} > {$sgguilogname}.0
tail -{$lines} {$sgguilogname}.0 > {$sgguilogname}
rm -f {$sgguilogname}.0
+# Rotates the squidguard conf logile
+tail -{$lines} {$sgconflogname} > {$sgconflogname}.0
+tail -{$lines} {$sgconflogname}.0 > {$sgconflogname}
+rm -f {$sgconflogname}.0
EOD;
return $res;
}
diff --git a/config/squidGuard/squidguard_default.xml b/config/squidGuard/squidguard_default.xml
index ff05085a..01380ea5 100644
--- a/config/squidGuard/squidguard_default.xml
+++ b/config/squidGuard/squidguard_default.xml
@@ -2,7 +2,7 @@
<!DOCTYPE packagegui SYSTEM "../schema/packages.dtd">
<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?>
<packagegui>
- <description>Describe your package here</description>
+ <description><![CDATA[Describe your package here]]></description>
<requirements>Describe your package requirements here</requirements>
<faq>Currently there are no FAQ items provided.</faq>
<name>squidguarddefault</name>
@@ -43,110 +43,107 @@
<text>Log</text>
<url>/squidGuard/squidguard_log.php</url>
</tab>
+ <tab>
+ <text>XMLRPC Sync</text>
+ <url>/pkg_edit.php?xml=squidguard_sync.xml</url>
+ </tab>
</tabs>
<fields>
- <field>
- <fielddescr>Target Rules</fielddescr>
- <fieldname>dest</fieldname>
- <description></description>
- <type>input</type>
- <size>100</size>
- </field>
- <field>
- <fielddescr>Not to allow IP addresses in URL</fielddescr>
- <fieldname>notallowingip</fieldname>
- <description>
- To make sure that people don't bypass the URL filter
- by simply using the IP addresses instead of the fully qualified domain names, you can check this option.
- This option has no effect on the WhiteList.
- </description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Proxy Denied Error</fielddescr>
- <fieldname>deniedmessage</fieldname>
- <description>The first part of the error message displayed to clients when denied. Defaults to "Request denied by $g['product_name'] proxy"</description>
- <type>textarea</type>
- <cols>65</cols>
- <rows>2</rows>
- </field>
-
- <field>
- <fielddescr>Redirect mode</fielddescr>
- <fieldname>redirect_mode</fieldname>
- <description>
- Select redirect mode here.
- &lt;br&gt; Note: if you use 'transparent proxy', then 'int' redirect mode will not accessible.
-<!-- &lt;br&gt;&lt;b&gt; int size limit :&lt;/b&gt; if content size 0 or > 'size limit', then client moved to 'blank image' page; -->
- &lt;br&gt; Options:
- &lt;A title="To 'url' will added special client information;" &gt;
- &lt;span style="background-color: #dddddd;" &gt;ext url err page&lt;/span&gt;&lt;/A&gt; ,
- &lt;A title="Client view 'url' content without any notification about;" &gt;
- &lt;span style="background-color: #dddddd;" &gt; ext url redirect&lt;/span&gt;&lt;/A&gt; ,
- &lt;A title="Client will moved to specified url with displaying url in addres bar;" &gt;
- &lt;span style="background-color: #dddddd;" &gt; ext url as 'move'&lt;/span&gt;&lt;/A&gt; ,
- &lt;A title="Client will moved to specified url with showing progress(only!) in status bar;" &gt;
- &lt;span style="background-color: #dddddd;" &gt; ext url as 'found'.&lt;/span&gt;&lt;/A&gt;
- &lt;/u&gt;
- </description>
- <type>select</type>
- <value>rmod_none</value>
- <options>
- <!--option><name>none</name> <value>rmod_none</value></option-->
- <option><name>int error page (enter error message)</name> <value>rmod_int</value></option>
- <option><name>int blank page </name> <value>rmod_int_bpg</value></option>
- <!--option><name>int blank image</name> <value>rmod_int_bim</value></option-->
- <!--option><name>int size limit (enter size in bytes)</name> <value>rmod_int_szl</value></option-->
- <option><name>ext url err page (enter URL)</name> <value>rmod_ext_err</value></option>
- <option><name>ext url redirect (enter URL)</name> <value>rmod_ext_rdr</value></option>
- <option><name>ext url move (enter URL)</name> <value>rmod_ext_mov</value></option>
- <option><name>ext url found (enter URL)</name> <value>rmod_ext_fnd</value></option>
- </options>
- </field>
- <field>
- <fielddescr>Redirect info</fielddescr>
- <fieldname>redirect</fieldname>
- <description>
- Enter external redirection URL, error message or size (bytes) here.
- </description>
- <type>textarea</type>
- <cols>65</cols>
- <rows>2</rows>
- </field>
- <field>
- <fielddescr>Use SafeSearch engine</fielddescr>
- <fieldname>safesearch</fieldname>
- <description>
- To protect your children from adult content, you can use the protected mode of search engines.
- Now it is supported by Google, Yandex, Yahoo, MSN, Live Search, Bing. Make sure that the search engines can, and others, it is recommended to prohibit.
- &lt;br&gt;Note: ! This option overrides 'Rewrite' setting. !
- </description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Rewrite</fielddescr>
- <fieldname>rewrite</fieldname>
- <description>Enter rewrite condition name for this rule, or leave blank.</description>
- <type>select</type>
- </field>
- <field>
- <fielddescr>Log</fielddescr>
- <fieldname>enablelog</fieldname>
- <description>Check this for log this item.</description>
- <type>checkbox</type>
- </field>
+ <field>
+ <fielddescr>Target Rules</fielddescr>
+ <fieldname>dest</fieldname>
+ <description><![CDATA[]]></description>
+ <type>input</type>
+ <size>100</size>
+ </field>
+ <field>
+ <fielddescr>Do not allow IP-Addresses in URL</fielddescr>
+ <fieldname>notallowingip</fieldname>
+ <description><![CDATA[To make sure that people do not bypass the URL filter by simply using the IP-Addresses instead of the FQDN you can check this option. This option has no effect on the whitelist.]]></description>
+ <type>checkbox</type>
+ </field>
+ <field>
+ <fielddescr>Proxy Denied Error</fielddescr>
+ <fieldname>deniedmessage</fieldname>
+ <description><![CDATA[The first part of the error message displayed to clients when access was denied. Defaults to <b>"Request denied by $g['product_name'] proxy"</b>]]></description>
+ <type>textarea</type>
+ <cols>65</cols>
+ <rows>2</rows>
+ </field>
+ <field>
+ <fielddescr>Redirect mode</fielddescr>
+ <fieldname>redirect_mode</fieldname>
+ <description>
+ Select redirect mode here.
+ &lt;br&gt; Note: if you use 'transparent proxy', then 'int' redirect mode will not accessible.
+<!-- &lt;br&gt;&lt;b&gt; int size limit :&lt;/b&gt; if content size 0 or > 'size limit', then client moved to 'blank image' page; -->
+ &lt;br&gt; Options:
+ &lt;A title="To 'url' will added special client information;" &gt;
+ &lt;span style="background-color: #dddddd;" &gt;ext url err page&lt;/span&gt;&lt;/A&gt; ,
+ &lt;A title="Client view 'url' content without any notification about;" &gt;
+ &lt;span style="background-color: #dddddd;" &gt; ext url redirect&lt;/span&gt;&lt;/A&gt; ,
+ &lt;A title="Client will moved to specified url with displaying url in addres bar;" &gt;
+ &lt;span style="background-color: #dddddd;" &gt; ext url as 'move'&lt;/span&gt;&lt;/A&gt; ,
+ &lt;A title="Client will moved to specified url with showing progress(only!) in status bar;" &gt;
+ &lt;span style="background-color: #dddddd;" &gt; ext url as 'found'.&lt;/span&gt;&lt;/A&gt;
+ &lt;/u&gt;
+ </description>
+ <type>select</type>
+ <value>rmod_none</value>
+ <options>
+ <!--option><name>none</name> <value>rmod_none</value></option-->
+ <option><name>int error page (enter error message)</name> <value>rmod_int</value></option>
+ <option><name>int blank page </name> <value>rmod_int_bpg</value></option>
+ <!--option><name>int blank image</name> <value>rmod_int_bim</value></option-->
+ <!--option><name>int size limit (enter size in bytes)</name> <value>rmod_int_szl</value></option-->
+ <option><name>ext url err page (enter URL)</name> <value>rmod_ext_err</value></option>
+ <option><name>ext url redirect (enter URL)</name> <value>rmod_ext_rdr</value></option>
+ <option><name>ext url move (enter URL)</name> <value>rmod_ext_mov</value></option>
+ <option><name>ext url found (enter URL)</name> <value>rmod_ext_fnd</value></option>
+ </options>
+ </field>
+ <field>
+ <fielddescr>Redirect info</fielddescr>
+ <fieldname>redirect</fieldname>
+ <description><![CDATA[Enter external redirection URL, error message or size (bytes) here.]]></description>
+ <type>textarea</type>
+ <cols>65</cols>
+ <rows>2</rows>
+ </field>
+ <field>
+ <fielddescr>Use SafeSearch engine</fielddescr>
+ <fieldname>safesearch</fieldname>
+ <description><![CDATA[
+ To protect your children from adult content you can use the protected mode of search engines.<br>
+ 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.<br>
+ <b>Note:</b> This option overrides 'Rewrite' setting.
+ ]]></description>
+ <type>checkbox</type>
+ </field>
+ <field>
+ <fielddescr>Rewrite</fielddescr>
+ <fieldname>rewrite</fieldname>
+ <description><![CDATA[Enter the rewrite condition name for this rule or leave it blank.]]></description>
+ <type>select</type>
+ </field>
+ <field>
+ <fielddescr>Log</fielddescr>
+ <fieldname>enablelog</fieldname>
+ <description><![CDATA[Check this option to enable logging for this ACL.]]></description>
+ <type>checkbox</type>
+ </field>
</fields>
<custom_php_validation_command>
- squidguard_validate_acl(&amp;$_POST, &amp;$input_errors);
+ squidguard_validate_acl(&amp;$_POST, &amp;$input_errors);
</custom_php_validation_command>
<custom_php_command_before_form>
- squidguard_before_form_acl(&amp;$pkg, false);
+ squidguard_before_form_acl(&amp;$pkg, false);
</custom_php_command_before_form>
<custom_php_after_form_command>
- squidGuard_print_javascript();
+ squidGuard_print_javascript();
</custom_php_after_form_command>
<custom_add_php_command/>
<custom_php_resync_config_command>
-// squidguard_resync();
+// squidguard_resync();
</custom_php_resync_config_command>
-</packagegui> \ No newline at end of file
+</packagegui>
diff --git a/config/squidGuard/squidguard_dest.xml b/config/squidGuard/squidguard_dest.xml
index 9c425816..9f785d95 100644
--- a/config/squidGuard/squidguard_dest.xml
+++ b/config/squidGuard/squidguard_dest.xml
@@ -2,7 +2,7 @@
<!DOCTYPE packagegui SYSTEM "../schema/packages.dtd">
<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?>
<packagegui>
- <description>Describe your package here</description>
+ <description><![CDATA[Describe your package here]]></description>
<requirements>Describe your package requirements here</requirements>
<faq>Currently there are no FAQ items provided.</faq>
<name>squidguarddest</name>
@@ -45,132 +45,130 @@
<text>Log</text>
<url>/squidGuard/squidguard_log.php</url>
</tab>
+ <tab>
+ <text>XMLRPC Sync</text>
+ <url>/pkg_edit.php?xml=squidguard_sync.xml</url>
+ </tab>
</tabs>
<adddeleteeditpagefields>
- <columnitem>
- <fielddescr>Name</fielddescr>
- <fieldname>name</fieldname>
- </columnitem>
- <columnitem>
- <fielddescr>Redirect</fielddescr>
- <fieldname>redirect</fieldname>
- </columnitem>
- <columnitem>
- <fielddescr>Description</fielddescr>
- <fieldname>description</fieldname>
- </columnitem>
+ <columnitem>
+ <fielddescr>Name</fielddescr>
+ <fieldname>name</fieldname>
+ </columnitem>
+ <columnitem>
+ <fielddescr>Redirect</fielddescr>
+ <fieldname>redirect</fieldname>
+ </columnitem>
+ <columnitem>
+ <fielddescr>Description</fielddescr>
+ <fieldname>description</fieldname>
+ </columnitem>
</adddeleteeditpagefields>
<fields>
- <field>
- <fielddescr>Name</fielddescr>
- <fieldname>name</fieldname>
- <description>
- Enter the unique name here.
- Name must consist of minimum 2 symbols, first from which letter. &lt;br&gt;
- All other symbols must be [a-Z_0-9].
- </description>
- <type>input</type>
- <size>100</size>
- <required/>
- </field>
- <field>
- <fielddescr>Domains list</fielddescr>
- <fieldname>domains</fieldname>
- <description>
- Enter destination domains or IP-address here. For separate use ' '(space).
- &lt;p&gt; &lt;b&gt;Example:&lt;/b&gt; 'mail.ru e-mail.ru yahoo.com 192.168.1.1' .
- </description>
- <type>textarea</type>
- <cols>60</cols>
- <rows>10</rows>
- </field>
- <field>
- <fielddescr>URLs list</fielddescr>
- <fieldname>urls</fieldname>
- <description>
- Enter url's here.
- For separate urls's use ' '(space).
- &lt;p&gt; &lt;b&gt;Example:&lt;/b&gt; 'host.com/xxx 12.10.220.125/alisa' .
- </description>
- <type>textarea</type>
- <cols>60</cols>
- <rows>10</rows>
- </field>
- <field>
- <fielddescr>Expressions</fielddescr>
- <fieldname>expressions</fieldname>
- <description>
- Enter word fragments, what may be contains in destinations URL path.
- For separate expression words use '|'.
- &lt;p&gt; &lt;b&gt;Example:&lt;/b&gt; 'mail|casino|game' .
- </description>
- <type>textarea</type>
- <cols>60</cols>
- <rows>10</rows>
- </field>
- <field>
- <fielddescr>Redirect mode</fielddescr>
- <fieldname>redirect_mode</fieldname>
- <description>
- Select redirect mode here.
- &lt;br&gt; Note: if you use 'transparent proxy', then 'int' redirect mode will not accessible.
-<!-- &lt;br&gt;&lt;b&gt; int size limit :&lt;/b&gt; if content size 0 or > 'size limit', then client moved to 'blank image' page; -->
- &lt;br&gt; Options:
- &lt;A title="To 'url' will added special client information;" &gt;
- &lt;span style="background-color: #dddddd;" &gt;ext url err page&lt;/span&gt;&lt;/A&gt; ,
- &lt;A title="Client view 'url' content without any notification about;" &gt;
- &lt;span style="background-color: #dddddd;" &gt; ext url redirect&lt;/span&gt;&lt;/A&gt; ,
- &lt;A title="Client will moved to specified url with displaying url in addres bar;" &gt;
- &lt;span style="background-color: #dddddd;" &gt; ext url as 'move'&lt;/span&gt;&lt;/A&gt; ,
- &lt;A title="Client will moved to specified url with showing progress(only!) in status bar;" &gt;
- &lt;span style="background-color: #dddddd;" &gt; ext url as 'found'.&lt;/span&gt;&lt;/A&gt;
- &lt;/u&gt;
- </description>
- <type>select</type>
- <value>rmod_none</value>
- <options>
- <option><name>none</name> <value>rmod_none</value></option>
- <option><name>int error page (enter error message)</name> <value>rmod_int</value></option>
- <option><name>int blank page </name> <value>rmod_int_bpg</value></option>
- <option><name>int blank image</name> <value>rmod_int_bim</value></option>
-<!-- <option><name>int size limit (enter size in bytes)</name> <value>rmod_int_szl</value></option> -->
- <option><name>ext url err page (enter URL)</name> <value>rmod_ext_err</value></option>
- <option><name>ext url redirect (enter URL)</name> <value>rmod_ext_rdr</value></option>
- <option><name>ext url move (enter URL)</name> <value>rmod_ext_mov</value></option>
- <option><name>ext url found (enter URL)</name> <value>rmod_ext_fnd</value></option>
- </options>
- </field>
- <field>
- <fielddescr>Redirect</fielddescr>
- <fieldname>redirect</fieldname>
- <description>
- Enter external redirection URL, error message or size (bytes) here.
- </description>
- <type>textarea</type>
- <cols>60</cols>
- <rows>2</rows>
- </field>
- <field>
- <fielddescr>Log</fielddescr>
- <fieldname>enablelog</fieldname>
- <type>checkbox</type>
- <description>Check this for log this item.</description>
- </field>
- <field>
- <fielddescr>Description</fielddescr>
- <fieldname>description</fieldname>
- <description>You may enter a description here for your reference (not parsed).</description>
- <type>input</type>
- <size>90</size>
- </field>
- </fields>
+ <field>
+ <fielddescr>Name</fielddescr>
+ <fieldname>name</fieldname>
+ <description><![CDATA[
+ Enter a unique name of this rule here.<br>
+ The name must consist between 2 and 15 symbols [a-Z_0-9]. The first one must be a letter.<br>
+ ]]></description>
+ <type>input</type>
+ <size>100</size>
+ <required/>
+ </field>
+ <field>
+ <fielddescr>Domain List</fielddescr>
+ <fieldname>domains</fieldname>
+ <description><![CDATA[
+ Enter destination domains or IP-addresses here. To separate them use space.<br>
+ <b>Example:</b> mail.ru e-mail.ru yahoo.com 192.168.1.1
+ ]]></description>
+ <type>textarea</type>
+ <cols>60</cols>
+ <rows>10</rows>
+ </field>
+ <field>
+ <fielddescr>URL List</fielddescr>
+ <fieldname>urls</fieldname>
+ <description><![CDATA[
+ Enter destination URLs here. To separate them use space.<br>
+ <b>Example:</b> host.com/xxx 12.10.220.125/alisa
+ ]]></description>
+ <type>textarea</type>
+ <cols>60</cols>
+ <rows>10</rows>
+ </field>
+ <field>
+ <fielddescr>Regular Expression</fielddescr>
+ <fieldname>expressions</fieldname>
+ <description><![CDATA[
+ Enter word fragments of the destination URL. To separate them use <b>|</b> .
+ <b>Example:</b> mail|casino|game|\.rsdf$
+ ]]></description>
+ <type>textarea</type>
+ <cols>60</cols>
+ <rows>10</rows>
+ </field>
+ <field>
+ <fielddescr>Redirect mode</fielddescr>
+ <fieldname>redirect_mode</fieldname>
+ <description>
+ Select redirect mode here.
+ &lt;br&gt; Note: if you use 'transparent proxy', then 'int' redirect mode will not accessible.
+<!-- &lt;br&gt;&lt;b&gt; int size limit :&lt;/b&gt; if content size 0 or > 'size limit', then client moved to 'blank image' page; -->
+ &lt;br&gt; Options:
+ &lt;A title="To 'url' will added special client information;" &gt;
+ &lt;span style="background-color: #dddddd;" &gt;ext url err page&lt;/span&gt;&lt;/A&gt; ,
+ &lt;A title="Client view 'url' content without any notification about;" &gt;
+ &lt;span style="background-color: #dddddd;" &gt; ext url redirect&lt;/span&gt;&lt;/A&gt; ,
+ &lt;A title="Client will moved to specified url with displaying url in addres bar;" &gt;
+ &lt;span style="background-color: #dddddd;" &gt; ext url as 'move'&lt;/span&gt;&lt;/A&gt; ,
+ &lt;A title="Client will moved to specified url with showing progress(only!) in status bar;" &gt;
+ &lt;span style="background-color: #dddddd;" &gt; ext url as 'found'.&lt;/span&gt;&lt;/A&gt;
+ &lt;/u&gt;
+ </description>
+ <type>select</type>
+ <value>rmod_none</value>
+ <options>
+ <option><name>none</name> <value>rmod_none</value></option>
+ <option><name>int error page (enter error message)</name> <value>rmod_int</value></option>
+ <option><name>int blank page </name> <value>rmod_int_bpg</value></option>
+ <option><name>int blank image</name> <value>rmod_int_bim</value></option>
+<!-- <option><name>int size limit (enter size in bytes)</name> <value>rmod_int_szl</value></option> -->
+ <option><name>ext url err page (enter URL)</name> <value>rmod_ext_err</value></option>
+ <option><name>ext url redirect (enter URL)</name> <value>rmod_ext_rdr</value></option>
+ <option><name>ext url move (enter URL)</name> <value>rmod_ext_mov</value></option>
+ <option><name>ext url found (enter URL)</name> <value>rmod_ext_fnd</value></option>
+ </options>
+ </field>
+ <field>
+ <fielddescr>Redirect</fielddescr>
+ <description><![CDATA[Enter the external redirection URL, error message or size (bytes) here.]]></description>
+ <type>textarea</type>
+ <cols>60</cols>
+ <rows>2</rows>
+ </field>
+ <field>
+ <fielddescr>Description</fielddescr>
+ <fieldname>description</fieldname>
+ <description><![CDATA[You may enter any description here for your reference.]]></description>
+ <type>input</type>
+ <size>90</size>
+ </field>
+ <field>
+ <fielddescr>Log</fielddescr>
+ <fieldname>enablelog</fieldname>
+ <type>checkbox</type>
+ <description><![CDATA[Check this option to enable logging for this ACL.]]></description>
+ </field>
+ </fields>
<custom_delete_php_command/>
<custom_php_validation_command>
- squidguard_validate_destination($_POST, &amp;$input_errors);
+ squidguard_validate_destination($_POST, &amp;$input_errors);
</custom_php_validation_command>
<custom_php_resync_config_command>
</custom_php_resync_config_command>
<custom_php_after_form_command>
- squidGuard_print_javascript();
+ squidGuard_print_javascript();
</custom_php_after_form_command>
-</packagegui> \ No newline at end of file
+</packagegui>
diff --git a/config/squidGuard/squidguard_log.php b/config/squidGuard/squidguard_log.php
index e5f19407..8eba2311 100644
--- a/config/squidGuard/squidguard_log.php
+++ b/config/squidGuard/squidguard_log.php
@@ -275,6 +275,7 @@ window.setTimeout('getactivity()', 150);
$tab_array[] = array(gettext("Rewrites"), false, "/pkg.php?xml=squidguard_rewr.xml");
$tab_array[] = array(gettext("Blacklist"), false, "/squidGuard/squidguard_blacklist.php");
$tab_array[] = array(gettext("Log"), true, "$selfpath");
+ $tab_array[] = array(gettext("XMLRPC Sync"), false, "/pkg_edit.php?xml=squidguard_sync.xml&amp;id=0");
display_top_tabs($tab_array);
?>
</td>
@@ -323,4 +324,4 @@ window.setTimeout('getactivity()', 150);
Rounded("div#mainarea","bl br","#FFF","#eeeeee","smooth");
</script-->
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/config/squidGuard/squidguard_rewr.xml b/config/squidGuard/squidguard_rewr.xml
index 8a3f801f..c21cb1c0 100644
--- a/config/squidGuard/squidguard_rewr.xml
+++ b/config/squidGuard/squidguard_rewr.xml
@@ -2,7 +2,7 @@
<!DOCTYPE packagegui SYSTEM "../schema/packages.dtd">
<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?>
<packagegui>
- <description>Describe your package here</description>
+ <description><![CDATA[Describe your package here]]></description>
<requirements>Describe your package requirements here</requirements>
<faq>Currently there are no FAQ items provided.</faq>
<name>squidguardrewrite</name>
@@ -43,6 +43,10 @@
<text>Log</text>
<url>/squidGuard/squidguard_log.php</url>
</tab>
+ <tab>
+ <text>XMLRPC Sync</text>
+ <url>/pkg_edit.php?xml=squidguard_sync.xml</url>
+ </tab>
</tabs>
<adddeleteeditpagefields>
<columnitem>
@@ -58,11 +62,10 @@
<field>
<fielddescr>Name</fielddescr>
<fieldname>name</fieldname>
- <description>
- Enter the unique name here.
- Name must consist of minimum 2 symbols, first from which letter. &lt;br&gt;
- All other symbols must be [a-Z_0-9].
- </description>
+ <description><![CDATA[
+ Enter a unique name of this rule here.<br>
+ The name must consist between 2 and 15 symbols [a-Z_0-9]. The first one must be a letter.<br>
+ ]]></description>
<type>input</type>
<required/>
<size>100</size>
@@ -89,13 +92,13 @@
<fielddescr>Opt.</fielddescr>
<fieldname>mode</fieldname>
<type>select</type>
- <value>no</value>
- <options>
- <option> <name>---------</name> <value>no</value> </option>
- <option> <name>no case </name> <value>nocase</value> </option>
- <option> <name>redirect </name> <value>redirect</value> </option>
- <option> <name>no case + redirect</name> <value>nocase_redirect</value> </option>
- </options>
+ <value>no</value>
+ <options>
+ <option> <name>---------</name> <value>no</value> </option>
+ <option> <name>no case </name> <value>nocase</value> </option>
+ <option> <name>redirect </name> <value>redirect</value> </option>
+ <option> <name>no case + redirect</name> <value>nocase_redirect</value> </option>
+ </options>
</rowhelperfield>
<!-- <rowhelperfield>
<fielddescr>Http 301</fielddescr>
@@ -113,18 +116,18 @@
<field>
<fielddescr>Log</fielddescr>
<fieldname>enablelog</fieldname>
- <description>Check this for log this item.</description>
+ <description><![CDATA[Check this option to enable logging for this ACL.]]></description>
<type>checkbox</type>
</field>
<field>
<fielddescr>Description</fielddescr>
<fieldname>description</fieldname>
- <description>You may enter a description here for your reference (not parsed).&lt;br&gt;
- &lt;b&gt; Note: &lt;/b&gt; &lt;br&gt;
- &lt;b&gt;Rewrite rule&lt;/b&gt; - define how url will are replaced.&lt;br&gt;
- &lt;b&gt;Target URL or regular expression&lt;/b&gt; - contains destination url or regular expression. Regular expression example: */cc32e46.exe &lt;br&gt;
- &lt;b&gt;Replace to&lt;/b&gt; - contains replacing url.
- </description>
+ <description><![CDATA[You may enter any description here for your reference.<br>
+ <b>Note:</b><br>
+ <b>Rewrite rule:</b> Define how the URL will be replaced.<br>
+ <b>Target URL or Regular Expression:</b> Contains destination URL or regular expression. This is the URL or RegEx the user wants to visit.<br>
+ <b>Replace to URL:</b> Contains the replacing URL. This is the URL the user will see instead the original one.
+ ]]></description>
<type>input</type>
<size>100</size>
</field>
@@ -138,4 +141,4 @@
<custom_php_resync_config_command>
// squidguard_resync_rewrite();
</custom_php_resync_config_command>
-</packagegui> \ No newline at end of file
+</packagegui>
diff --git a/config/squidGuard/squidguard_sync.xml b/config/squidGuard/squidguard_sync.xml
new file mode 100644
index 00000000..cf21c1bf
--- /dev/null
+++ b/config/squidGuard/squidguard_sync.xml
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE packagegui SYSTEM "./schema/packages.dtd">
+<?xml-stylesheet type="text/xsl" href="./xsl/package.xsl"?>
+<packagegui>
+ <copyright>
+<![CDATA[
+/* $Id$ */
+/* ========================================================================== */
+/*
+squidguardsync.xml
+part of pfSense (http://www.pfSense.com)
+Copyright (C) 2013 Alexander Wilke <nachtfalkeaw@web.de>
+based on pfblocker_sync.xml
+All rights reserved.
+
+Based on m0n0wall (http://m0n0.ch/wall)
+Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
+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.
+*/
+/* ========================================================================== */
+]]></copyright>
+ <description><![CDATA[Describe your package here]]></description>
+ <requirements>Describe your package requirements here</requirements>
+ <faq>Currently there are no FAQ items provided.</faq>
+ <name>squidguardsync</name>
+ <version>1.3_1 pkg v.1.9</version>
+ <title>Proxy filter SquidGuard: XMLRPC Sync</title>
+ <include_file>/usr/local/pkg/squidguard.inc</include_file>
+ <tabs>
+ <tab>
+ <text>General settings</text>
+ <url>/pkg_edit.php?xml=squidguard.xml&amp;id=0</url>
+ </tab>
+ <tab>
+ <text>Common ACL</text>
+ <url>/pkg_edit.php?xml=squidguard_default.xml&amp;id=0</url>
+ </tab>
+ <tab>
+ <text>Groups ACL</text>
+ <url>/pkg.php?xml=squidguard_acl.xml</url>
+ </tab>
+ <tab>
+ <text>Target categories</text>
+ <url>/pkg.php?xml=squidguard_dest.xml</url>
+ </tab>
+ <tab>
+ <text>Times</text>
+ <url>/pkg.php?xml=squidguard_time.xml</url>
+ </tab>
+ <tab>
+ <text>Rewrites</text>
+ <url>/pkg.php?xml=squidguard_rewr.xml</url>
+ </tab>
+ <tab>
+ <text>Blacklist</text>
+ <url>/squidGuard/squidguard_blacklist.php</url>
+ </tab>
+ <tab>
+ <text>Log</text>
+ <url>/squidGuard/squidguard_log.php</url>
+ </tab>
+ <tab>
+ <text>XMLRPC Sync</text>
+ <url>/pkg_edit.php?xml=squidguard_sync.xml&amp;id=0</url>
+ <active/>
+ </tab>
+ </tabs>
+ <fields>
+ <field>
+ <name>SquidGuard XMLRPC Sync</name>
+ <type>listtopic</type>
+ </field>
+ <field>
+ <fielddescr>Automatically sync SquidGuard configuration changes?</fielddescr>
+ <fieldname>varsyncenablexmlrpc</fieldname>
+ <description><![CDATA[All changes will be synced immediately to the IPs listed below if this option is checked.<br>
+ <b>Important:</b> Only sync from host A to B, A to C but <b>do not</B> enable XMLRPC sync <b>to</b> A. This will result in a loop!]]></description>
+ <type>checkbox</type>
+ </field>
+ <field>
+ <fielddescr>XMLRPC timeout</fielddescr>
+ <fieldname>varsynctimeout</fieldname>
+ <description><![CDATA[Timeout in seconds for the XMLRPC timeout. Default: 150]]></description>
+ <type>input</type>
+ <default_value>150</default_value>
+ <size>5</size>
+ </field>
+
+ <field>
+ <fielddescr>Destination Server</fielddescr>
+ <fieldname>none</fieldname>
+ <type>rowhelper</type>
+ <rowhelper>
+ <rowhelperfield>
+ <fielddescr>Enable</fielddescr>
+ <fieldname>varsyncdestinenable</fieldname>
+ <type>checkbox</type>
+ </rowhelperfield>
+ <rowhelperfield>
+ <fielddescr>GUI Protocol</fielddescr>
+ <fieldname>varsyncprotocol</fieldname>
+ <description><![CDATA[Choose the protocol of the destination host. Probably <b>http</b> or <b>https</b>]]></description>
+ <type>select</type>
+ <default_value>HTTP</default_value>
+ <options>
+ <option><name>HTTP</name><value>http</value></option>
+ <option><name>HTTPS</name><value>https</value></option>
+ </options>
+ </rowhelperfield>
+ <rowhelperfield>
+ <fielddescr>GUI IP-Address</fielddescr>
+ <fieldname>varsyncipaddress</fieldname>
+ <description><![CDATA[IP Address of the destination host.]]></description>
+ <type>input</type>
+ <size>15</size>
+ </rowhelperfield>
+ <rowhelperfield>
+ <fielddescr>GUI Port</fielddescr>
+ <fieldname>varsyncport</fieldname>
+ <description><![CDATA[Choose the port of the destination host.]]></description>
+ <type>input</type>
+ <size>3</size>
+ </rowhelperfield>
+ <rowhelperfield>
+ <fielddescr>GUI Admin Password</fielddescr>
+ <fieldname>varsyncpassword</fieldname>
+ <description><![CDATA[Password of the user "admin" on the destination host.]]></description>
+ <type>password</type>
+ <size>20</size>
+ </rowhelperfield>
+ </rowhelper>
+ </field>
+ </fields>
+ <custom_delete_php_command>
+ squidguard_sync_on_changes();
+ </custom_delete_php_command>
+ <custom_php_resync_config_command>
+ squidguard_sync_on_changes();
+ </custom_php_resync_config_command>
+</packagegui>
diff --git a/config/squidGuard/squidguard_time.xml b/config/squidGuard/squidguard_time.xml
index c27de273..dfd589aa 100644
--- a/config/squidGuard/squidguard_time.xml
+++ b/config/squidGuard/squidguard_time.xml
@@ -2,7 +2,7 @@
<!DOCTYPE packagegui SYSTEM "../schema/packages.dtd">
<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?>
<packagegui>
- <description>Describe your package here</description>
+ <description><![CDATA[Describe your package here]]></description>
<requirements>Describe your package requirements here</requirements>
<faq>Currently there are no FAQ items provided.</faq>
<name>squidguardtime</name>
@@ -45,6 +45,10 @@
<text>Log</text>
<url>/squidGuard/squidguard_log.php</url>
</tab>
+ <tab>
+ <text>XMLRPC Sync</text>
+ <url>/pkg_edit.php?xml=squidguard_sync.xml</url>
+ </tab>
</tabs>
<adddeleteeditpagefields>
<columnitem>
@@ -60,11 +64,10 @@
<field>
<fielddescr>Name</fielddescr>
<fieldname>name</fieldname>
- <description>
- Enter the unique name here.
- Name must consist of minimum 2 symbols, first from which letter. &lt;br&gt;
- All other symbols must be [a-Z_0-9].
- </description>
+ <description><![CDATA[
+ Enter a unique name of this rule here.<br>
+ The name must consist between 2 and 15 symbols [a-Z_0-9]. The first one must be a letter.<br>
+ ]]></description>
<type>input</type>
<required/>
<size>100</size>
@@ -76,7 +79,7 @@
<rowhelperfield>
<fielddescr>Time type</fielddescr>
<fieldname>timetype</fieldname>
- <description></description>
+ <description><![CDATA[]]></description>
<type>select</type>
<value>weekly</value>
<options>
@@ -87,7 +90,7 @@
<rowhelperfield>
<fielddescr>Days</fielddescr>
<fieldname>timedays</fieldname>
- <description></description>
+ <description><![CDATA[]]></description>
<type>select</type>
<value>*</value>
<options>
@@ -110,7 +113,7 @@
<rowhelperfield>
<fielddescr>Time range</fielddescr>
<fieldname>sg_timerange</fieldname>
- <description>00:00-08:00</description>
+ <description><![CDATA[00:00-08:00]]></description>
<type>input</type>
<size>20</size>
<value>00:00-23:59</value>
@@ -120,12 +123,11 @@
<field>
<fielddescr>Description</fielddescr>
<fieldname>description</fieldname>
- <description>You may enter a description here for your reference (not parsed). &lt;br&gt;
- &lt;b&gt; Note: &lt;/b&gt; &lt;br&gt;
- Field &lt;b&gt;'Date or date range'&lt;/b&gt; have format 'yyyy.mm.dd'; 'yyyy.mm.dd-yyyy.mm.dd'; or use '*' in format. &lt;br&gt;
- Example: '2007.05.01'; '2007.04.14-2007.04.17'; '*.12.24'; '2007.*.01'; &lt;br&gt;
- Field &lt;b&gt;'Time range'&lt;/b&gt; have format 'hh:mm-hh:mm'. Example: '08:00-18:00';
- </description>
+ <description><![CDATA[You may enter any description here for your reference.<br>
+ <b>Note:</b><br>
+ <b>Example for Date or Date Range:</b> 2007.12.31 <b>or</b> 2007.11.31-2007.12.31 <b>or</b> *.12.31 <b>or</b> 2007.*.31<br>
+ <b>Example for Time Range:</b> 08:00-18:00
+ ]]></description>
<type>input</type>
<size>80</size>
</field>
@@ -139,4 +141,4 @@
<custom_php_resync_config_command>
// squidguard_resync_time();
</custom_php_resync_config_command>
-</packagegui> \ No newline at end of file
+</packagegui>