aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/imspector-wip/imspector.inc37
-rw-r--r--config/imspector-wip/imspector.xml57
2 files changed, 86 insertions, 8 deletions
diff --git a/config/imspector-wip/imspector.inc b/config/imspector-wip/imspector.inc
index b760bc3b..4ab72510 100644
--- a/config/imspector-wip/imspector.inc
+++ b/config/imspector-wip/imspector.inc
@@ -2,7 +2,7 @@
/*
imspector.inc
part of pfSense (http://www.pfsense.com/)
-
+ Copyright (C) 2011 Scott Ullrich <sullrich@gmail.com>.
Copyright (C) 2007 Ryan Wagoner <rswagoner@gmail.com>.
All rights reserved.
@@ -72,6 +72,12 @@
function imspector_proto_to_port ($proto)
{
switch ($proto) {
+ case 'gadu-gadu':
+ return 8074;
+ case 'jabber':
+ return 5222;
+ case 'jabber-ssl':
+ return 5223;
case 'msn':
return 1863;
case 'icq':
@@ -219,6 +225,32 @@
write_imspector_config(IMSPECTOR_ETC . '/acl_blacklist.txt',
str_replace("\r", '', base64_decode($imspector_config["acl_blacklist"])));
}
+
+ // Handle Jabber SSL options
+ if($imspector_config["ssl_ca_key"] &&
+ $imspector_config["ssl_ca_cert"] &&
+ $imspector_config["serverkey"]) {
+ if(!is_dir("/usr/local/etc/imspector/ssl"))
+ mkdir("/usr/local/etc/imspector/ssl");
+ if(base64_decode($imspector_config["ssl_ca_key"])) {
+ file_put_contents("/usr/local/etc/imspector/ssl/ssl_ca_key.pem",
+ base64_decode($imspector_config["ssl_ca_key"]));
+ $conf['ssl_ca_key'] = '/usr/local/etc/imspector/ssl/ssl_ca_key.pem';
+ }
+ if(base64_decode($imspector_config["ssl_ca_cert"])) {
+ file_put_contents("/usr/local/etc/imspector/ssl/ssl_ca_cert.pem",
+ base64_decode($imspector_config["ssl_ca_cert"]));
+ $conf['ssl_ca_key'] = "/usr/local/etc/imspector/ssl/ssl_ca_cert.pem";
+ }
+ if(base64_decode($imspector_config["serverkey"])) {
+ file_put_contents("/usr/local/etc/imspector/ssl/serverkey.pem",
+ base64_decode($imspector_config["serverkey"]));
+ $conf['ssl_key'] = '/usr/local/etc/imspector/ssl/serverkey.pem';
+ }
+ } else {
+ // SSL Not enabled. Make sure Jabber-SSL is not processed.
+ unset($conf['jabber-ssl']);
+ }
$conftext = '';
foreach($conf as $var => $key)
@@ -283,4 +315,5 @@ EOD;
config_unlock();
}
-?>
+
+?> \ No newline at end of file
diff --git a/config/imspector-wip/imspector.xml b/config/imspector-wip/imspector.xml
index b8eb535d..aadcd4c0 100644
--- a/config/imspector-wip/imspector.xml
+++ b/config/imspector-wip/imspector.xml
@@ -4,12 +4,12 @@
<packagegui>
<copyright>
<![CDATA[
-/* $Id$ */
/* ========================================================================== */
/*
- authng.xml
+ imspector.xml
part of pfSense (http://www.pfSense.com)
- Copyright (C) 2007 Ryan Wagoner <rswagoner@gmail.com>.
+ Copyright (C) 2011 Scott Ullrich <sullrich@gmail.com>
+ Copyright (C) 2007 Ryan Wagoner <rswagoner@gmail.com>
All rights reserved.
*/
/* ========================================================================== */
@@ -84,7 +84,7 @@
<fielddescr>Enable IMSpector</fielddescr>
<fieldname>enable</fieldname>
<type>checkbox</type>
- </field>
+ </field>
<field>
<fielddescr>Interfaces (generally LAN)</fielddescr>
<fieldname>iface_array</fieldname>
@@ -98,7 +98,7 @@
<field>
<fielddescr>Listen on protocols</fielddescr>
<fieldname>proto_array</fieldname>
- <description>You can use the CTRL or COMMAND key to select multiple protocols.</description>
+ <description>You can use the CTRL or COMMAND key to select multiple protocols. NOTE: Gtalk/Jabber-SSL requires SSL certificates.</description>
<type>select</type>
<size>4</size>
<required/>
@@ -120,6 +120,18 @@
<name>IRC</name>
<value>irc</value>
</option>
+ <option>
+ <name>Jabber</name>
+ <value>jabber</value>
+ </option>
+ <option>
+ <name>Gtalk/Jabber-SSL</name>
+ <value>jabber-ssl</value>
+ </option>
+ <option>
+ <name>Gadu-Gadu</name>
+ <value>gadu-gadu</value>
+ </option>
</options>
</field>
<field>
@@ -155,6 +167,39 @@
<type>password</type>
</field>
<field>
+ <fielddescr>SSL Certificate</fielddescr>
+ <fieldname>serverkey</fieldname>
+ <description>
+ Enter the SSL Server Certificate here.
+ </description>
+ <type>textarea</type>
+ <encoding>base64</encoding>
+ <rows>5</rows>
+ <cols>40</cols>
+ </field>
+ <field>
+ <fielddescr>SSL CA Key</fielddescr>
+ <fieldname>ssl_ca_key</fieldname>
+ <description>
+ Enter the SSL CA key here.
+ </description>
+ <type>textarea</type>
+ <encoding>base64</encoding>
+ <rows>5</rows>
+ <cols>40</cols>
+ </field>
+ <field>
+ <fielddescr>SSL CA Certificate</fielddescr>
+ <fieldname>ssl_ca_cert</fieldname>
+ <description>
+ Enter the SSL CA Certficate here.
+ </description>
+ <type>textarea</type>
+ <encoding>base64</encoding>
+ <rows>5</rows>
+ <cols>40</cols>
+ </field>
+ <field>
<fielddescr>Enable bad word filtering</fielddescr>
<fieldname>filter_badwords</fieldname>
<description>Replace characters of matched bad word with *.</description>
@@ -219,4 +264,4 @@
deinstall_package_imspector();
</custom_php_deinstall_command>
<filter_rules_needed>imspector_generate_rules</filter_rules_needed>
-</packagegui>
+</packagegui> \ No newline at end of file