adding upnp hook for classes that requires an open port

This commit is contained in:
Benjamin Sonntag 2012-09-03 07:36:00 +00:00
parent 7cffd971f4
commit 6baa9591ae
6 changed files with 63 additions and 5 deletions

View File

@ -1116,5 +1116,20 @@ EOF;
}
/* ----------------------------------------------------------------- */
/** hook function called by AlternC-upnp to know which open
* tcp or udp ports this class requires or suggests
* @return array a key => value list of port protocol name mandatory values
* @access private
*/
function hook_upnp_list() {
return array(
"http" => array("port" => 80, "protocol" => "tcp", "mandatory" => 1),
"https" => array("port" => 443, "protocol" => "tcp", "mandatory" => 0),
"ssh" => array("port" => 22, "protocol" => "tcp", "mandatory" => 0),
);
}
} /* Classe ADMIN */

View File

@ -1425,4 +1425,18 @@ printvar("je viens de tenter de mkdir ++$dirr++"); // FIXME Bullshit. Safemode
}
/* ----------------------------------------------------------------- */
/** hook function called by AlternC-upnp to know which open
* tcp or udp ports this class requires or suggests
* @return array a key => value list of port protocol name mandatory values
* @access private
*/
function hook_upnp_list() {
return array(
"dns-tcp" => array("port" => 53, "protocol" => "tcp", "mandatory" => 1),
"dns-udp" => array("port" => 53, "protocol" => "udp", "mandatory" => 1),
);
}
} /* Class m_domains */

View File

@ -27,4 +27,4 @@ Class m_export {
}
}// export Class end
?>

View File

@ -388,6 +388,17 @@ class m_ftp {
}
/* ----------------------------------------------------------------- */
/** hook function called by AlternC-upnp to know which open
* tcp or udp ports this class requires or suggests
* @return array a key => value list of port protocol name mandatory values
* @access private
*/
function hook_upnp_list() {
return array(
"ftp" => array("port" => 21, "protocol" => "tcp", "mandatory" => 1),
);
}
} /* Class m_ftp */
?>

View File

@ -388,5 +388,3 @@ class m_hta {
} /* CLASS m_hta */
?>

View File

@ -653,6 +653,26 @@ class m_mail {
}
/* ----------------------------------------------------------------- */
/** hook function called by AlternC-upnp to know which open
* tcp or udp ports this class requires or suggests
* @return array a key => value list of port protocol name mandatory values
* @access private
*/
function hook_upnp_list() {
return array(
"imap" => array("port" => 143, "protocol" => "tcp", "mandatory" => 1),
"imaps" => array("port" => 993, "protocol" => "tcp", "mandatory" => 1),
"pop" => array("port" => 110, "protocol" => "tcp", "mandatory" => 1),
"pops" => array("port" => 995, "protocol" => "tcp", "mandatory" => 1),
"smtp" => array("port" => 25, "protocol" => "tcp", "mandatory" => 1),
"sieve" => array("port" => 2000, "protocol" => "tcp", "mandatory" => 1),
"submission" => array("port" => 587, "protocol" => "tcp", "mandatory" => 0),
);
}
} /* Class m_mail */