-
Notifications
You must be signed in to change notification settings - Fork 1
/
firewall.php.example
33 lines (28 loc) · 1.34 KB
/
firewall.php.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
defined("WORKING_ROOT_DIR") or define("WORKING_ROOT_DIR", __DIR__);
defined("PROJECT_ROOT_DIR") or define("PROJECT_ROOT_DIR", WORKING_ROOT_DIR);
defined("APPLICATION_ROOT_DIR") or define("APPLICATION_ROOT_DIR", PROJECT_ROOT_DIR.'/applications/firewall');
defined("ROOT_DIR") or define("ROOT_DIR", WORKING_ROOT_DIR);
defined("APP_DIR") or define("APP_DIR", APPLICATION_ROOT_DIR);
if(!isset($configurations))
{
$configurations = array(
__DIR__ . '/configurations/ipam.json',
__DIR__ . '/configurations/ipam.user.json',
__DIR__ . '/configurations/firewall.json',
__DIR__ . '/configurations/firewall.user.json',
);
}
require_once(APPLICATION_ROOT_DIR . '/launchers/firewall.php');
$Launcher = new \App\Firewall\Launcher_Firewall();
/**
* Change [IPAM_SERVER_KEY] with the key of your PHPIPAM server in configuration file
* You can add many PHPIPAM server, it is compatible multiple PHPIPAM
* If you have not PHPIPAM service, remove argument or keep it empty
*
* Example with PHPIPAM disabled: $MAIN = new Service_Firewall($configurations, array());
* Example with PHPIPAM enabled: $MAIN = new Service_Firewall($configurations, array('myIpamKey_1', 'myIpamKey_2'));
*/
$SHELL = new \App\Firewall\Shell_Firewall($configurations, array('[IPAM_SERVER_KEY]'));
echo PHP_EOL;
exit();