diff --git a/README.md b/README.md index aa6d028b5..b2da6e946 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,7 @@ security/intrusion-detection-content-et-pro -- IDS Proofpoint ET Pro ruleset (ne security/intrusion-detection-content-pt-open -- IDS PT Research ruleset (only for non-commercial use) security/intrusion-detection-content-snort-vrt -- IDS Snort VRT ruleset (needs registration or subscription) security/openconnect -- OpenConnect Client +security/softether -- Cross-platform Multi-protocol VPN Program security/tinc -- Tinc VPN security/tor -- The Onion Router sysutils/api-backup -- Provide the functionality to download the config.xml diff --git a/security/softether/Makefile b/security/softether/Makefile new file mode 100644 index 000000000..81341b10a --- /dev/null +++ b/security/softether/Makefile @@ -0,0 +1,8 @@ +PLUGIN_NAME= softether +PLUGIN_VERSION= 0.1 +PLUGIN_COMMENT= Cross-platform Multi-protocol VPN Program +PLUGIN_DEPENDS= softether +PLUGIN_MAINTAINER= m.muenz@gmail.com +PLUGIN_DEVEL= yes + +.include "../../Mk/plugins.mk" diff --git a/security/softether/pkg-descr b/security/softether/pkg-descr new file mode 100644 index 000000000..e49e2da52 --- /dev/null +++ b/security/softether/pkg-descr @@ -0,0 +1,8 @@ +SoftEther VPN ("SoftEther" means "Software Ethernet") is one of +the world's most powerful and easy-to-use multi-protocol VPN +software. It runs on Windows, Linux, Mac, FreeBSD and Solaris. + +SoftEther VPN is open source. You can use SoftEther for any +personal or commercial use for free charge. + +WWW: https://www.softether.org/ diff --git a/security/softether/src/etc/inc/plugins.inc.d/softether.inc b/security/softether/src/etc/inc/plugins.inc.d/softether.inc new file mode 100644 index 000000000..93a337adb --- /dev/null +++ b/security/softether/src/etc/inc/plugins.inc.d/softether.inc @@ -0,0 +1,54 @@ + + 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. +*/ + +function softether_enabled() +{ + $model = new \OPNsense\Softether\General(); + return (string)$model->enabled == '1'; +} + +function softether_services() +{ + $services = array(); + + if (!softether_enabled()) { + return $services; + } + + $services[] = array( + 'description' => gettext('SoftEther VPN'), + 'configd' => array( + 'restart' => array('softether restart'), + 'start' => array('softether start'), + 'stop' => array('softether stop'), + ), + 'name' => 'vpnserver' + ); + + return $services; +} diff --git a/security/softether/src/opnsense/mvc/app/controllers/OPNsense/Softether/Api/GeneralController.php b/security/softether/src/opnsense/mvc/app/controllers/OPNsense/Softether/Api/GeneralController.php new file mode 100644 index 000000000..1547f90fd --- /dev/null +++ b/security/softether/src/opnsense/mvc/app/controllers/OPNsense/Softether/Api/GeneralController.php @@ -0,0 +1,39 @@ + + * + * 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. + * + */ + +namespace OPNsense\Softether\Api; + +use OPNsense\Base\ApiMutableModelControllerBase; + +class GeneralController extends ApiMutableModelControllerBase +{ + static protected $internalModelClass = '\OPNsense\Softether\General'; + static protected $internalModelName = 'general'; +} diff --git a/security/softether/src/opnsense/mvc/app/controllers/OPNsense/Softether/Api/ServiceController.php b/security/softether/src/opnsense/mvc/app/controllers/OPNsense/Softether/Api/ServiceController.php new file mode 100644 index 000000000..ca49536d9 --- /dev/null +++ b/security/softether/src/opnsense/mvc/app/controllers/OPNsense/Softether/Api/ServiceController.php @@ -0,0 +1,47 @@ + + * + * 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. + * + */ + +namespace OPNsense\Softether\Api; + +use OPNsense\Base\ApiMutableServiceControllerBase; +use OPNsense\Core\Backend; +use OPNsense\Softether\General; + +/** + * Class ServiceController + * @package OPNsense\Softether + */ +class ServiceController extends ApiMutableServiceControllerBase +{ + static protected $internalServiceClass = '\OPNsense\Softether\General'; + static protected $internalServiceTemplate = 'OPNsense/Softether'; + static protected $internalServiceEnabled = 'enabled'; + static protected $internalServiceName = 'softether'; +} diff --git a/security/softether/src/opnsense/mvc/app/controllers/OPNsense/Softether/GeneralController.php b/security/softether/src/opnsense/mvc/app/controllers/OPNsense/Softether/GeneralController.php new file mode 100644 index 000000000..7d83f2871 --- /dev/null +++ b/security/softether/src/opnsense/mvc/app/controllers/OPNsense/Softether/GeneralController.php @@ -0,0 +1,38 @@ + + 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. +*/ + +namespace OPNsense\Softether; + +class GeneralController extends \OPNsense\Base\IndexController +{ + public function indexAction() + { + $this->view->generalForm = $this->getForm("general"); + $this->view->pick('OPNsense/Softether/general'); + } +} diff --git a/security/softether/src/opnsense/mvc/app/controllers/OPNsense/Softether/forms/general.xml b/security/softether/src/opnsense/mvc/app/controllers/OPNsense/Softether/forms/general.xml new file mode 100644 index 000000000..c5a99db13 --- /dev/null +++ b/security/softether/src/opnsense/mvc/app/controllers/OPNsense/Softether/forms/general.xml @@ -0,0 +1,8 @@ +
diff --git a/security/softether/src/opnsense/mvc/app/models/OPNsense/Softether/ACL/ACL.xml b/security/softether/src/opnsense/mvc/app/models/OPNsense/Softether/ACL/ACL.xml new file mode 100644 index 000000000..d7a964e55 --- /dev/null +++ b/security/softether/src/opnsense/mvc/app/models/OPNsense/Softether/ACL/ACL.xml @@ -0,0 +1,9 @@ +