├── LICENSE ├── Makefile ├── Mk ├── defaults.mk └── plugins.mk ├── README.md ├── Scripts └── version.sh ├── Templates ├── actions.d ├── configure ├── models ├── rc.loader.d ├── templates └── version ├── dns ├── nextdns-community │ ├── Makefile │ ├── pkg-descr │ └── src │ │ ├── etc │ │ ├── inc │ │ │ └── plugins.inc.d │ │ │ │ └── nextdns.inc │ │ └── rc.d │ │ │ └── nextdns │ │ └── opnsense │ │ ├── mvc │ │ └── app │ │ │ ├── controllers │ │ │ └── OPNsense │ │ │ │ └── Nextdns │ │ │ │ ├── Api │ │ │ │ ├── GeneralController.php │ │ │ │ └── ServiceController.php │ │ │ │ ├── GeneralController.php │ │ │ │ ├── LogsController.php │ │ │ │ └── forms │ │ │ │ └── general.xml │ │ │ ├── models │ │ │ └── OPNsense │ │ │ │ └── Nextdns │ │ │ │ ├── ACL │ │ │ │ └── ACL.xml │ │ │ │ ├── General.php │ │ │ │ ├── General.xml │ │ │ │ └── Menu │ │ │ │ └── Menu.xml │ │ │ └── views │ │ │ └── OPNsense │ │ │ └── Nextdns │ │ │ ├── general.volt │ │ │ └── logs.volt │ │ └── service │ │ ├── conf │ │ └── actions.d │ │ │ └── actions_nextdns.conf │ │ └── templates │ │ └── OPNsense │ │ └── Nextdns │ │ ├── +TARGETS │ │ ├── nextdns │ │ └── nextdns.conf └── unboundcustom-maxit │ ├── Makefile │ ├── pkg-descr │ └── src │ └── opnsense │ ├── mvc │ └── app │ │ ├── controllers │ │ └── OPNsense │ │ │ └── Unboundcustom │ │ │ ├── Api │ │ │ ├── GeneralController.php │ │ │ └── ServiceController.php │ │ │ ├── GeneralController.php │ │ │ └── forms │ │ │ └── general.xml │ │ ├── models │ │ └── OPNsense │ │ │ └── Unboundcustom │ │ │ ├── ACL │ │ │ └── ACL.xml │ │ │ ├── General.php │ │ │ ├── General.xml │ │ │ └── Menu │ │ │ └── Menu.xml │ │ └── views │ │ └── OPNsense │ │ └── Unboundcustom │ │ └── general.volt │ └── service │ └── templates │ └── OPNsense │ └── Unboundcustom │ ├── +TARGETS │ └── custom-maxit.conf ├── misc ├── theme-dracula-community │ ├── Makefile │ ├── pkg-descr │ └── src │ │ └── opnsense │ │ └── www │ │ └── themes │ │ └── dracula │ │ └── build │ │ ├── css │ │ ├── all.min.css │ │ ├── bootstrap-dialog.css │ │ ├── colorVars.css │ │ ├── colors.css │ │ ├── dashboard.css │ │ ├── dns-overview.css │ │ ├── main.css │ │ ├── nv.d3.css │ │ ├── tokenize2.css │ │ └── v4-shims.min.css │ │ ├── fonts │ │ ├── bierstadt │ │ │ ├── bierstadt-bold.ttf │ │ │ ├── bierstadt-italics.ttf │ │ │ └── bierstadt-regular.ttf │ │ └── bootstrap │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ └── glyphicons-halflings-regular.woff │ │ ├── images │ │ ├── caret.png │ │ ├── default-logo.svg │ │ ├── favicon.png │ │ └── icon-logo.svg │ │ ├── js │ │ └── theme.js │ │ └── webfonts │ │ ├── fa-brands-400.ttf │ │ ├── fa-brands-400.woff │ │ ├── fa-brands-400.woff2 │ │ ├── fa-duotone-900.ttf │ │ ├── fa-duotone-900.woff │ │ ├── fa-duotone-900.woff2 │ │ ├── fa-light-300.ttf │ │ ├── fa-light-300.woff │ │ ├── fa-light-300.woff2 │ │ ├── fa-regular-400.ttf │ │ ├── fa-regular-400.woff │ │ ├── fa-regular-400.woff2 │ │ ├── fa-solid-900.ttf │ │ ├── fa-solid-900.woff │ │ ├── fa-solid-900.woff2 │ │ ├── fa-thin-100.ttf │ │ ├── fa-thin-100.woff │ │ └── fa-thin-100.woff2 └── theme-solarized-community │ ├── Makefile │ ├── pkg-descr │ └── src │ └── opnsense │ └── www │ └── themes │ └── solarized │ └── build │ ├── css │ ├── all.min.css │ ├── bootstrap-dialog.css │ ├── colors.css │ ├── dark.css │ ├── light.css │ ├── main.css │ └── v4-shims.min.css │ ├── fonts │ ├── bierstadt │ │ ├── bierstadt-bold.ttf │ │ ├── bierstadt-italics.ttf │ │ └── bierstadt-regular.ttf │ └── bootstrap │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ └── glyphicons-halflings-regular.woff │ ├── images │ ├── caret.png │ ├── default-logo.svg │ ├── favicon.png │ └── icon-logo.svg │ ├── js │ └── theme.js │ └── webfonts │ ├── fa-brands-400.ttf │ ├── fa-brands-400.woff │ ├── fa-brands-400.woff2 │ ├── fa-duotone-900.ttf │ ├── fa-duotone-900.woff │ ├── fa-duotone-900.woff2 │ ├── fa-light-300.ttf │ ├── fa-light-300.woff │ ├── fa-light-300.woff2 │ ├── fa-regular-400.ttf │ ├── fa-regular-400.woff │ ├── fa-regular-400.woff2 │ ├── fa-solid-900.ttf │ ├── fa-solid-900.woff │ ├── fa-solid-900.woff2 │ ├── fa-thin-100.ttf │ ├── fa-thin-100.woff │ └── fa-thin-100.woff2 ├── net-mgmt ├── ipcheck-community │ ├── +POST_INSTALL │ ├── Makefile │ ├── pkg-descr │ └── src │ │ ├── opnsense │ │ ├── mvc │ │ │ └── app │ │ │ │ ├── controllers │ │ │ │ └── OPNsense │ │ │ │ │ └── Ipcheck │ │ │ │ │ ├── Api │ │ │ │ │ ├── RunController.php │ │ │ │ │ └── SettingsController.php │ │ │ │ │ ├── IndexController.php │ │ │ │ │ ├── SettingsController.php │ │ │ │ │ └── forms │ │ │ │ │ └── settings.xml │ │ │ │ ├── models │ │ │ │ └── OPNsense │ │ │ │ │ └── Ipcheck │ │ │ │ │ ├── Menu │ │ │ │ │ └── Menu.xml │ │ │ │ │ ├── Settings.php │ │ │ │ │ └── Settings.xml │ │ │ │ └── views │ │ │ │ └── OPNsense │ │ │ │ └── Ipcheck │ │ │ │ ├── index.volt │ │ │ │ └── settings.volt │ │ ├── scripts │ │ │ └── OPNsense │ │ │ │ └── ipcheck │ │ │ │ └── ipcheck.py │ │ └── service │ │ │ └── conf │ │ │ └── actions.d │ │ │ └── actions_ipcheck.conf │ │ └── www │ │ └── widgets │ │ ├── include │ │ └── ipcheck.inc │ │ └── widgets │ │ └── ipcheck.widget.php ├── speedtest-community │ ├── Makefile │ ├── pkg-descr │ └── src │ │ ├── opnsense │ │ ├── mvc │ │ │ └── app │ │ │ │ ├── controllers │ │ │ │ └── OPNsense │ │ │ │ │ └── Speedtest │ │ │ │ │ ├── Api │ │ │ │ │ ├── DownloadController.php │ │ │ │ │ └── ServiceController.php │ │ │ │ │ └── IndexController.php │ │ │ │ ├── models │ │ │ │ └── OPNsense │ │ │ │ │ └── Speedtest │ │ │ │ │ ├── ACL │ │ │ │ │ └── ACL.xml │ │ │ │ │ ├── Menu │ │ │ │ │ └── Menu.xml │ │ │ │ │ ├── Speedtest.php │ │ │ │ │ └── Speedtest.xml │ │ │ │ └── views │ │ │ │ └── OPNsense │ │ │ │ └── Speedtest │ │ │ │ └── index.volt │ │ ├── scripts │ │ │ └── OPNsense │ │ │ │ └── speedtest │ │ │ │ ├── install_speedtest.sh │ │ │ │ └── opn_speedtest.py │ │ ├── service │ │ │ └── conf │ │ │ │ └── actions.d │ │ │ │ └── actions_speedtest.conf │ │ └── www │ │ │ └── js │ │ │ └── widgets │ │ │ ├── Metadata │ │ │ └── Speedtest.xml │ │ │ └── Speedtest.js │ │ └── www │ │ └── widgets │ │ ├── include │ │ └── speedtest.inc │ │ └── widgets │ │ └── speedtest.widget.php └── unifi-maxit │ ├── Makefile │ ├── pkg-descr │ └── src │ ├── etc │ └── inc │ │ └── plugins.inc.d │ │ └── unifi.inc │ └── opnsense │ ├── mvc │ └── app │ │ ├── controllers │ │ └── OPNsense │ │ │ └── Unifi │ │ │ ├── Api │ │ │ ├── GeneralController.php │ │ │ └── ServiceController.php │ │ │ ├── GeneralController.php │ │ │ └── forms │ │ │ └── general.xml │ │ ├── models │ │ └── OPNsense │ │ │ └── Unifi │ │ │ ├── ACL │ │ │ └── ACL.xml │ │ │ ├── General.php │ │ │ ├── General.xml │ │ │ └── Menu │ │ │ └── Menu.xml │ │ └── views │ │ └── OPNsense │ │ └── Unifi │ │ └── general.volt │ └── service │ ├── conf │ └── actions.d │ │ └── actions_unifi.conf │ └── templates │ └── OPNsense │ └── Unifi │ ├── +TARGETS │ └── unifi ├── ruleset.xml └── sysutils └── auto-recovery ├── Makefile ├── pkg-descr └── src └── opnsense ├── mvc └── app │ ├── controllers │ └── OPNsense │ │ └── AutoRecovery │ │ ├── Api │ │ ├── ServiceController.php │ │ └── SettingsController.php │ │ ├── IndexController.php │ │ └── forms │ │ └── general.xml │ ├── models │ └── OPNsense │ │ └── AutoRecovery │ │ ├── ACL │ │ └── ACL.xml │ │ ├── AutoRecovery.php │ │ ├── AutoRecovery.xml │ │ └── Menu │ │ └── Menu.xml │ └── views │ └── OPNsense │ └── AutoRecovery │ └── index.volt ├── scripts └── OPNsense │ └── AutoRecovery │ └── auto-recovery.sh └── service └── conf └── actions.d └── actions_autorecovery.conf /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2021 Michael Muenz 2 | Copyright (c) - everyone else mentioned in source code 3 | 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. It is not allowed to sell this software or neither offer paid services 10 | around it. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2018 Franco Fichtner 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions 5 | # are met: 6 | # 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 10 | # 2. Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 | # SUCH DAMAGE. 25 | 26 | PAGER?= less 27 | 28 | PLUGIN_ABI= 24.7 29 | 30 | all: 31 | @cat ${.CURDIR}/README.md | ${PAGER} 32 | 33 | CATEGORIES= benchmarks databases devel dns mail misc net-mgmt \ 34 | net security sysutils www 35 | 36 | .for CATEGORY in ${CATEGORIES} 37 | _${CATEGORY}!= ls -1d ${CATEGORY}/* 38 | PLUGIN_DIRS+= ${_${CATEGORY}} 39 | .endfor 40 | 41 | list: 42 | .for PLUGIN_DIR in ${PLUGIN_DIRS} 43 | @echo ${PLUGIN_DIR} -- $$(${MAKE} -C ${PLUGIN_DIR} -V PLUGIN_COMMENT) 44 | .endfor 45 | 46 | # shared targets that are sane to run from the root directory 47 | TARGETS= clean lint style style-fix style-python sweep test 48 | 49 | .for TARGET in ${TARGETS} 50 | ${TARGET}: 51 | . for PLUGIN_DIR in ${PLUGIN_DIRS} 52 | @${MAKE} -C ${PLUGIN_DIR} ${TARGET} 53 | . endfor 54 | .endfor 55 | 56 | ARGS= diff mfc 57 | 58 | # handle argument expansion for required targets 59 | .for TARGET in ${.TARGETS} 60 | _TARGET= ${TARGET:C/\-.*//} 61 | .if ${_TARGET} != ${TARGET} 62 | .for ARGUMENT in ${ARGS} 63 | .if ${_TARGET} == ${ARGUMENT} 64 | ${_TARGET}_ARGS+= ${TARGET:C/^[^\-]*(\-|\$)//:S/,/ /g} 65 | ${TARGET}: ${_TARGET} 66 | .endif 67 | .endfor 68 | ${_TARGET}_ARG= ${${_TARGET}_ARGS:[0]} 69 | .endif 70 | .endfor 71 | 72 | diff: 73 | @git diff --stat -p stable/${PLUGIN_ABI} ${.CURDIR}/${diff_ARGS:[1]} 74 | 75 | mfc: 76 | @git checkout stable/${PLUGIN_ABI} 77 | .for MFC in ${mfc_ARGS} 78 | @git cherry-pick -x ${MFC} 79 | .endfor 80 | @git checkout master 81 | 82 | license: 83 | @${.CURDIR}/Scripts/license . > ${.CURDIR}/LICENSE 84 | 85 | .PHONY: license 86 | -------------------------------------------------------------------------------- /Mk/defaults.mk: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016-2025 Franco Fichtner 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions 5 | # are met: 6 | # 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 10 | # 2. Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 | # SUCH DAMAGE. 25 | 26 | OSABIPREFIX= FreeBSD 27 | 28 | LOCALBASE?= /usr/local 29 | PAGER?= less 30 | 31 | PKG= ${LOCALBASE}/sbin/pkg 32 | .if ! exists(${PKG}) 33 | PKG= true 34 | .endif 35 | GIT!= which git || echo true 36 | 37 | GITVERSION= ${SCRIPTSDIR}/version.sh 38 | 39 | _PLUGIN_ARCH!= uname -p 40 | PLUGIN_ARCH?= ${_PLUGIN_ARCH} 41 | 42 | VERSIONBIN= ${LOCALBASE}/sbin/opnsense-version 43 | 44 | .if exists(${VERSIONBIN}) 45 | _PLUGIN_ABI!= ${VERSIONBIN} -a 46 | PLUGIN_ABI?= ${_PLUGIN_ABI} 47 | .else 48 | PLUGIN_ABI?= 25.1 49 | .endif 50 | 51 | PLUGIN_MAINS= master main 52 | PLUGIN_MAIN?= ${PLUGIN_MAINS:[1]} 53 | PLUGIN_STABLE?= stable/${PLUGIN_ABI} 54 | 55 | PHPBIN= ${LOCALBASE}/bin/php 56 | 57 | .if exists(${PHPBIN}) 58 | _PLUGIN_PHP!= ${PHPBIN} -v 59 | PLUGIN_PHP?= ${_PLUGIN_PHP:[2]:S/./ /g:[1..2]:tW:S/ //} 60 | .endif 61 | 62 | PYTHONLINK= ${LOCALBASE}/bin/python3 63 | 64 | .if exists(${PYTHONLINK}) 65 | _PLUGIN_PYTHON!=${PYTHONLINK} -V 66 | PLUGIN_PYTHON?= ${_PLUGIN_PYTHON:[2]:S/./ /g:[1..2]:tW:S/ //} 67 | .endif 68 | 69 | 70 | .for REPLACEMENT in ABI PHP PYTHON 71 | . if empty(PLUGIN_${REPLACEMENT}) 72 | . warning Cannot build without PLUGIN_${REPLACEMENT} set 73 | . endif 74 | .endfor 75 | 76 | REPLACEMENTS= PLUGIN_ABI \ 77 | PLUGIN_ARCH \ 78 | PLUGIN_CONFLICTS \ 79 | PLUGIN_HASH \ 80 | PLUGIN_MAINTAINER \ 81 | PLUGIN_NAME \ 82 | PLUGIN_PKGNAME \ 83 | PLUGIN_PKGVERSION \ 84 | PLUGIN_TIER \ 85 | PLUGIN_VARIANT \ 86 | PLUGIN_WWW 87 | 88 | SED_REPLACE= # empty 89 | 90 | .for REPLACEMENT in ${REPLACEMENTS} 91 | SED_REPLACE+= -e "s=%%${REPLACEMENT}%%=${${REPLACEMENT}}=g" 92 | .endfor 93 | 94 | ARGS= diff feed mfc 95 | 96 | # handle argument expansion for required targets 97 | .for TARGET in ${.TARGETS} 98 | _TARGET= ${TARGET:C/\-.*//} 99 | .if ${_TARGET} != ${TARGET} 100 | .for ARGUMENT in ${ARGS} 101 | .if ${_TARGET} == ${ARGUMENT} 102 | ${_TARGET}_ARGS+= ${TARGET:C/^[^\-]*(\-|\$)//:S/,/ /g} 103 | ${TARGET}: ${_TARGET} 104 | .endif 105 | .endfor 106 | ${_TARGET}_ARG= ${${_TARGET}_ARGS:[0]} 107 | .endif 108 | .endfor 109 | 110 | ensure-stable: 111 | @if ! git show-ref --verify --quiet refs/heads/${PLUGIN_STABLE}; then \ 112 | git update-ref refs/heads/${PLUGIN_STABLE} refs/remotes/origin/${PLUGIN_STABLE}; \ 113 | git config branch.${PLUGIN_STABLE}.merge refs/heads/${PLUGIN_STABLE}; \ 114 | git config branch.${PLUGIN_STABLE}.remote origin; \ 115 | fi 116 | 117 | diff_ARGS?= . 118 | 119 | diff: ensure-stable 120 | @git diff --stat -p ${PLUGIN_STABLE} ${.CURDIR}/${diff_ARGS:[1]} 121 | 122 | feed: ensure-stable 123 | @git log --stat -p --reverse ${PLUGIN_STABLE}...${feed_ARGS:[1]}~1 124 | 125 | mfc_ARGS?= . 126 | 127 | mfc: ensure-stable 128 | .for MFC in ${mfc_ARGS} 129 | .if exists(${MFC}) 130 | @git diff --stat -p ${PLUGIN_STABLE} ${.CURDIR}/${MFC} > /tmp/mfc.diff 131 | @git checkout ${PLUGIN_STABLE} 132 | @git apply /tmp/mfc.diff 133 | @git add ${.CURDIR}/${MFC} 134 | @if ! git diff --quiet HEAD; then \ 135 | git commit -m "${MFC:S/^.$/${PLUGIN_DIR}/}: sync with ${PLUGIN_MAIN}"; \ 136 | fi 137 | .else 138 | @git checkout ${PLUGIN_STABLE} 139 | @if ! git cherry-pick -x ${MFC}; then \ 140 | git cherry-pick --abort; \ 141 | fi 142 | .endif 143 | @git checkout ${PLUGIN_MAIN} 144 | .endfor 145 | 146 | stable: 147 | @git checkout ${PLUGIN_STABLE} 148 | 149 | ${PLUGIN_MAINS}: 150 | @git checkout ${PLUGIN_MAIN} 151 | 152 | rebase: 153 | @git checkout ${PLUGIN_STABLE} 154 | @git rebase -i 155 | @git checkout ${PLUGIN_MAIN} 156 | 157 | log: 158 | @git log --stat -p ${PLUGIN_STABLE} 159 | 160 | push: 161 | @git checkout ${PLUGIN_STABLE} 162 | @git push 163 | @git checkout ${PLUGIN_MAIN} 164 | 165 | reset: 166 | @git checkout ${PLUGIN_STABLE} 167 | @git reset --hard HEAD~1 168 | @git checkout ${PLUGIN_MAIN} 169 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # opn-repo 2 | OPNsense repo by mimugmail 3 | 4 | 5 | Here you'll find source of a couple of plugins but it's mainly just for tracking bugs or new feature requests. 6 | 7 | You'll find everything else here: 8 | https://www.routerperformance.net/opnsense-repo/ 9 | 10 | Install this repo: 11 | 12 | ``` 13 | fetch -o /usr/local/etc/pkg/repos/mimugmail.conf https://www.routerperformance.net/mimugmail.conf 14 | pkg update 15 | ``` 16 | 17 | Find out what is available in the (installed) repo: 18 | ``` 19 | pkg search -g -r mimugmail \* 20 | ``` 21 | 22 | Remove this repo: 23 | ``` 24 | rm /usr/local/etc/pkg/repos/mimugmail.conf 25 | ``` 26 | (removing the repo will not remove previously installed packages from the repo) 27 | 28 | Find out what you have installed from this repo: 29 | ``` 30 | pkg query -a '%R %n-%v' | grep mimugmail 31 | ``` 32 | -------------------------------------------------------------------------------- /Scripts/version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Copyright (c) 2015 Franco Fichtner 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions 7 | # are met: 8 | # 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 12 | # 2. Redistributions in binary form must reproduce the above copyright 13 | # notice, this list of conditions and the following disclaimer in the 14 | # documentation and/or other materials provided with the distribution. 15 | # 16 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | # SUCH DAMAGE. 27 | 28 | set -e 29 | 30 | VERSION=$(git describe --abbrev=0 --always ${1}) 31 | REVISION=$(git rev-list ${VERSION}.. --count) 32 | HASH=$(git rev-list HEAD --max-count=1 | cut -c1-9) 33 | 34 | echo ${VERSION} ${REVISION} ${HASH} 35 | -------------------------------------------------------------------------------- /Templates/actions.d: -------------------------------------------------------------------------------- 1 | if [ -f /usr/local/etc/rc.d/configd ]; then /usr/local/etc/rc.d/configd restart; fi 2 | -------------------------------------------------------------------------------- /Templates/configure: -------------------------------------------------------------------------------- 1 | if [ -f /usr/local/etc/rc.configure_plugins ]; then echo "Reloading plugin configuration"; /usr/local/etc/rc.configure_plugins %%ARG%%; fi 2 | -------------------------------------------------------------------------------- /Templates/models: -------------------------------------------------------------------------------- 1 | if [ -f /usr/local/opnsense/mvc/script/run_migrations.php ]; then /usr/local/opnsense/mvc/script/run_migrations.php %%ARG%%; fi 2 | -------------------------------------------------------------------------------- /Templates/rc.loader.d: -------------------------------------------------------------------------------- 1 | if [ -f /usr/local/etc/rc.configure_firmware ]; then echo "Reloading firmware configuration"; /usr/local/etc/rc.configure_firmware; fi 2 | -------------------------------------------------------------------------------- /Templates/templates: -------------------------------------------------------------------------------- 1 | if [ -f /usr/local/sbin/configctl ]; then echo -n "Reloading template %%ARG%%: "; /usr/local/sbin/configctl template reload %%ARG%%; fi 2 | -------------------------------------------------------------------------------- /Templates/version: -------------------------------------------------------------------------------- 1 | { 2 | "product_abi": "%%PLUGIN_ABI%%", 3 | "product_arch": "%%PLUGIN_ARCH%%", 4 | "product_conflicts": "%%PLUGIN_CONFLICTS%%", 5 | "product_email": "%%PLUGIN_MAINTAINER%%", 6 | "product_hash": "%%PLUGIN_HASH%%", 7 | "product_id": "%%PLUGIN_PKGNAME%%", 8 | "product_name": "%%PLUGIN_NAME%%", 9 | "product_tier": "%%PLUGIN_TIER%%", 10 | "product_version": "%%PLUGIN_PKGVERSION%%", 11 | "product_website": "%%PLUGIN_WWW%%" 12 | } 13 | -------------------------------------------------------------------------------- /dns/nextdns-community/Makefile: -------------------------------------------------------------------------------- 1 | PLUGIN_NAME= nextdns-community 2 | PLUGIN_VERSION= 0.4 3 | PLUGIN_COMMENT= NextDNS CLI 4 | PLUGIN_DEPENDS= nextdns 5 | PLUGIN_MAINTAINER= mihak09@gmail.com 6 | 7 | .include "../../Mk/plugins.mk" 8 | -------------------------------------------------------------------------------- /dns/nextdns-community/pkg-descr: -------------------------------------------------------------------------------- 1 | NextDNS community plugin 2 | 3 | Plugin Changelog 4 | ================ 5 | 6 | 0.3 7 | * CLI component only; Removed all online elements 8 | 9 | 0.2 10 | * Clean-up of CLI model - now support semicolon lists 11 | * Grabbing the online settings and show as JSON 12 | 13 | 0.1 14 | * Initial CLI-only release 15 | -------------------------------------------------------------------------------- /dns/nextdns-community/src/etc/inc/plugins.inc.d/nextdns.inc: -------------------------------------------------------------------------------- 1 | gettext('nextdns'), 11 | 'configd' => array( 12 | 'restart' => array('nextdns restart'), 13 | 'start' => array('nextdns start'), 14 | 'stop' => array('nextdns stop'), 15 | ), 16 | 'name' => 'nextdns', 17 | 'pidfile' => '/var/run/nextdns.pid', 18 | ); 19 | } 20 | 21 | return $services; 22 | } -------------------------------------------------------------------------------- /dns/nextdns-community/src/etc/rc.d/nextdns: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . /etc/rc.subr 4 | name="nextdns" 5 | rcvar=nextdns_enable 6 | pidfile=/var/run/${name}.pid 7 | 8 | command=/usr/sbin/daemon 9 | command_args="-P ${pidfile} ${name} run &" 10 | 11 | stop_cmd="killall nextdns" 12 | status_cmd=nextdns_status 13 | 14 | load_rc_config nextdns 15 | 16 | : ${nextdns_enable="NO"} 17 | 18 | nextdns_status() 19 | { 20 | if [ -n "$rc_pid" ]; then 21 | echo "${name} is running as pid $rc_pid." 22 | return 0 23 | else 24 | echo "${name} is not running." 25 | fi 26 | } 27 | 28 | run_rc_command $1 29 | 30 | -------------------------------------------------------------------------------- /dns/nextdns-community/src/opnsense/mvc/app/controllers/OPNsense/Nextdns/Api/GeneralController.php: -------------------------------------------------------------------------------- 1 | 5 | * All rights reserved. 6 | */ 7 | 8 | namespace OPNsense\Nextdns\Api; 9 | 10 | use OPNsense\Base\ApiMutableModelControllerBase; 11 | 12 | class GeneralController extends ApiMutableModelControllerBase 13 | { 14 | protected static $internalModelClass = '\OPNsense\Nextdns\General'; 15 | protected static $internalModelName = 'general'; 16 | } -------------------------------------------------------------------------------- /dns/nextdns-community/src/opnsense/mvc/app/controllers/OPNsense/Nextdns/Api/ServiceController.php: -------------------------------------------------------------------------------- 1 | 5 | * All rights reserved. 6 | */ 7 | 8 | namespace OPNsense\Nextdns; 9 | 10 | class GeneralController extends \OPNsense\Base\IndexController 11 | { 12 | public function indexAction() 13 | { 14 | $this->view->generalForm = $this->getForm('general'); 15 | $this->view->pick('OPNsense/Nextdns/general'); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /dns/nextdns-community/src/opnsense/mvc/app/controllers/OPNsense/Nextdns/LogsController.php: -------------------------------------------------------------------------------- 1 | view->pick('OPNsense/Nextdns/logs'); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /dns/nextdns-community/src/opnsense/mvc/app/controllers/OPNsense/Nextdns/forms/general.xml: -------------------------------------------------------------------------------- 1 |
2 | 3 | general.enabled 4 | 5 | checkbox 6 | Enable or disable Nextdns CLI; Before enabling, make sure that Unbound (or any other DNS listener) is not already using port 53. Best practice is to keep Unbound enabled with a different listening port (i.e. :5300) and use it for discovery DNS 7 | 8 | 9 | 10 | general.config 11 | 12 | text 13 | Comma-separated field; NextDNS requires at least one, and allows multiple config ids, each one can be prefixed with a condition that is a match for each query. For example, a CIDR can be used to restrict a configuration to a subnet: 10.0.3.0/24=abcdef, a MAC address can be used to restrict configuration to a specific host: 00:1c:42:2e:60:4a=abcdef 14 | 15 | 16 | 17 | general.autoactivate 18 | 19 | checkbox 20 | NextDNS will run activate at startup and deactivate on exit. 21 | 22 | 23 | 24 | general.setuprouter 25 | 26 | checkbox 27 | Automatically configure NextDNS for a router setup. Common types of routers are detected to integrate gracefuly - and this is the most optimal setting for OPNsense. Changes applied are undone on daemon exit. The listen option is ignored when this option is used. 28 | 29 | 30 | 31 | general.listen 32 | 33 | text 34 | true 35 | This setting is ignored if the auto-setup-router is set to true. Listening port for UDP DNS requests. Can be just the port (:53), ip:port (192.168.1.1:53) or host:port (localhost:53) 36 | 37 | 38 | 39 | general.reportclientinfo 40 | 41 | checkbox 42 | NextDNS will attempt to detect and report tne name of the client that issued DNS queries. 43 | 44 | 45 | 46 | general.discoverydns 47 | 48 | text 49 | This setting is only active if the report-client-info is set to true. host:port of a DNS/DHCP server that reports client names (usually this points to Unbound service, on a different port from 53). If empty, the address learned via DHCP broadcasts will be used. 50 | 51 | 52 | 53 | general.forwarder 54 | 55 | text 56 | true 57 | Forwarders can be defined to send proxy DNS traffic to an alternative DNS upstream resolver for specific domains. The format of this parameter is [DOMAIN=]SERVER_ADDR. Can ben either an IP[:PORT] for DNS53 (unencrypted UDP, TCP), or a HTTPS URL for a DNS over HTTPS server. For DoH, a bootstrap IP can be specified as follow: https://dns.nextdns.io#45.90.28.0. Several servers can be specified, separated by comas to implement failover: mycompany.com=1.2.3.4,1.2.3.5; mycompany2.com=https://doh.mycompany.com/dns-query#1.2.3.4 58 | 59 | 60 | 61 | general.cachesize 62 | 63 | text 64 | true 65 | Set the size of the cache in megabytes. Use 0 to disable caching. The cache is automatically flushed when the pointed configuration is updated. 66 | 67 | 68 | 69 | general.cachemaxage 70 | 71 | text 72 | true 73 | If set to greater than 0, a cached entry will be considered stale after this duration, even if the record's TTL is higher. 74 | 75 | 76 | 77 | general.maxttl 78 | 79 | text 80 | true 81 | If set to greater than 0, defines the maximum TTL value that will be handed out to clients. The specified maximum TTL will be given to clients instead of the true TTL value if it is lower. The true TTL value is however kept in the cache to evaluate cache entries freshness. This is best used in conjunction with the cache to force clients not to rely on their own cache in order to pick up configuration changes faster. 82 | 83 | 84 | 85 | general.timeout 86 | 87 | text 88 | true 89 | Maximum duration allowed for a request before failing. Default: 5s 90 | 91 | 92 | 93 | general.logqueries 94 | 95 | checkbox 96 | true 97 | Log DNS queries 98 | 99 | 100 | 101 | general.usehosts 102 | 103 | checkbox 104 | true 105 | Use local hosts file before querying upstream DNS servers 106 | 107 | 108 | 109 | general.detectcaptiveportals 110 | 111 | checkbox 112 | true 113 | Automatic detection of captive portals and fallback on system DNS to allow the connection to establish.Beware that enabling this feature can allow an attacker to force nextdns to disable DoH and leak unencrypted DNS traffic. 114 | 115 | 116 | 117 | general.boguspriv 118 | 119 | checkbox 120 | true 121 | All reverse lookups for private IP ranges (ie 192.168.x.x, etc.) are answered with "no such domain" rather than being forwarded upstream. The set of prefixes affected is the list given in RFC6303. 122 | 123 | 124 |
125 | -------------------------------------------------------------------------------- /dns/nextdns-community/src/opnsense/mvc/app/models/OPNsense/Nextdns/ACL/ACL.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Services: Nextdns 4 | 5 | ui/nextdns/* 6 | api/nextdns/* 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /dns/nextdns-community/src/opnsense/mvc/app/models/OPNsense/Nextdns/General.php: -------------------------------------------------------------------------------- 1 | 5 | * All rights reserved. 6 | */ 7 | 8 | namespace OPNsense\Nextdns; 9 | 10 | use OPNsense\Base\BaseModel; 11 | 12 | class General extends BaseModel 13 | { 14 | } 15 | -------------------------------------------------------------------------------- /dns/nextdns-community/src/opnsense/mvc/app/models/OPNsense/Nextdns/General.xml: -------------------------------------------------------------------------------- 1 | 2 | //OPNsense/nextdns/general 3 | Nextdns CLI configuration 4 | 0.0.1 5 | 6 | 7 | 0 8 | Y 9 | 10 | 11 | 12 | N 13 | 14 | 15 | 16 | N 17 | 18 | 19 | 20 | abcde 21 | Y 22 | Y 23 | 24 | 25 | 26 | :53 27 | Y 28 | N 29 | 30 | 31 | 32 | 33 | Y 34 | N 35 | 36 | 37 | 38 | 1 39 | Y 40 | 41 | 42 | 43 | 10 44 | Y 45 | 46 | 47 | 48 | 0 49 | N 50 | 51 | 52 | 53 | 0 54 | N 55 | 56 | 57 | 58 | 5 59 | Y 60 | 61 | 62 | 63 | 0 64 | N 65 | 66 | 67 | 68 | 0 69 | N 70 | 71 | 72 | 73 | 1 74 | Y 75 | 76 | 77 | 78 | 0 79 | N 80 | 81 | 82 | 83 | 1 84 | Y 85 | 86 | 87 | 88 | 1 89 | Y 90 | 91 | 92 | 93 | 94 | N 95 | 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /dns/nextdns-community/src/opnsense/mvc/app/models/OPNsense/Nextdns/Menu/Menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /dns/nextdns-community/src/opnsense/mvc/app/views/OPNsense/Nextdns/general.volt: -------------------------------------------------------------------------------- 1 | {# 2 | 3 | #} 4 | 8 | 9 | 10 |
11 |
12 |
13 | {{ partial("layout_partials/base_form",['fields':generalForm,'id':'frm_general_settings'])}} 14 |
15 |
16 | 17 |
18 |
19 |
20 |
21 | 22 | 46 | -------------------------------------------------------------------------------- /dns/nextdns-community/src/opnsense/mvc/app/views/OPNsense/Nextdns/logs.volt: -------------------------------------------------------------------------------- 1 | {# 2 | #} 3 | 7 | 8 |
9 |
10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
{{ lang._('Date') }}{{ lang._('Process') }}{{ lang._('Line') }}
23 |
24 |
25 |
26 |
27 | 28 | 64 | -------------------------------------------------------------------------------- /dns/nextdns-community/src/opnsense/service/conf/actions.d/actions_nextdns.conf: -------------------------------------------------------------------------------- 1 | [start] 2 | command:/bin/sh /usr/local/etc/rc.d/nextdns start 3 | type:script 4 | message:Start Nextdns CLI 5 | 6 | [stop] 7 | command:/bin/sh /usr/local/etc/rc.d/nextdns stop 8 | type:script 9 | message:Start Nextdns CLI 10 | 11 | [restart] 12 | command:/bin/sh /usr/local/etc/rc.d/nextdns restart 13 | type:script 14 | message:Start Nextdns CLI 15 | 16 | [status] 17 | command:/bin/sh /usr/local/etc/rc.d/nextdns status 18 | parameters: 19 | type:script_output 20 | message:Show status of Nextdns CLI 21 | 22 | [version] 23 | command:/bin/sh /usr/local/sbin/nextdns version 24 | parameters: 25 | type:script_output 26 | message:Show version of Nextdns CLI 27 | -------------------------------------------------------------------------------- /dns/nextdns-community/src/opnsense/service/templates/OPNsense/Nextdns/+TARGETS: -------------------------------------------------------------------------------- 1 | nextdns:/etc/rc.conf.d/nextdns 2 | nextdns.conf:/usr/local/etc/nextdns.conf 3 | -------------------------------------------------------------------------------- /dns/nextdns-community/src/opnsense/service/templates/OPNsense/Nextdns/nextdns: -------------------------------------------------------------------------------- 1 | {% if helpers.exists('OPNsense.nextdns.general.enabled') and OPNsense.nextdns.general.enabled == '1' %} 2 | nextdns_enable="YES" 3 | {% else %} 4 | nextdns_enable="NO" 5 | {% endif %} -------------------------------------------------------------------------------- /dns/nextdns-community/src/opnsense/service/templates/OPNsense/Nextdns/nextdns.conf: -------------------------------------------------------------------------------- 1 | {% if helpers.exists('OPNsense.nextdns.general.enabled') and OPNsense.nextdns.general.enabled == '1' %} 2 | # Do not edit this config file manually; it will be overwritten by the configd process 3 | # edit the template file instead 4 | {% if not helpers.empty('OPNsense.nextdns.general.config') %} 5 | {% for item in OPNsense.nextdns.general.config.split(';') %} 6 | config {{ item }} 7 | {% endfor %} 8 | {% endif %} 9 | {% if not helpers.empty('OPNsense.nextdns.general.forwarder') %} 10 | {% for item in OPNsense.nextdns.general.forwarder.split(';') %} 11 | forwarder {{ item }} 12 | {% endfor %} 13 | {% endif %} 14 | {% if helpers.empty('OPNsense.nextdns.general.cachesize') %} 15 | cache-size 0 16 | {% else %} 17 | cache-size {{ OPNsense.nextdns.general.cachesize }}MB 18 | {% endif %} 19 | {% if not helpers.empty('OPNsense.nextdns.general.cachemaxage') %} 20 | cache-max-age {{ OPNsense.nextdns.general.cachemaxage }}s 21 | {% else %} 22 | cache-max-age 0s 23 | {% endif %} 24 | {% if helpers.empty('OPNsense.nextdns.general.maxttl') %} 25 | max-ttl 0s 26 | {% else %} 27 | max-ttl {{ OPNsense.nextdns.general.maxttl }}s 28 | {% endif %} 29 | {% if helpers.empty('OPNsense.nextdns.general.timeout') %} 30 | timeout 0s 31 | {% else %} 32 | timeout {{ OPNsense.nextdns.general.timeout }}s 33 | {% endif %} 34 | {% if helpers.empty('OPNsense.nextdns.general.autoactivate') %} 35 | auto-activate false 36 | {% else %} 37 | auto-activate true 38 | {% endif %} 39 | {% if helpers.empty('OPNsense.nextdns.general.usehosts') %} 40 | use-hosts false 41 | {% else %} 42 | use-hosts true 43 | {% endif %} 44 | {% if helpers.empty('OPNsense.nextdns.general.logqueries') %} 45 | log-queries false 46 | {% else %} 47 | log-queries true 48 | {% endif %} 49 | {% if helpers.empty('OPNsense.nextdns.general.detectcaptiveportals') %} 50 | detect-captive-portals false 51 | {% else %} 52 | detect-captive-portals true 53 | {% endif %} 54 | {% if helpers.empty('OPNsense.nextdns.general.boguspriv') %} 55 | bogus-priv false 56 | {% else %} 57 | bogus-priv true 58 | {% endif %} 59 | {% if helpers.empty('OPNsense.nextdns.general.setuprouter') %} 60 | setup-router false 61 | {% if not helpers.empty('OPNsense.nextdns.general.listen') %} 62 | {% for item in OPNsense.nextdns.general.listen.split(';') %} 63 | listen {{ item }} 64 | {% endfor %} 65 | {% endif %} 66 | {% else %} 67 | setup-router true 68 | {% endif %} 69 | {% if helpers.empty('OPNsense.nextdns.general.reportclientinfo') %} 70 | report-client-info false 71 | {% else %} 72 | report-client-info true 73 | {% if helpers.empty('OPNsense.nextdns.general.discoverydns') %} 74 | discovery-dns 75 | {% else %} 76 | discovery-dns {{ OPNsense.nextdns.general.discoverydns }} 77 | {% endif %} 78 | {% endif %} 79 | {% endif %} -------------------------------------------------------------------------------- /dns/unboundcustom-maxit/Makefile: -------------------------------------------------------------------------------- 1 | PLUGIN_NAME= unboundcustom-maxit 2 | PLUGIN_VERSION= 1.0 3 | PLUGIN_COMMENT= Unbound Custom Options 4 | PLUGIN_MAINTAINER= michael.muenz@max-it.de 5 | 6 | .include "../../Mk/plugins.mk" 7 | -------------------------------------------------------------------------------- /dns/unboundcustom-maxit/pkg-descr: -------------------------------------------------------------------------------- 1 | Unbound Custom Options by m.a.x. it / mimugmail 2 | 3 | 4 | Plugin Changelog 5 | ================ 6 | 7 | 1.0 8 | 9 | * Initial release 10 | -------------------------------------------------------------------------------- /dns/unboundcustom-maxit/src/opnsense/mvc/app/controllers/OPNsense/Unboundcustom/Api/GeneralController.php: -------------------------------------------------------------------------------- 1 | 5 | * All rights reserved. 6 | */ 7 | 8 | namespace OPNsense\Unboundcustom\Api; 9 | 10 | use OPNsense\Base\ApiMutableModelControllerBase; 11 | 12 | class GeneralController extends ApiMutableModelControllerBase 13 | { 14 | protected static $internalModelClass = '\OPNsense\Unboundcustom\General'; 15 | protected static $internalModelName = 'general'; 16 | } 17 | -------------------------------------------------------------------------------- /dns/unboundcustom-maxit/src/opnsense/mvc/app/controllers/OPNsense/Unboundcustom/Api/ServiceController.php: -------------------------------------------------------------------------------- 1 | 5 | * All rights reserved. 6 | */ 7 | 8 | namespace OPNsense\Unboundcustom\Api; 9 | 10 | use OPNsense\Base\ApiMutableServiceControllerBase; 11 | 12 | class ServiceController extends ApiMutableServiceControllerBase 13 | { 14 | protected static $internalServiceClass = '\OPNsense\Unboundcustom\General'; 15 | protected static $internalServiceTemplate = 'OPNsense/Unboundcustom'; 16 | protected static $internalServiceEnabled = 'enabled'; 17 | protected static $internalServiceName = 'unboundcustom'; 18 | } 19 | -------------------------------------------------------------------------------- /dns/unboundcustom-maxit/src/opnsense/mvc/app/controllers/OPNsense/Unboundcustom/GeneralController.php: -------------------------------------------------------------------------------- 1 | 5 | * All rights reserved. 6 | */ 7 | 8 | namespace OPNsense\Unboundcustom; 9 | 10 | class GeneralController extends \OPNsense\Base\IndexController 11 | { 12 | public function indexAction() 13 | { 14 | $this->view->generalForm = $this->getForm('general'); 15 | $this->view->pick('OPNsense/Unboundcustom/general'); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /dns/unboundcustom-maxit/src/opnsense/mvc/app/controllers/OPNsense/Unboundcustom/forms/general.xml: -------------------------------------------------------------------------------- 1 |
2 | 3 | general.enabled 4 | 5 | checkbox 6 | Enable or disable Unbound Custom Options 7 | 8 | 9 | general.customoptions 10 | 11 | textbox 12 | Please use with caution and on your own risk, there is no validation! 13 | 14 |
15 | -------------------------------------------------------------------------------- /dns/unboundcustom-maxit/src/opnsense/mvc/app/models/OPNsense/Unboundcustom/ACL/ACL.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Services: Unbound: Unboundcustom 4 | 5 | ui/unboundcustom/* 6 | api/unboundcustom/* 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /dns/unboundcustom-maxit/src/opnsense/mvc/app/models/OPNsense/Unboundcustom/General.php: -------------------------------------------------------------------------------- 1 | 5 | * All rights reserved. 6 | */ 7 | 8 | namespace OPNsense\Unboundcustom; 9 | 10 | use OPNsense\Base\BaseModel; 11 | 12 | class General extends BaseModel 13 | { 14 | } 15 | -------------------------------------------------------------------------------- /dns/unboundcustom-maxit/src/opnsense/mvc/app/models/OPNsense/Unboundcustom/General.xml: -------------------------------------------------------------------------------- 1 | 2 | //OPNsense/unboundcustom/general 3 | Unboundcustom general configuration 4 | 0.0.1 5 | 6 | 7 | 0 8 | Y 9 | 10 | 11 | N 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /dns/unboundcustom-maxit/src/opnsense/mvc/app/models/OPNsense/Unboundcustom/Menu/Menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /dns/unboundcustom-maxit/src/opnsense/mvc/app/views/OPNsense/Unboundcustom/general.volt: -------------------------------------------------------------------------------- 1 | {# 2 | # Copyright (c) 2021 Michael Muenz 3 | # All rights reserved. 4 | #} 5 | 6 |
7 | 10 | {{ partial("layout_partials/base_form",['fields':generalForm,'id':'frm_general_settings'])}} 11 |
12 |
13 | 14 |
15 |
16 | 17 | 37 | -------------------------------------------------------------------------------- /dns/unboundcustom-maxit/src/opnsense/service/templates/OPNsense/Unboundcustom/+TARGETS: -------------------------------------------------------------------------------- 1 | custom-maxit.conf:/usr/local/etc/unbound.opnsense.d/custom-maxit.conf 2 | -------------------------------------------------------------------------------- /dns/unboundcustom-maxit/src/opnsense/service/templates/OPNsense/Unboundcustom/custom-maxit.conf: -------------------------------------------------------------------------------- 1 | {% if helpers.exists('OPNsense.unboundcustom.general.enabled') and OPNsense.unboundcustom.general.enabled == '1' %} 2 | 3 | {{ OPNsense.unboundcustom.general.customoptions }} 4 | 5 | {% endif %} 6 | -------------------------------------------------------------------------------- /misc/theme-dracula-community/Makefile: -------------------------------------------------------------------------------- 1 | PLUGIN_NAME= theme-dracula 2 | PLUGIN_VERSION= 0.7 3 | PLUGIN_COMMENT= Dracula theme - dark mode only 4 | PLUGIN_MAINTAINER= git@0896c69e.anonaddy.com 5 | 6 | .include "../../Mk/plugins.mk" 7 | -------------------------------------------------------------------------------- /misc/theme-dracula-community/pkg-descr: -------------------------------------------------------------------------------- 1 | Dark mode theme based on Dracula 2 | 3 | Colors taken from https://draculatheme.com/ 4 | 5 | -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/css/bootstrap-dialog.css: -------------------------------------------------------------------------------- 1 | .modal-backdrop { 2 | z-index: -1; 3 | } 4 | .bootstrap-dialog { 5 | /* dialog types */ 6 | /** 7 | * Icon animation 8 | * Copied from font-awesome: http://fontawesome.io/ 9 | **/ 10 | /** End of icon animation **/ 11 | } 12 | .bootstrap-dialog .modal-header { 13 | border-top-left-radius: 4px; 14 | border-top-right-radius: 4px; 15 | } 16 | .bootstrap-dialog .bootstrap-dialog-title { 17 | color: #fff; 18 | display: inline-block; 19 | } 20 | .bootstrap-dialog .bootstrap-dialog-button-icon { 21 | margin-right: 3px; 22 | } 23 | .bootstrap-dialog .bootstrap-dialog-close-button { 24 | float: right; 25 | filter: alpha(opacity=90); 26 | -moz-opacity: 0.9; 27 | -khtml-opacity: 0.9; 28 | opacity: 0.9; 29 | } 30 | .bootstrap-dialog .bootstrap-dialog-close-button:hover { 31 | cursor: pointer; 32 | filter: alpha(opacity=100); 33 | -moz-opacity: 1; 34 | -khtml-opacity: 1; 35 | opacity: 1; 36 | } 37 | .bootstrap-dialog.type-default .modal-header { 38 | background-color: #fff; 39 | } 40 | .bootstrap-dialog.type-default .bootstrap-dialog-title { 41 | color: #333; 42 | } 43 | .bootstrap-dialog.type-info .modal-header { 44 | background-color: #B0CDDB; 45 | } 46 | .bootstrap-dialog.type-primary .modal-header { 47 | background-color: #EA7105; 48 | } 49 | .bootstrap-dialog.type-success .modal-header { 50 | background-color: #9BD275; 51 | } 52 | .bootstrap-dialog.type-warning .modal-header { 53 | background-color: #f0ad4e; 54 | } 55 | .bootstrap-dialog.type-danger .modal-header { 56 | background-color: #d9534f; 57 | } 58 | .bootstrap-dialog.size-large .bootstrap-dialog-title { 59 | font-size: 24px; 60 | } 61 | .bootstrap-dialog.size-large .bootstrap-dialog-close-button { 62 | font-size: 30px; 63 | } 64 | .bootstrap-dialog.size-large .bootstrap-dialog-message { 65 | font-size: 18px; 66 | } 67 | .bootstrap-dialog .icon-spin { 68 | display: inline-block; 69 | -moz-animation: spin 2s infinite linear; 70 | -o-animation: spin 2s infinite linear; 71 | -webkit-animation: spin 2s infinite linear; 72 | animation: spin 2s infinite linear; 73 | } 74 | @-moz-keyframes spin { 75 | 0% { 76 | -moz-transform: rotate(0deg); 77 | } 78 | 100% { 79 | -moz-transform: rotate(359deg); 80 | } 81 | } 82 | @-webkit-keyframes spin { 83 | 0% { 84 | -webkit-transform: rotate(0deg); 85 | } 86 | 100% { 87 | -webkit-transform: rotate(359deg); 88 | } 89 | } 90 | @-o-keyframes spin { 91 | 0% { 92 | -o-transform: rotate(0deg); 93 | } 94 | 100% { 95 | -o-transform: rotate(359deg); 96 | } 97 | } 98 | @-ms-keyframes spin { 99 | 0% { 100 | -ms-transform: rotate(0deg); 101 | } 102 | 100% { 103 | -ms-transform: rotate(359deg); 104 | } 105 | } 106 | @keyframes spin { 107 | 0% { 108 | transform: rotate(0deg); 109 | } 110 | 100% { 111 | transform: rotate(359deg); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/css/colorVars.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | :root { 3 | --b3: var(--base3); 4 | --b2: var(--base2); 5 | --b1: var(--base1); 6 | --b0: var(--base0); 7 | --b00: var(--base00); 8 | --b01: var(--base01); 9 | --b02: var(--base02); 10 | --b03: var(--base03); 11 | } 12 | -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/css/colors.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | :root { 3 | --base3: #282a36; 4 | --base2: #44475a; /* background */ 5 | --base1: #50fa7b; /* buttons */ 6 | --base0: #282a36; 7 | --base00: #f8f8f2; /* font */ 8 | --base01: #f8f8f2; 9 | --base02: #44475a; 10 | --base03: #282a36; 11 | 12 | --accent: #bd93f9; 13 | 14 | --yellow: #f1fa8c; 15 | --orange: #ffb86c; 16 | --red: #ff5555; 17 | --magenta: #ff79c6; 18 | --violet: #bd93f9; 19 | --blue: #278bd3; 20 | --cyan: #8be9fd; 21 | --green: #50fa7b; 22 | 23 | --fa-primary-color: var(--base02); 24 | --fa-secondary-color: var(--base03); 25 | } -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/css/dashboard.css: -------------------------------------------------------------------------------- 1 | .btn-pressed { 2 | background-color: #b695f3; 3 | color: white; 4 | 5 | &:hover { 6 | background-color: #b695f3; 7 | color: white; 8 | } 9 | } 10 | 11 | .fa-spinner { 12 | font-size: 2em; 13 | } 14 | 15 | .grid-stack-item-content { 16 | text-align: center; 17 | border-style: solid; 18 | border-color: rgba(25, 25, 25, 0.72); 19 | border-width: 2px; 20 | background-color: #454758; 21 | border-radius: 0.5em 0.5em 0.5em 0.5em; 22 | } 23 | 24 | .widget-error { 25 | margin: 50px; 26 | color: #721c24; 27 | } 28 | 29 | .widget-content { 30 | position: relative; 31 | width: 100%; 32 | height: 100%; 33 | padding: 1px; 34 | cursor: grab; 35 | } 36 | 37 | .widget-header { 38 | margin-top: 0.5em; 39 | margin-left: 1em; 40 | margin-right: 1em; 41 | display: flex; 42 | justify-content: space-between; 43 | align-items: center; 44 | } 45 | 46 | .widget-spinner { 47 | margin-top: 20px; 48 | } 49 | 50 | .fa-stack.small { 51 | font-size: 0.5em; 52 | } 53 | 54 | .close-handle { 55 | vertical-align: middle; 56 | text-align: right; 57 | cursor: pointer; 58 | 59 | > i { 60 | font-size: 0.7em; 61 | } 62 | } 63 | 64 | .panel-divider { 65 | width: 100%; 66 | text-align: center; 67 | height: 8px; 68 | margin-bottom: 10px; 69 | } 70 | 71 | table { 72 | table-layout: fixed; 73 | } 74 | 75 | td { 76 | word-break: break-all; 77 | } 78 | 79 | .line { 80 | display: inline-block; 81 | height: 1px; 82 | width: 70%; 83 | background: #b695f3; 84 | margin: 5px; 85 | } 86 | 87 | .canvas-container { 88 | position: relative; 89 | } 90 | 91 | .cpu-canvas-container { 92 | display: flex; 93 | flex-direction: column; 94 | } 95 | 96 | .smoothie-container { 97 | width: 100%; 98 | } 99 | 100 | .smoothie-chart-tooltip { 101 | z-index: 1; 102 | 103 | /* necessary to force to foreground */ 104 | background: rgba(50, 50, 50, 0.9); 105 | padding-left: 15px; 106 | padding-right: 15px; 107 | color: white; 108 | font-size: 13px; 109 | border-radius: 0.5em 0.5em 0.5em 0.5em; 110 | pointer-events: none; 111 | } 112 | 113 | .flex-container { 114 | display: flex; 115 | flex-wrap: nowrap; 116 | white-space: nowrap; 117 | } 118 | 119 | .gateway-info { 120 | margin: 5px; 121 | padding: 5px; 122 | font-size: 13px; 123 | } 124 | 125 | .gateway-detail-container { 126 | display: none; 127 | margin: 5px; 128 | } 129 | 130 | .interface-info { 131 | display: flex; 132 | flex-wrap: wrap; 133 | align-items: center; 134 | height: 100%; 135 | } 136 | 137 | .nowrap { 138 | flex-wrap: nowrap; 139 | } 140 | 141 | .gateway-graph { 142 | display: none; 143 | } 144 | 145 | .flex-container > .gateway-graph { 146 | font-size: 13px; 147 | } 148 | 149 | .vertical-center-row { 150 | height: 100%; 151 | display: inline; 152 | } 153 | 154 | .interfaces-info { 155 | margin: 5px; 156 | font-size: 13px; 157 | } 158 | 159 | .interface-descr { 160 | margin-left: 10px; 161 | font-size: 15px; 162 | cursor: pointer; 163 | text-decoration: underline; 164 | } 165 | 166 | .interfaces-detail-container { 167 | margin: 5px; 168 | display: none; 169 | } 170 | 171 | .d-flex { 172 | display: flex; 173 | 174 | > { 175 | .justify-content-start { 176 | justify-content: start; 177 | } 178 | 179 | .justify-content-end { 180 | justify-content: end; 181 | } 182 | } 183 | } 184 | 185 | #chartjs-toolip { 186 | z-index: 20; 187 | } 188 | 189 | /* CPU widget */ 190 | 191 | .cpu-type { 192 | margin-bottom: 10px; 193 | margin-top: 10px; 194 | } 195 | 196 | /* ----- */ 197 | 198 | /* Custom flex table */ 199 | 200 | div { 201 | box-sizing: border-box; 202 | } 203 | 204 | .flextable-container { 205 | display: block; 206 | margin: 2em auto; 207 | width: 95%; 208 | max-width: 1200px; 209 | } 210 | 211 | .flextable-header { 212 | display: flex; 213 | flex-flow: row wrap; 214 | transition: 0.5s; 215 | padding: 0.5em 0.5em; 216 | border-top: solid 1px rgba(217, 79, 0, 0.15); 217 | } 218 | 219 | .flextable-row { 220 | display: flex; 221 | flex-flow: row wrap; 222 | transition: 0.5s; 223 | padding: 0.5em 0.5em; 224 | border-top: solid 1px rgba(255, 255, 255, 0.06); 225 | align-items: center; 226 | } 227 | 228 | .flextable-header .flex-cell { 229 | font-weight: bold; 230 | } 231 | 232 | .flex-cell { 233 | text-align: left; 234 | word-break: break-word; 235 | } 236 | 237 | .column { 238 | display: flex; 239 | flex-flow: column wrap; 240 | width: 50%; 241 | padding: 0; 242 | 243 | .flex-cell { 244 | display: flex; 245 | flex-flow: row wrap; 246 | width: 100%; 247 | padding: 0; 248 | border: 0; 249 | border-top: rgb(59, 59, 59); 250 | } 251 | } 252 | 253 | .flex-subcell { 254 | width: 100%; 255 | text-align: left; 256 | } 257 | 258 | .column .flex-cell:not(:last-child) { 259 | border-bottom: none !important; 260 | } 261 | 262 | /* ----- */ 263 | 264 | /* CSS grid responsive table */ 265 | 266 | .grid-header-container { 267 | display: grid; 268 | grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); 269 | } 270 | 271 | .grid-row { 272 | display: grid; 273 | grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); 274 | background-color: #f7e2d6; 275 | 276 | /* fade-in color, transitions to transparent */ 277 | border-top: 1px solid #f7e2d6; 278 | transition: 0.5s; 279 | opacity: 0.4; 280 | } 281 | 282 | .grid-header { 283 | border-top: 1px solid #f7e2d6; 284 | font-weight: bold; 285 | } 286 | 287 | .grid-item { 288 | border: 1 px solid #ccc; 289 | padding: 4px; 290 | text-align: center; 291 | } 292 | 293 | /* ----- */ 294 | 295 | :root { 296 | --chart-js-background-color:#bac3ca; 297 | --chart-js-border-color:#bac3ca; 298 | --chart-js-font-color:#bac3ca; 299 | } 300 | -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/css/dns-overview.css: -------------------------------------------------------------------------------- 1 | .tab-content { 2 | padding: 10px; 3 | border-top: 1px solid #191919; 4 | } 5 | 6 | .banner { 7 | width: 25%; 8 | } 9 | 10 | .stats-element { 11 | height: 5em; 12 | background: #454758; 13 | overflow: hidden; 14 | display: flex; 15 | justify-content: flex-start; 16 | border-radius: .3em; 17 | margin:auto; 18 | border: 1px solid rgb(24, 24, 24); 19 | } 20 | 21 | .stats-icon { 22 | height: auto; 23 | width: 50%; 24 | object-fit:cover; 25 | background: #68, 71, 89); 26 | border-radius: 0 2em 2em 0 / 0 3em 3em 0; 27 | box-shadow: 3px 5px 1px 3px rgb(68, 71, 89); 28 | } 29 | 30 | .large-icon { 31 | position: relative; 32 | top: 50%; 33 | left: 50%; 34 | transform: translate(-50%, -50%); 35 | font-size: 2em; 36 | } 37 | 38 | .stats-text { 39 | height: 5em; 40 | width: 15em; 41 | display: flex; 42 | justify-content: center; 43 | text-align: center; 44 | align-items: center; 45 | flex-direction: column; 46 | } 47 | 48 | .stats-counter-text { 49 | margin: 0; 50 | padding: 0; 51 | text-align: center; 52 | font-size: 15px; 53 | } 54 | 55 | .stats-inner-text { 56 | margin: 0; 57 | padding: 0; 58 | text-align: center; 59 | font-size: 15px; 60 | } 61 | 62 | #bannersub { 63 | text-align: center; 64 | margin: 5px; 65 | } 66 | 67 | .list-group-wrapper { 68 | margin: 0px; 69 | padding-top: 10px; 70 | padding-bottom: 10px; 71 | } 72 | 73 | .list-item-domain { 74 | height: 2.5em; 75 | } 76 | 77 | .list-group-item-border { 78 | border: 1px solid #191919; 79 | } 80 | 81 | .list-group-item-border:first-child { 82 | border-top-left-radius: 4px; 83 | border-top-right-radius: 4px; 84 | border-bottom: 2px solid #1c1c1c; 85 | } 86 | 87 | .list-group-item-border:last-child { 88 | border-bottom-left-radius: 4px; 89 | border-bottom-right-radius: 4px; 90 | } 91 | .btn.pull-right { 92 | margin-left: 3px; 93 | } 94 | 95 | .odd-bg { 96 | background: #f7f7f7; 97 | } 98 | 99 | .top-item { 100 | display: flex; 101 | white-space: nowrap; 102 | } 103 | -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/css/tokenize2.css: -------------------------------------------------------------------------------- 1 | .tokenize > .tokens-container { 2 | position: relative; 3 | list-style: none; 4 | padding: 0 0 5px 5px; 5 | height: auto; 6 | min-height: 34px; 7 | cursor: text; 8 | background-color: #fff; 9 | border: 1px solid #ccc; 10 | border-radius: 3px; 11 | } 12 | 13 | .tokenize > .tokens-container.disabled { 14 | background-color: #eee; 15 | cursor: not-allowed; 16 | } 17 | 18 | .tokenize.focus > .tokens-container { 19 | outline: 0; 20 | border-color: #66afe9; 21 | -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6); 22 | box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6); 23 | } 24 | 25 | .tokenize > .tokens-container.input-sm { 26 | padding: 0 0 4px 4px; 27 | min-height: 30px; 28 | } 29 | 30 | .tokenize > .tokens-container.input-lg { 31 | padding: 0 0 9px 9px; 32 | min-height: 46px; 33 | } 34 | 35 | .tokenize > .tokens-container > .token { 36 | padding: 0 1.2em 0 5px; 37 | background-color: #eff2f7; 38 | -webkit-border-radius: 2px; 39 | -moz-border-radius: 2px; 40 | border-radius: 2px; 41 | } 42 | 43 | .tokenize > .tokens-container > .token, 44 | .tokenize > .tokens-container > .placeholder, 45 | .tokenize > .tokens-container > .token-search { 46 | /*! border: 1px solid #fff; */ 47 | display: inline-block; 48 | margin: 5px 5px 0 0; 49 | position: relative; 50 | vertical-align: middle; 51 | } 52 | 53 | .tokenize.sortable > .tokens-container > .token { 54 | cursor: move; 55 | } 56 | 57 | .tokenize.single > .tokens-container > .token { 58 | display: block; 59 | border-color: #fff; 60 | background-color: transparent; 61 | } 62 | 63 | .tokenize.sortable > .tokens-container > .token.shadow { 64 | border-color: #ccc; 65 | background-color: #ccc; 66 | filter: alpha(opacity=50); 67 | opacity: .2; 68 | } 69 | 70 | .tokenize > .tokens-container > .placeholder, 71 | .tokenize > .tokens-container > .token-search { 72 | padding: 0; 73 | border-color: #fff; 74 | } 75 | 76 | .tokenize > .tokens-container > .placeholder { 77 | color: #ccc; 78 | } 79 | 80 | .tokenize > .tokens-container > .token-search > input { 81 | padding: 0; 82 | margin: 0; 83 | line-height: 1em; 84 | border: 1px solid transparent; 85 | background: transparent; 86 | border-left: none; 87 | border-right: none; 88 | outline: none; 89 | width: 100%; 90 | } 91 | 92 | .tokenize > .tokens-container > .token-search > input::-ms-clear { 93 | display: none; 94 | } 95 | 96 | .tokenize > .tokens-container.input-sm > .placeholder, 97 | .tokenize > .tokens-container.input-sm > .token-search, 98 | .tokenize > .tokens-container.input-sm > .token { 99 | margin: 4px 4px 0 0; 100 | } 101 | 102 | .tokenize > .tokens-container.input-lg > .placeholder, 103 | .tokenize > .tokens-container.input-lg > .token-search, 104 | .tokenize > .tokens-container.input-lg > .token { 105 | margin: 9px 9px 0 0; 106 | } 107 | 108 | .tokenize > .tokens-container > .token.pending-delete { 109 | background-color: #5b72a4; 110 | border-color: #425c96; 111 | color: #fff 112 | } 113 | 114 | .tokenize > .tokens-container > .token > .dismiss { 115 | position: absolute; 116 | right: 5px; 117 | color: #a9b9d8; 118 | text-decoration: none; 119 | cursor: pointer; 120 | } 121 | 122 | .tokenize > .tokens-container > .token > .dismiss:after { 123 | content: "×"; 124 | } 125 | 126 | .tokenize > .tokens-container > .token.pending-delete > .dismiss { 127 | color: #aaa; 128 | } 129 | 130 | .tokenize-dropdown { 131 | position: absolute; 132 | display: none; 133 | } 134 | 135 | .tokenize-dropdown > .dropdown-menu { 136 | min-height: 10px; 137 | width: 100%; 138 | display: block; 139 | margin: -1px 0 0 0; 140 | visibility: visible; 141 | opacity: 1; 142 | } 143 | 144 | .tokenize-dropdown > .dropdown-menu li { 145 | cursor: pointer; 146 | } 147 | 148 | .tokenize-dropdown > .dropdown-menu li > a .tokenize-highlight { 149 | font-weight: bold; 150 | } 151 | 152 | .tokenize-dropdown > .dropdown-menu li.locked { 153 | padding: 3px 20px; 154 | color: #333; 155 | white-space: nowrap; 156 | } 157 | 158 | .tokenize-dropdown > .dropdown-menu li.locked, 159 | .tokenize-dropdown > .dropdown-menu li > a { 160 | text-overflow: ellipsis; 161 | overflow-x: hidden; 162 | } 163 | 164 | .tokenize-dropdown > .dropdown-menu li:not(.active) a:hover, 165 | .tokenize-dropdown > .dropdown-menu li:not(.active) a:focus { 166 | background-color: transparent; 167 | } 168 | -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/fonts/bierstadt/bierstadt-bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/fonts/bierstadt/bierstadt-bold.ttf -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/fonts/bierstadt/bierstadt-italics.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/fonts/bierstadt/bierstadt-italics.ttf -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/fonts/bierstadt/bierstadt-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/fonts/bierstadt/bierstadt-regular.ttf -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/fonts/bootstrap/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/fonts/bootstrap/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/fonts/bootstrap/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/fonts/bootstrap/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/fonts/bootstrap/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/fonts/bootstrap/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/images/caret.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/images/caret.png -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/images/favicon.png -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/js/theme.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('readystatechange', (event) => { 2 | document.styleSheets[4].disabled = true; 3 | document.documentElement.setAttribute('data-theme', getTheme()); 4 | }); 5 | 6 | $(document).ready(function() { 7 | 8 | $('.fa-paper-plane-o').addClass('fa-paper-plane').removeClass('fa-paper-plane-o'); 9 | $('.fa-check-square-o').addClass('fa-check-square').removeClass('fa-check-square-o'); 10 | $('.fa-plus-square-o').addClass('fa-plus-square-o').removeClass('fa-plus-square-o'); 11 | $('.fa-folder-o').addClass('fa-folder-o').removeClass('fa-folder-o'); 12 | $('.fa-square-o').addClass('fa-square').removeClass('fa-square-o'); 13 | $('.fa-building-o').addClass('fa-microchip').removeClass('fa-building-o'); 14 | $('.fa-map-signs').addClass('fa-network-wired').removeClass('fa-map-signs'); 15 | $('.fa-map').addClass('fa-chart-network').removeClass('fa-map'); 16 | $('.fa-expand').addClass('fa-network-wired').removeClass('fa-expand'); 17 | $('.fa-lock').addClass('fa-shield-check').removeClass('fa-lock'); 18 | $('.fa-clock-o').addClass('fa-clock').removeClass('fa-clocl-o'); 19 | $('.fa-refresh').addClass('fa-redo').removeClass('fa-refresh'); 20 | $('.glyphicon.glyphicon-fire').addClass('fa fa-route-highway').removeClass('glyphicon glyphicon-fire'); 21 | $('.fa-support').addClass('fa fa-question-circle').removeClass('fa-support'); 22 | $('.fa-plug').addClass('fa fa-plug') 23 | $('.fa').addClass('fal fa-lg').removeClass('fa'); 24 | }); 25 | 26 | function getTheme() { 27 | if (localStorage.getItem('theme')) {theme = localStorage.getItem('theme');} 28 | else theme = (window.matchMedia('(prefers-color-scheme: dark)').matches) ? 'dark' : 'light'; 29 | return theme; 30 | } 31 | 32 | function switchTheme(e) { 33 | if (e.target.checked) { 34 | document.documentElement.setAttribute('data-theme', 'dark'); 35 | localStorage.setItem('theme', 'dark'); 36 | } 37 | else { 38 | document.documentElement.setAttribute('data-theme', 'light'); 39 | localStorage.setItem('theme', 'light'); 40 | } 41 | }; 42 | 43 | -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-brands-400.woff -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-duotone-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-duotone-900.ttf -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-duotone-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-duotone-900.woff -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-duotone-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-duotone-900.woff2 -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-light-300.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-light-300.ttf -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-light-300.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-light-300.woff -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-light-300.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-light-300.woff2 -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-regular-400.woff -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-solid-900.woff -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-thin-100.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-thin-100.ttf -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-thin-100.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-thin-100.woff -------------------------------------------------------------------------------- /misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-thin-100.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-dracula-community/src/opnsense/www/themes/dracula/build/webfonts/fa-thin-100.woff2 -------------------------------------------------------------------------------- /misc/theme-solarized-community/Makefile: -------------------------------------------------------------------------------- 1 | PLUGIN_NAME= theme-solarized-community 2 | PLUGIN_VERSION= 0.4 3 | PLUGIN_REVISION= 1 4 | PLUGIN_COMMENT= Solarized theme - tracking OS dark mode 5 | PLUGIN_MAINTAINER= mihak09@gmail.com 6 | 7 | .include "../../Mk/plugins.mk" 8 | -------------------------------------------------------------------------------- /misc/theme-solarized-community/pkg-descr: -------------------------------------------------------------------------------- 1 | The Solarized theme allows inverting color scheme 2 | from dark to bright - by injecting a theme toggle 3 | in the top right corner. It defaults to the default 4 | preference of the OS (Mac or Windows) 5 | 6 | Colors and the dark/light flipping concept taken 7 | from https://ethanschoonover.com/solarized/ 8 | 9 | -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/css/bootstrap-dialog.css: -------------------------------------------------------------------------------- 1 | .modal-backdrop { 2 | z-index: -1; 3 | } 4 | .bootstrap-dialog { 5 | /* dialog types */ 6 | /** 7 | * Icon animation 8 | * Copied from font-awesome: http://fontawesome.io/ 9 | **/ 10 | /** End of icon animation **/ 11 | } 12 | .bootstrap-dialog .modal-header { 13 | border-top-left-radius: 4px; 14 | border-top-right-radius: 4px; 15 | } 16 | .bootstrap-dialog .bootstrap-dialog-title { 17 | color: #fff; 18 | display: inline-block; 19 | } 20 | .bootstrap-dialog .bootstrap-dialog-button-icon { 21 | margin-right: 3px; 22 | } 23 | .bootstrap-dialog .bootstrap-dialog-close-button { 24 | float: right; 25 | filter: alpha(opacity=90); 26 | -moz-opacity: 0.9; 27 | -khtml-opacity: 0.9; 28 | opacity: 0.9; 29 | } 30 | .bootstrap-dialog .bootstrap-dialog-close-button:hover { 31 | cursor: pointer; 32 | filter: alpha(opacity=100); 33 | -moz-opacity: 1; 34 | -khtml-opacity: 1; 35 | opacity: 1; 36 | } 37 | .bootstrap-dialog.type-default .modal-header { 38 | background-color: #fff; 39 | } 40 | .bootstrap-dialog.type-default .bootstrap-dialog-title { 41 | color: #333; 42 | } 43 | .bootstrap-dialog.type-info .modal-header { 44 | background-color: #B0CDDB; 45 | } 46 | .bootstrap-dialog.type-primary .modal-header { 47 | background-color: #EA7105; 48 | } 49 | .bootstrap-dialog.type-success .modal-header { 50 | background-color: #9BD275; 51 | } 52 | .bootstrap-dialog.type-warning .modal-header { 53 | background-color: #f0ad4e; 54 | } 55 | .bootstrap-dialog.type-danger .modal-header { 56 | background-color: #d9534f; 57 | } 58 | .bootstrap-dialog.size-large .bootstrap-dialog-title { 59 | font-size: 24px; 60 | } 61 | .bootstrap-dialog.size-large .bootstrap-dialog-close-button { 62 | font-size: 30px; 63 | } 64 | .bootstrap-dialog.size-large .bootstrap-dialog-message { 65 | font-size: 18px; 66 | } 67 | .bootstrap-dialog .icon-spin { 68 | display: inline-block; 69 | -moz-animation: spin 2s infinite linear; 70 | -o-animation: spin 2s infinite linear; 71 | -webkit-animation: spin 2s infinite linear; 72 | animation: spin 2s infinite linear; 73 | } 74 | @-moz-keyframes spin { 75 | 0% { 76 | -moz-transform: rotate(0deg); 77 | } 78 | 100% { 79 | -moz-transform: rotate(359deg); 80 | } 81 | } 82 | @-webkit-keyframes spin { 83 | 0% { 84 | -webkit-transform: rotate(0deg); 85 | } 86 | 100% { 87 | -webkit-transform: rotate(359deg); 88 | } 89 | } 90 | @-o-keyframes spin { 91 | 0% { 92 | -o-transform: rotate(0deg); 93 | } 94 | 100% { 95 | -o-transform: rotate(359deg); 96 | } 97 | } 98 | @-ms-keyframes spin { 99 | 0% { 100 | -ms-transform: rotate(0deg); 101 | } 102 | 100% { 103 | -ms-transform: rotate(359deg); 104 | } 105 | } 106 | @keyframes spin { 107 | 0% { 108 | transform: rotate(0deg); 109 | } 110 | 100% { 111 | transform: rotate(359deg); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/css/colors.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | :root { 3 | --base3: #fdf6e3; 4 | --base2: #eee8d5; 5 | --base1: #93a1a1; 6 | --base0: #839496; 7 | --base00:#657b83; 8 | --base01:#586e75; 9 | --base02:#073642; 10 | --base03:#002b36; 11 | 12 | --accent:#e55800; 13 | 14 | --yellow: #b58900; 15 | --orange: #e55800; 16 | --red: #dc322f; 17 | --magenta:#d33682; 18 | --violet: #6c71c4; 19 | --blue: #278bd3; 20 | --cyan: #2aa198; 21 | --green: #859900; 22 | 23 | --fa-primary-color: var(--base02); 24 | --fa-secondary-color: var(--base03); 25 | } 26 | -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/css/dark.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | :root { 3 | --b3:var(--base03); 4 | --b2:var(--base02); 5 | --b1:var(--base01); 6 | --b0:var(--base00); 7 | --b00:var(--base0); 8 | --b01:var(--base1); 9 | --b02:var(--base2); 10 | --b03:var(--base3); 11 | } 12 | 13 | 14 | [data-theme="dark"] { 15 | --b3:var(--base03); 16 | --b2:var(--base02); 17 | --b1:var(--base01); 18 | --b0:var(--base00); 19 | --b00:var(--base0); 20 | --b01:var(--base1); 21 | --b02:var(--base2); 22 | --b03:var(--base3); 23 | } 24 | 25 | [data-theme="light"] { 26 | --b3:var(--base3); 27 | --b2:var(--base2); 28 | --b1:var(--base1); 29 | --b0:var(--base0); 30 | --b00:var(--base00); 31 | --b01:var(--base01); 32 | --b02:var(--base02); 33 | --b03:var(--base03); 34 | }; 35 | -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/css/light.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | :root { 3 | --b3:var(--base3); 4 | --b2:var(--base2); 5 | --b1:var(--base1); 6 | --b0:var(--base0); 7 | --b00:var(--base00); 8 | --b01:var(--base01); 9 | --b02:var(--base02); 10 | --b03:var(--base03); 11 | } 12 | 13 | 14 | [data-theme="dark"] { 15 | --b3:var(--base03); 16 | --b2:var(--base02); 17 | --b1:var(--base01); 18 | --b0:var(--base00); 19 | --b00:var(--base0); 20 | --b01:var(--base1); 21 | --b02:var(--base2); 22 | --b03:var(--base3); 23 | } 24 | 25 | [data-theme="light"] { 26 | --b3:var(--base3); 27 | --b2:var(--base2); 28 | --b1:var(--base1); 29 | --b0:var(--base0); 30 | --b00:var(--base00); 31 | --b01:var(--base01); 32 | --b02:var(--base02); 33 | --b03:var(--base03); 34 | }; 35 | -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/fonts/bierstadt/bierstadt-bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/fonts/bierstadt/bierstadt-bold.ttf -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/fonts/bierstadt/bierstadt-italics.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/fonts/bierstadt/bierstadt-italics.ttf -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/fonts/bierstadt/bierstadt-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/fonts/bierstadt/bierstadt-regular.ttf -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/fonts/bootstrap/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/fonts/bootstrap/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/fonts/bootstrap/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/fonts/bootstrap/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/fonts/bootstrap/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/fonts/bootstrap/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/images/caret.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/images/caret.png -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/images/favicon.png -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/images/icon-logo.svg: -------------------------------------------------------------------------------- 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 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/js/theme.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('readystatechange', (event) => { 2 | document.styleSheets[4].disabled = true; 3 | document.documentElement.setAttribute('data-theme', getTheme()); 4 | }); 5 | 6 | $(document).ready(function() { 7 | 8 | $('.fa-building-o').addClass('fa-microchip').removeClass('fa-building-o'); 9 | $('.fa-map-signs').addClass('fa-network-wired').removeClass('fa-map-signs'); 10 | $('.fa-map').addClass('fa-chart-network').removeClass('fa-map'); 11 | $('.fa-expand').addClass('fa-network-wired').removeClass('fa-expand'); 12 | $('.fa-lock').addClass('fa-shield-check').removeClass('fa-lock'); 13 | $('.fa-clock-o').addClass('fa-clock').removeClass('fa-clocl-o'); 14 | $('.fa-refresh').addClass('fa-redo').removeClass('fa-refresh'); 15 | $('.glyphicon.glyphicon-fire').addClass('fa fa-route-highway').removeClass('glyphicon glyphicon-fire'); 16 | $('.fa-support').addClass('fa fa-question-circle').removeClass('fa-support'); 17 | $('.fa').addClass('fal fa-lg').removeClass('fa'); 18 | 19 | $('ul.nav.navbar-nav.navbar-right').append("
  • ") 20 | const toggleSwitch = document.querySelector('.theme-switch input[type="checkbox"]'); 21 | toggleSwitch.addEventListener('input', switchTheme); 22 | if (getTheme() === 'dark') {toggleSwitch.checked = true;} 23 | }); 24 | 25 | function getTheme() { 26 | if (localStorage.getItem('theme')) {theme = localStorage.getItem('theme');} 27 | else theme = (window.matchMedia('(prefers-color-scheme: dark)').matches) ? 'dark' : 'light'; 28 | return theme; 29 | } 30 | 31 | function switchTheme(e) { 32 | if (e.target.checked) { 33 | document.documentElement.setAttribute('data-theme', 'dark'); 34 | localStorage.setItem('theme', 'dark'); 35 | } 36 | else { 37 | document.documentElement.setAttribute('data-theme', 'light'); 38 | localStorage.setItem('theme', 'light'); 39 | } 40 | }; 41 | 42 | -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-brands-400.woff -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-duotone-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-duotone-900.ttf -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-duotone-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-duotone-900.woff -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-duotone-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-duotone-900.woff2 -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-light-300.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-light-300.ttf -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-light-300.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-light-300.woff -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-light-300.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-light-300.woff2 -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-regular-400.woff -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-solid-900.woff -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-thin-100.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-thin-100.ttf -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-thin-100.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-thin-100.woff -------------------------------------------------------------------------------- /misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-thin-100.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mimugmail/opn-repo/425f443888b6959dd915183d1f4d6c135b47d497/misc/theme-solarized-community/src/opnsense/www/themes/solarized/build/webfonts/fa-thin-100.woff2 -------------------------------------------------------------------------------- /net-mgmt/ipcheck-community/+POST_INSTALL: -------------------------------------------------------------------------------- 1 | if /usr/local/etc/rc.d/configd status > /dev/null; then 2 | /usr/local/etc/rc.d/configd restart 3 | /usr/local/etc/rc.configure_plugins 4 | fi 5 | -------------------------------------------------------------------------------- /net-mgmt/ipcheck-community/Makefile: -------------------------------------------------------------------------------- 1 | PLUGIN_NAME= ipcheck-community 2 | PLUGIN_VERSION= 0.3 3 | PLUGIN_COMMENT= Verification of public IP address 4 | PLUGIN_MAINTAINER= mihak09@gmail.com 5 | 6 | .include "../../Mk/plugins.mk" 7 | -------------------------------------------------------------------------------- /net-mgmt/ipcheck-community/pkg-descr: -------------------------------------------------------------------------------- 1 | Reporting / IP Check is a plugin that verifies 2 | what internet knows about exposed public IP 3 | addresses - works with IPv4 and IPv6. 4 | Includes widget. Only one API requires a (free) 5 | API key. 6 | *** 7 | It requires (at least) an access to ip4.seeip.org 8 | in order to identify the public IP address of 9 | OPNsense. Make sure that DNS resolver isn't blocking 10 | seeip.org domain. 11 | *** -------------------------------------------------------------------------------- /net-mgmt/ipcheck-community/src/opnsense/mvc/app/controllers/OPNsense/Ipcheck/Api/RunController.php: -------------------------------------------------------------------------------- 1 | configdpRun("ipcheck status"); 38 | } 39 | public function allAction() 40 | { 41 | return (new Backend())->configdpRun("ipcheck all"); 42 | } 43 | public function listAction() 44 | { 45 | return (new Backend())->configdpRun("ipcheck list"); 46 | } 47 | public function vpnapiAction() 48 | { 49 | return (new Backend())->configdpRun("ipcheck vpnapi"); 50 | } 51 | public function proxycheckAction() 52 | { 53 | return (new Backend())->configdpRun("ipcheck proxycheck"); 54 | } 55 | public function ip2proxyAction() 56 | { 57 | return (new Backend())->configdpRun("ipcheck ip2proxy"); 58 | } 59 | public function ip2locAction() 60 | { 61 | return (new Backend())->configdpRun("ipcheck ip2loc"); 62 | } 63 | public function ipqsAction() 64 | { 65 | return (new Backend())->configdpRun("ipcheck ipqs"); 66 | } 67 | public function onionooAction() 68 | { 69 | return (new Backend())->configdpRun("ipcheck onionoo"); 70 | } 71 | 72 | } -------------------------------------------------------------------------------- /net-mgmt/ipcheck-community/src/opnsense/mvc/app/controllers/OPNsense/Ipcheck/Api/SettingsController.php: -------------------------------------------------------------------------------- 1 | 5 | * 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright notice, 12 | * this list of conditions and the following disclaimer. 13 | * 14 | * 2. Redistributions in binary form must reproduce the above copyright 15 | * notice, this list of conditions and the following disclaimer in the 16 | * documentation and/or other materials provided with the distribution. 17 | * 18 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 19 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 20 | * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 21 | * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 22 | * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | namespace OPNsense\Ipcheck\Api; 32 | 33 | use OPNsense\Base\ApiMutableModelControllerBase; 34 | use OPNsense\Core\Config; 35 | use OPNsense\Base\UIModelGrid; 36 | use OPNsense\Core\Backend; 37 | 38 | class SettingsController extends ApiMutableModelControllerBase 39 | { 40 | protected static $internalModelClass = '\OPNsense\Ipcheck\Settings'; 41 | protected static $internalServiceTemplate = 'OPNsense/Ipcheck'; 42 | protected static $internalServiceEnabled = 'enabled'; 43 | protected static $internalModelName = 'settings'; 44 | } 45 | -------------------------------------------------------------------------------- /net-mgmt/ipcheck-community/src/opnsense/mvc/app/controllers/OPNsense/Ipcheck/IndexController.php: -------------------------------------------------------------------------------- 1 | view->pick('OPNsense/Ipcheck/index'); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /net-mgmt/ipcheck-community/src/opnsense/mvc/app/controllers/OPNsense/Ipcheck/SettingsController.php: -------------------------------------------------------------------------------- 1 | view->settingsForm = $this->getForm("settings"); 37 | $this->view->pick('OPNsense/Ipcheck/settings'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /net-mgmt/ipcheck-community/src/opnsense/mvc/app/controllers/OPNsense/Ipcheck/forms/settings.xml: -------------------------------------------------------------------------------- 1 |
    2 | 3 | settings.vpnapi 4 | 5 | checkbox 6 | vpnapi.io allows 100 requests per day without an API key 7 | 8 | 9 | settings.vpnapikey 10 | 11 | text 12 | true 13 | Increases daily limit from 100 to 1,000 requests. Get a free API key at https://vpnapi.io/signup 14 | 15 | 16 | settings.proxycheck 17 | 18 | checkbox 19 | proxycheck.io allows 100 requests per day without an API key 20 | 21 | 22 | settings.proxycheckkey 23 | 24 | text 25 | true 26 | Increases daily limit from 100 to 1,000 requests. Get a free API key at https://proxycheck.io/dashboard/ 27 | 28 | 29 | settings.ip2loc 30 | 31 | checkbox 32 | demo key allows 20 requests per day 33 | 34 | 35 | settings.ip2lockey 36 | 37 | text 38 | true 39 | Grants 5,000 credits. Get a free API key at https://ip2location.com/register?id=1005 40 | 41 | 42 | settings.ip2proxy 43 | 44 | checkbox 45 | demo key allows 20 requests per day 46 | 47 | 48 | settings.ip2proxykey 49 | 50 | text 51 | true 52 | Key grants 5,000 credits. Get a free API key at https://www.ip2location.com/web-service/ip2proxy 53 | 54 | 55 | 56 | settings.onionoo 57 | 58 | checkbox 59 | TOR relay directory API - unlimited requests 60 | 61 | 62 | 63 | settings.ipqs 64 | 65 | checkbox 66 | ipqualityscore.com allows 5,000 requsts per month with a free API key 67 | 68 | 69 | settings.ipqskey 70 | 71 | text 72 | Get a free API key at https://www.ipqualityscore.com/ 73 | 74 |
    75 | -------------------------------------------------------------------------------- /net-mgmt/ipcheck-community/src/opnsense/mvc/app/models/OPNsense/Ipcheck/Menu/Menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /net-mgmt/ipcheck-community/src/opnsense/mvc/app/models/OPNsense/Ipcheck/Settings.php: -------------------------------------------------------------------------------- 1 | 5 | All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | 10 | 1. Redistributions of source code must retain the above copyright notice, 11 | this list of conditions and the following disclaimer. 12 | 13 | 2. Redistributions in binary form must reproduce the above copyright 14 | notice, this list of conditions and the following disclaimer in the 15 | documentation and/or other materials provided with the distribution. 16 | 17 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 18 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 19 | AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 20 | AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | namespace OPNsense\Ipcheck; 30 | 31 | use OPNsense\Base\BaseModel; 32 | 33 | class Settings extends BaseModel 34 | { 35 | } 36 | -------------------------------------------------------------------------------- /net-mgmt/ipcheck-community/src/opnsense/mvc/app/models/OPNsense/Ipcheck/Settings.xml: -------------------------------------------------------------------------------- 1 | 2 | //OPNsense/ipcheck 3 | Ipcheck configuration 4 | 0.1 5 | 6 | 7 | 1 8 | Y 9 | 10 | 11 | N 12 | 13 | 14 | 15 | 1 16 | Y 17 | 18 | 19 | N 20 | 21 | 22 | 23 | 0 24 | Y 25 | 26 | 27 | ipqskey.check001 28 | 29 | 30 | 31 | 32 | N 33 | 34 | 35 | DependConstraint 36 | 37 | ipqs 38 | 39 | 40 | 41 | 42 | 43 | 44 | 0 45 | Y 46 | 47 | 48 | N 49 | 50 | 51 | 52 | 0 53 | Y 54 | 55 | 56 | N 57 | 58 | 59 | 60 | 0 61 | Y 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /net-mgmt/ipcheck-community/src/opnsense/mvc/app/views/OPNsense/Ipcheck/index.volt: -------------------------------------------------------------------------------- 1 | {# 2 | 3 | OPNsense® is Copyright © 2014 – 2018 by Deciso B.V. 4 | This file is Copyright © 2018 by Michael Muenz 5 | All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without modification, 8 | are permitted provided that the following conditions are met: 9 | 10 | 1. Redistributions of source code must retain the above copyright notice, 11 | this list of conditions and the following disclaimer. 12 | 13 | 2. Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | 17 | THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, 18 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 19 | AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 20 | AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | POSSIBILITY OF SUCH DAMAGE. 27 | 28 | #} 29 | Active APIs:
    30 | Vpnapi 31 | Proxycheck 32 | ip2location 33 | ip2proxy 34 | Onionoo 35 | IpQualityScore 36 | 37 |

    38 | 39 | 41 |

    42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 75 | 76 | 77 | 78 | 79 | 80 | 81 |
    72 | 73 | API details 74 |
    82 | 83 | 84 | 147 | -------------------------------------------------------------------------------- /net-mgmt/ipcheck-community/src/opnsense/mvc/app/views/OPNsense/Ipcheck/settings.volt: -------------------------------------------------------------------------------- 1 | {# 2 | 3 | OPNsense® is Copyright © 2014 – 2018 by Deciso B.V. 4 | This file is Copyright © 2018 by Michael Muenz 5 | All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without modification, 8 | are permitted provided that the following conditions are met: 9 | 10 | 1. Redistributions of source code must retain the above copyright notice, 11 | this list of conditions and the following disclaimer. 12 | 13 | 2. Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | 17 | THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, 18 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 19 | AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 20 | AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | POSSIBILITY OF SUCH DAMAGE. 27 | 28 | #} 29 | 30 |
    31 |
    32 |
    33 | {{ partial("layout_partials/base_form",['fields':settingsForm,'id':'frm_general_settings'])}} 34 |
    35 |
    36 | 37 |
    38 |
    39 |
    40 |
    41 | 42 | -------------------------------------------------------------------------------- /net-mgmt/ipcheck-community/src/opnsense/service/conf/actions.d/actions_ipcheck.conf: -------------------------------------------------------------------------------- 1 | [status] 2 | command:/usr/local/bin/python3 /usr/local/opnsense/scripts/OPNsense/ipcheck/ipcheck.py 3 | parameters: %s 4 | type:script_output 5 | 6 | [all] 7 | command:/usr/local/bin/python3 /usr/local/opnsense/scripts/OPNsense/ipcheck/ipcheck.py all 8 | parameters: %s 9 | type:script_output 10 | description: Refresh IPcheck 11 | 12 | [list] 13 | command:/usr/local/bin/python3 /usr/local/opnsense/scripts/OPNsense/ipcheck/ipcheck.py list 14 | parameters: 15 | type:script_output 16 | 17 | [vpnapi] 18 | command:/usr/local/bin/python3 /usr/local/opnsense/scripts/OPNsense/ipcheck/ipcheck.py vpnapi 19 | parameters: 20 | type:script_output 21 | message: Run vpnapi query 22 | 23 | [proxycheck] 24 | command:/usr/local/bin/python3 /usr/local/opnsense/scripts/OPNsense/ipcheck/ipcheck.py proxycheck 25 | parameters: 26 | type:script_output 27 | message: Run vpnapi query 28 | 29 | [ip2proxy] 30 | command:/usr/local/bin/python3 /usr/local/opnsense/scripts/OPNsense/ipcheck/ipcheck.py ip2proxy 31 | parameters: 32 | type:script_output 33 | message: Run ip2proxy query 34 | 35 | [ip2loc] 36 | command:/usr/local/bin/python3 /usr/local/opnsense/scripts/OPNsense/ipcheck/ipcheck.py ip2loc 37 | parameters: 38 | type:script_output 39 | message: Run ip2location query 40 | 41 | [ipqs] 42 | command:/usr/local/bin/python3 /usr/local/opnsense/scripts/OPNsense/ipcheck/ipcheck.py ipqs 43 | parameters: 44 | type:script_output 45 | message: Run IPQS query 46 | 47 | [onionoo] 48 | command:/usr/local/bin/python3 /usr/local/opnsense/scripts/OPNsense/ipcheck/ipcheck.py onionoo 49 | parameters: 50 | type:script_output 51 | message: Run onionoo query 52 | -------------------------------------------------------------------------------- /net-mgmt/ipcheck-community/src/www/widgets/include/ipcheck.inc: -------------------------------------------------------------------------------- 1 | 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 18 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 19 | * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 20 | * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | require_once("guiconfig.inc"); 30 | 31 | if ($_SERVER['REQUEST_METHOD'] === 'GET') { 32 | $pconfig = array(); 33 | $pconfig['ipcheckfilter'] = !empty($config['widgets']['ipcheckfilter']) ? explode(',', $config['widgets']['ipcheckfilter']) : array(); 34 | } elseif ($_SERVER['REQUEST_METHOD'] === 'POST') { 35 | $pconfig = $_POST; 36 | if (!empty($pconfig['ipcheckfilter'])) { 37 | $config['widgets']['ipcheckfilter'] = implode(',', $pconfig['ipcheckfilter']); 38 | } elseif (isset($config['widgets']['ipcheckfilter'])) { 39 | unset($config['widgets']['ipcheckfilter']); 40 | } 41 | write_config("Saved IPcheck Filters via Dashboard"); 42 | header(url_safe('Location: /index.php')); 43 | exit; 44 | } 45 | $options = ["address" => "IP address", 46 | "isp" => "Internet provider", 47 | "vpn" => "VPN/Proxy/TOR", 48 | "risk"=>"Risk score"]; 49 | ?> 50 | 51 | 90 | 91 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 |
    timestamp
    136 | 137 | 138 | 143 | -------------------------------------------------------------------------------- /net-mgmt/speedtest-community/Makefile: -------------------------------------------------------------------------------- 1 | PLUGIN_NAME= speedtest-community 2 | PLUGIN_VERSION= 0.9 3 | PLUGIN_REVISION= 6 4 | PLUGIN_COMMENT= Speedtest 5 | PLUGIN_MAINTAINER= miha.kralj@outlook.com 6 | 7 | .include "../../Mk/plugins.mk" 8 | -------------------------------------------------------------------------------- /net-mgmt/speedtest-community/pkg-descr: -------------------------------------------------------------------------------- 1 | An OPNsense wrapper for the speedtest CLI test. 2 | Plugin allows speedtests to be executed periodically 3 | through CRON, generates history of past tests, shows 4 | statistics (avg, min, max) for latency, download and 5 | upload results in the dashboard widget. -------------------------------------------------------------------------------- /net-mgmt/speedtest-community/src/opnsense/mvc/app/controllers/OPNsense/Speedtest/Api/DownloadController.php: -------------------------------------------------------------------------------- 1 | response->setStatusCode(200, "OK"); 39 | $this->response->setContentType('text/csv', 'UTF-8'); 40 | $this->response->setHeader("Content-Disposition", "attachment; filename=\"speedtest.csv\""); 41 | $data = file_get_contents(self::DATA_CSV); 42 | $this->response->setContent($data); 43 | } 44 | 45 | public function afterExecuteRoute($dispatcher) 46 | { 47 | $this->response->send(); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /net-mgmt/speedtest-community/src/opnsense/mvc/app/controllers/OPNsense/Speedtest/Api/ServiceController.php: -------------------------------------------------------------------------------- 1 | configdRun("speedtest version"); 38 | } 39 | 40 | public function serverlistAction() 41 | { 42 | return (new Backend())->configdRun("speedtest serverlist"); 43 | } 44 | 45 | public function runAction($serverid = 0) 46 | { 47 | return (new Backend())->configdpRun("speedtest run", [$serverid]); 48 | } 49 | 50 | public function showstatAction() 51 | { 52 | return (new Backend())->configdRun("speedtest showstat"); 53 | } 54 | 55 | public function showlogAction() 56 | { 57 | return (new Backend())->configdRun("speedtest showlog"); 58 | } 59 | 60 | public function showrecentAction() 61 | { 62 | return (new Backend())->configdRun("speedtest showrecent"); 63 | } 64 | 65 | public function deletelogAction() 66 | { 67 | return (new Backend())->configdRun("speedtest deletelog"); 68 | } 69 | 70 | public function installhttpAction() 71 | { 72 | return (new Backend())->configdRun("speedtest install-http"); 73 | } 74 | public function installsocketAction() 75 | { 76 | return (new Backend())->configdRun("speedtest install-socket"); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /net-mgmt/speedtest-community/src/opnsense/mvc/app/controllers/OPNsense/Speedtest/IndexController.php: -------------------------------------------------------------------------------- 1 | view->pick('OPNsense/Speedtest/index'); 37 | } 38 | public function installAction() 39 | { 40 | // pick the template to serve to our users. 41 | $this->view->pick('OPNsense/Speedtest/install'); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /net-mgmt/speedtest-community/src/opnsense/mvc/app/models/OPNsense/Speedtest/ACL/ACL.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Monitoring: Speedtest 4 | 5 | api/speedtest/service/* 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /net-mgmt/speedtest-community/src/opnsense/mvc/app/models/OPNsense/Speedtest/Menu/Menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /net-mgmt/speedtest-community/src/opnsense/mvc/app/models/OPNsense/Speedtest/Speedtest.php: -------------------------------------------------------------------------------- 1 | 2 | //OPNsense/speedtest 3 | 4 | Speedtest plugin 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /net-mgmt/speedtest-community/src/opnsense/scripts/OPNsense/speedtest/install_speedtest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright (C) 2021 Miha Kralj 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are met: 5 | # 6 | # 1. Redistributions of source code must retain the above copyright notice, 7 | # this list of conditions and the following disclaimer. 8 | # 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 14 | # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 15 | # AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 16 | # AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 17 | # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 18 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 19 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 20 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 21 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 22 | # POSSIBILITY OF SUCH DAMAGE. 23 | 24 | PYTHON_PKG_NAME=$(pkg info -x 'python3*' | grep 'python3' | sed -n 's/^python\([0-9]*\).*/py\1-speedtest-cli/p') 25 | OOKLA_URL=$(curl -s "https://www.speedtest.net/apps/cli" | xmllint --html --xpath "string(//*[@id='freebsd']/pre/code[7]/text())" - 2>/dev/null | awk -F'"' '{print $2}') 26 | 27 | if [ $1 = 'http' ] 28 | then 29 | pkg delete -y speedtest 30 | pkg install -f -y ${PYTHON_PKG_NAME} 31 | elif [ $1 = 'socket' ] 32 | then 33 | pkg delete -y ${PYTHON_PKG_NAME} 34 | pkg install -y libidn2 35 | pkg add -f ${OOKLA_URL} 36 | elif [ $1 = 'delete' ] 37 | then 38 | pkg delete -y speedtest 39 | pkg delete -y ${PYTHON_PKG_NAME} 40 | fi 41 | 42 | -------------------------------------------------------------------------------- /net-mgmt/speedtest-community/src/opnsense/scripts/OPNsense/speedtest/opn_speedtest.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python3 2 | # -*- coding: utf-8 -*- 3 | """ 4 | * Copyright (C) 2021 M. Kralj 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 18 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 19 | * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 20 | * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | """ 29 | import sys 30 | import csv 31 | import json 32 | import time 33 | import re 34 | import datetime 35 | from datetime import datetime 36 | import subprocess 37 | import statistics 38 | import os.path 39 | from os import path 40 | 41 | # A wrapper around speedtest.py CLI: get arrguments (if any), run the test, 42 | # store it in cvs, mirror the output that came from the test 43 | def is_int (n): 44 | try: 45 | int(n) 46 | return True 47 | except ValueError: 48 | return False 49 | 50 | #speedtest = "/usr/local/opnsense/scripts/OPNsense/speedtest/speedtest" 51 | speedtest = "speedtest" 52 | csvfile = "/usr/local/opnsense/scripts/OPNsense/speedtest/speedtest.csv" 53 | 54 | arg='' 55 | if len(sys.argv)>1: 56 | arg=str(sys.argv[1]) 57 | fields = ['Timestamp', 'ClientIp', 'ServerId', 'ServerName', 'Country', 'DlSpeed', 'UlSpeed', 'Latency', 'Link'] 58 | 59 | try: 60 | # if CSV doesn't exist, we make one 61 | p = not path.isfile(csvfile) 62 | if p: 63 | f = open(csvfile, 'a', encoding="utf-8") 64 | csv.writer(f,dialect='excel').writerow(fields) 65 | f.close() 66 | 67 | # parameter l or log - returning the last 50 entries from csv 68 | if arg=='l' or arg == 'log': 69 | array=[] 70 | f = open(csvfile, 'r', encoding="utf-8") 71 | data = csv.reader(f,dialect='excel') 72 | header = next(data) 73 | for row in data: 74 | #from timestamp to visual form 75 | row[0]=datetime.fromtimestamp(float(row[0])).isoformat() 76 | array.append(row) 77 | array=sorted(array, reverse=True) 78 | f.close() 79 | print(json.dumps(array[:50])) 80 | quit() 81 | 82 | # parameter r or recent - returning the last 1 entries from csv 83 | if arg=='r' or arg == 'recent': 84 | f = open(csvfile, 'r', encoding="utf-8") 85 | data = csv.reader(f,dialect='excel') 86 | header = next(data) 87 | row=[] 88 | for row in data: 89 | #from timestamp to visual form 90 | row[0]=datetime.fromtimestamp(float(row[0])).isoformat() 91 | f.close() 92 | out = { 93 | 'date': str(row[0]), 94 | 'server': row[2] + " " + row[3], 95 | 'download': row[5], 96 | 'upload': row[6], 97 | 'latency': row[7], 98 | 'url': row[8] 99 | } 100 | print(json.dumps(out)) 101 | quit() 102 | 103 | 104 | # parameter s or stat - return statistics 105 | if arg=='s' or arg=='stat': 106 | latencyarray = [] 107 | downloadarray = [] 108 | uploadarray = [] 109 | timearray = [] 110 | f = open(csvfile, 'r', encoding="utf-8") 111 | data = csv.reader(f,dialect='excel') 112 | line = 0 113 | for row in data: 114 | if line > 0: 115 | timearray.append(datetime.fromtimestamp(float(row[0]))) 116 | downloadarray.append(float(row[5])) 117 | uploadarray.append(float(row[6])) 118 | latencyarray.append(float(row[7])) 119 | line += 1 120 | line -= 1 121 | if line==0: 122 | latencyarray = [0] 123 | downloadarray = [0] 124 | uploadarray = [0] 125 | timearray = [0] 126 | avglat = statistics.mean(latencyarray) 127 | avgdl = statistics.mean(downloadarray) 128 | avgul = statistics.mean(uploadarray) 129 | out = { 130 | 'samples': line, 131 | 'period': { 132 | 'oldest': str(min(timearray)), 133 | 'youngest': str(max(timearray)), 134 | }, 135 | 'latency': { 136 | 'avg': round(statistics.mean(latencyarray),2), 137 | 'min': round(min(latencyarray),2), 138 | 'max': round(max(latencyarray),2), 139 | }, 140 | 'download': { 141 | 'avg': round(statistics.mean(downloadarray),2), 142 | 'min': round(min(downloadarray),2), 143 | 'max': round(max(downloadarray),2), 144 | }, 145 | 'upload': { 146 | 'avg': round(statistics.mean(uploadarray),2), 147 | 'min': round(min(uploadarray),2), 148 | 'max': round(max(uploadarray),2), 149 | } 150 | } 151 | print(json.dumps(out)) 152 | quit() 153 | 154 | # checking the version of speedtest 155 | version = subprocess.run([speedtest, "--version"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True).stdout.decode('utf-8') 156 | bin_version = version.find("Ookla")>0 157 | 158 | # parameter v or version - returning the version string 159 | if arg=='v' or arg == 'version': 160 | if bin_version: 161 | out={"version":"binary", "message":version.splitlines()[0]} 162 | else: 163 | out={"version":"cli", "message":version.splitlines()[0]+' '+version.splitlines()[1]} 164 | print(json.dumps(out)) 165 | quit() 166 | 167 | # parameter q or list - returning the list of servers available 168 | if arg=='t' or arg=='list': 169 | array=[] 170 | if bin_version: 171 | # when binary, we cut out the lat and lon of the server for consistency 172 | cmd = [speedtest, '--accept-license', '--accept-gdpr', '--servers', '-fjsonl'] 173 | serverlist = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True).stdout.decode('utf-8').splitlines() 174 | for line in serverlist: 175 | tt = json.loads(line) 176 | out = {'id':str(tt['id']), 'name':tt['name'], 'location':tt['location'], 'country':tt['country']} 177 | array.append(out) 178 | else: 179 | # when http, we reassemble the json from the text output; speedtest-cli can't return json list of servers 180 | cmd = [speedtest, '--list'] 181 | serverlist = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True).stdout.decode('utf-8').splitlines() 182 | for line in serverlist[1:11]: 183 | rec = re.split("\) | \(|, ", line) 184 | out = {'id':rec[0].strip(), "name":rec[1].strip(), "location":rec[2].strip()+", "+rec[3], "country":rec[4].strip()} 185 | array.append(out) 186 | print(json.dumps(array)) 187 | quit() 188 | # running code with no arguments or with '0' lets speedtest to decide what server to poll 189 | elif arg == '' or arg == '0': 190 | if bin_version: 191 | cmd = [speedtest, '--accept-license', '--accept-gdpr', '-fjson'] 192 | else: 193 | cmd = [speedtest, '--json', '--share'] 194 | # running code with integer: supply the argument as an ID of the seerver 195 | elif is_int(arg): 196 | if bin_version: 197 | cmd = [speedtest, '--accept-license', '--accept-gdpr', '-fjson', '-s'+arg] 198 | else: 199 | cmd = [speedtest, '--json', '--share', '--server', arg] 200 | # running the speedtest with the right parameters 201 | else: 202 | out={'error': str(arg)+" is invalid server id"} 203 | print(json.dumps(out)) 204 | quit() 205 | result = json.loads(subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True).stdout.decode('utf-8')) 206 | # assembling the output json to be consistent regarless of what came back from speedtest 207 | out = {} 208 | if bin_version: 209 | out['timestamp'] = result['timestamp'] 210 | out['clientip'] = result['interface']['externalIp'] 211 | out['serverid'] = result['server']['id'] 212 | out['servername'] = result['server']['name']+", "+result['server']['location'] 213 | out['country'] = result['server']['country'] 214 | out['latency'] = round(result['ping']['latency'],2) 215 | out['download'] = round(result['download']['bandwidth']/125000,2) 216 | out['upload'] = round(result['upload']['bandwidth']/125000,2) 217 | out['link'] = result['result']['url'] 218 | else: 219 | out['timestamp'] = result['timestamp'][:-8]+'Z' 220 | out['clientip'] = result['client']['ip'] 221 | out['serverid'] = result['server']['id'] 222 | out['servername'] = result['server']['sponsor']+', '+result['server']['name'] 223 | out['country'] = result['server']['country'] 224 | out['latency'] = round(result['ping'],2) 225 | out['download'] = round(result['download']/1000000,2) 226 | out['upload'] = round(result['upload']/1000000,2) 227 | out['link'] = result['share'][:-4] 228 | # datetime in CSV uses different format 229 | csvtime = datetime.strptime(out['timestamp'], "%Y-%m-%dT%H:%M:%SZ").timestamp() 230 | newrow = [csvtime, out['clientip'], out['serverid'], out['servername'], out['country'], out['download'], out['upload'], out['latency'], out['link']] 231 | # writing the newrow into csv 232 | f = open(csvfile, 'a', encoding="utf-8") 233 | write = csv.writer(f,dialect='excel') 234 | write.writerow(newrow) 235 | f.close() 236 | # returning the assembled json for further processing 237 | print(json.dumps(out), file=sys.stdout) 238 | except OSError or IOError: 239 | out={'version':'none', 'message':'No speedtest package installed'} 240 | print(json.dumps(out)) 241 | except subprocess.CalledProcessError as e: 242 | out={'error':'Speedtest server id '+str(arg)+" not recognized."} 243 | print(json.dumps(out)) -------------------------------------------------------------------------------- /net-mgmt/speedtest-community/src/opnsense/service/conf/actions.d/actions_speedtest.conf: -------------------------------------------------------------------------------- 1 | [version] 2 | command:/usr/local/bin/python3 /usr/local/opnsense/scripts/OPNsense/speedtest/opn_speedtest.py version 3 | parameters: 4 | type:script_output 5 | message: Displays speedtest version 6 | 7 | [serverlist] 8 | command:/usr/local/bin/python3 /usr/local/opnsense/scripts/OPNsense/speedtest/opn_speedtest.py list 9 | parameters: 10 | type:script_output 11 | message: List nearest speedtest servers (json) 12 | 13 | [run] 14 | command:/usr/local/bin/python3 /usr/local/opnsense/scripts/OPNsense/speedtest/opn_speedtest.py 15 | parameters: %s 16 | type:script_output 17 | message: Run speedtest with or without server id(json) 18 | description: Run speedtest [serverid] 19 | 20 | [showstat] 21 | command:/usr/local/bin/python3 /usr/local/opnsense/scripts/OPNsense/speedtest/opn_speedtest.py stat 22 | parameters: 23 | type:script_output 24 | message: Shows speedtest statistics 25 | 26 | [showlog] 27 | command:/usr/local/bin/python3 /usr/local/opnsense/scripts/OPNsense/speedtest/opn_speedtest.py log 28 | parameters: 29 | type:script_output 30 | message: Shows speedtest log (last 50 entries) 31 | 32 | [showrecent] 33 | command:/usr/local/bin/python3 /usr/local/opnsense/scripts/OPNsense/speedtest/opn_speedtest.py recent 34 | parameters: 35 | type:script_output 36 | message: Shows speedtest most recent log entry 37 | 38 | [deletelog] 39 | command:/bin/rm /usr/local/opnsense/scripts/OPNsense/speedtest/speedtest.csv 40 | parameters: 41 | type:script_output 42 | message: Delete the csv log file 43 | 44 | [install-http] 45 | command:/bin/sh /usr/local/opnsense/scripts/OPNsense/speedtest/install_speedtest.sh http 46 | parameters: 47 | type:script_output 48 | message: Install speedtest-http version from ports 49 | 50 | [install-socket] 51 | command:/bin/sh /usr/local/opnsense/scripts/OPNsense/speedtest/install_speedtest.sh socket 52 | parameters: 53 | type:script_output 54 | message: Install Ookla speedtest socket version 55 | -------------------------------------------------------------------------------- /net-mgmt/speedtest-community/src/opnsense/www/js/widgets/Metadata/Speedtest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Speedtest.js 4 | 5 | /api/speedtest/service/showrecent 6 | /api/speedtest/service/showstat 7 | 8 | 9 | Speedtest 10 | Most Recent 11 | Avg. Latency 12 | Avg. Download 13 | Avg. Upload 14 | 15 | 16 | -------------------------------------------------------------------------------- /net-mgmt/speedtest-community/src/opnsense/www/js/widgets/Speedtest.js: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) 2024 Deciso B.V. 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | /* 16 | * Copyright (C) 2024 Deciso B.V. 17 | * All rights reserved. 18 | * 19 | * Redistribution and use in source and binary forms, with or without 20 | * modification, are permitted provided that the following conditions are met: 21 | * 22 | * 1. Redistributions of source code must retain the above copyright notice, 23 | * this list of conditions and the following disclaimer. 24 | * 25 | * 2. Redistributions in binary form must reproduce the above copyright 26 | * notice, this list of conditions and the following disclaimer in the 27 | * documentation and/or other materials provided with the distribution. 28 | * 29 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 30 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 31 | * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 32 | * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 33 | * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 34 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 35 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 36 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 37 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | */ 40 | 41 | export default class Speedtest extends BaseTableWidget { 42 | constructor() { 43 | super(); 44 | this.tickTimeout = 3600; 45 | } 46 | getGridOptions() { 47 | return { 48 | }; 49 | } 50 | getMarkup() { 51 | let $container = $('
    '); 52 | let $Speedtesttable = this.createTable('speedtest-table', { 53 | headerPosition: 'left', 54 | }); 55 | $container.append($Speedtesttable); 56 | return $container; 57 | } 58 | 59 | async onWidgetTick() { 60 | const status_data = await this.ajaxCall('/api/speedtest/service/showstat'); 61 | const recent_data = await this.ajaxCall('/api/speedtest/service/showrecent'); 62 | $('#speedtest_most_recent').html(`${recent_data['date']} Down: ${recent_data['download']} Mbps
    (up: ${recent_data['upload']} Mbps, latency: ${recent_data['latency']} ms)`); 63 | $('#speedtest_avg_latency').html(`${status_data['latency']['avg']} ms (min: ${status_data['latency']['min']}, max: ${status_data['latency']['max']})`); 64 | $('#speedtest_avg_download').html(`${status_data['download']['avg']} Mbps (min: ${status_data['download']['min']}, max: ${status_data['download']['max']})`); 65 | $('#speedtest_avg_upload').html(`${status_data['upload']['avg']} Mbps (min: ${status_data['upload']['min']}, max: ${status_data['upload']['max']})`); 66 | } 67 | 68 | async onMarkupRendered() { 69 | $(`#${this.id}-title`).html(`${this.translations['title']}`); 70 | let rows = []; 71 | rows.push([[this.translations['most_recent']], $('').prop('outerHTML')]); 72 | rows.push([[this.translations['avg_latency']], $('').prop('outerHTML')]); 73 | rows.push([[this.translations['avg_download']], $('').prop('outerHTML')]); 74 | rows.push([[this.translations['avg_upload']], $('').prop('outerHTML')]); 75 | 76 | super.updateTable('speedtest-table', rows); 77 | } 78 | } 79 | 80 | -------------------------------------------------------------------------------- /net-mgmt/speedtest-community/src/www/widgets/include/speedtest.inc: -------------------------------------------------------------------------------- 1 | 29 | 42 | 43 | 44 | 45 | 46 | 47 | 48 |
    Most Recent:
    0 Mbps (upload: 0 Mbps)
    Avg Latency:
    0.00 ms (min: 0.00 ms, max: 0.00 ms)
    Avg Download:
    0 Mbps (min: 0 Mbps, max: 0 Mbps)
    Avg Upload:
    0 Mbps (min: 0 Mbps, max: 0 Mbps)
    49 | -------------------------------------------------------------------------------- /net-mgmt/unifi-maxit/Makefile: -------------------------------------------------------------------------------- 1 | PLUGIN_NAME= unifi-maxit 2 | PLUGIN_VERSION= 1.1 3 | PLUGIN_COMMENT= Unifi Controller 4 | PLUGIN_DEPENDS= unifi6 5 | PLUGIN_MAINTAINER= michael.muenz@max-it.de 6 | 7 | .include "../../Mk/plugins.mk" 8 | -------------------------------------------------------------------------------- /net-mgmt/unifi-maxit/pkg-descr: -------------------------------------------------------------------------------- 1 | Unifi Controller by m.a.x. it / mimugmail 2 | 3 | 4 | Plugin Changelog 5 | ================ 6 | 7 | 1.1 8 | 9 | * Pidfile fix 10 | * Notice in volt 11 | 12 | 1.0 13 | 14 | * Initial release 15 | -------------------------------------------------------------------------------- /net-mgmt/unifi-maxit/src/etc/inc/plugins.inc.d/unifi.inc: -------------------------------------------------------------------------------- 1 | 5 | * All rights reserved. 6 | * 7 | */ 8 | 9 | function unifi_services() 10 | { 11 | global $config; 12 | 13 | $services = array(); 14 | 15 | if (isset($config['OPNsense']['unifi']['general']['enabled']) && $config['OPNsense']['unifi']['general']['enabled'] == 1) { 16 | $services[] = array( 17 | 'description' => gettext('Unifi Controller'), 18 | 'configd' => array( 19 | 'restart' => array('unifi restart'), 20 | 'start' => array('unifi start'), 21 | 'stop' => array('unifi stop'), 22 | ), 23 | 'name' => 'unifi', 24 | 'pidfile' => '/var/run/unifi/unifi.pid', 25 | ); 26 | } 27 | 28 | return $services; 29 | } 30 | -------------------------------------------------------------------------------- /net-mgmt/unifi-maxit/src/opnsense/mvc/app/controllers/OPNsense/Unifi/Api/GeneralController.php: -------------------------------------------------------------------------------- 1 | 5 | * All rights reserved. 6 | */ 7 | 8 | namespace OPNsense\Unifi\Api; 9 | 10 | use OPNsense\Base\ApiMutableModelControllerBase; 11 | 12 | class GeneralController extends ApiMutableModelControllerBase 13 | { 14 | protected static $internalModelClass = '\OPNsense\Unifi\General'; 15 | protected static $internalModelName = 'general'; 16 | } 17 | -------------------------------------------------------------------------------- /net-mgmt/unifi-maxit/src/opnsense/mvc/app/controllers/OPNsense/Unifi/Api/ServiceController.php: -------------------------------------------------------------------------------- 1 | 5 | * All rights reserved. 6 | */ 7 | 8 | namespace OPNsense\Unifi\Api; 9 | 10 | use OPNsense\Base\ApiMutableServiceControllerBase; 11 | 12 | class ServiceController extends ApiMutableServiceControllerBase 13 | { 14 | protected static $internalServiceClass = '\OPNsense\Unifi\General'; 15 | protected static $internalServiceTemplate = 'OPNsense/Unifi'; 16 | protected static $internalServiceEnabled = 'enabled'; 17 | protected static $internalServiceName = 'unifi'; 18 | } 19 | -------------------------------------------------------------------------------- /net-mgmt/unifi-maxit/src/opnsense/mvc/app/controllers/OPNsense/Unifi/GeneralController.php: -------------------------------------------------------------------------------- 1 | 5 | * All rights reserved. 6 | */ 7 | 8 | namespace OPNsense\Unifi; 9 | 10 | class GeneralController extends \OPNsense\Base\IndexController 11 | { 12 | public function indexAction() 13 | { 14 | $this->view->generalForm = $this->getForm('general'); 15 | $this->view->pick('OPNsense/Unifi/general'); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /net-mgmt/unifi-maxit/src/opnsense/mvc/app/controllers/OPNsense/Unifi/forms/general.xml: -------------------------------------------------------------------------------- 1 |
    2 | 3 | general.enabled 4 | 5 | checkbox 6 | Enable or disable Unifi Controller 7 | 8 |
    9 | -------------------------------------------------------------------------------- /net-mgmt/unifi-maxit/src/opnsense/mvc/app/models/OPNsense/Unifi/ACL/ACL.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Services: Unifi 4 | 5 | ui/unifi/* 6 | api/unifi/* 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /net-mgmt/unifi-maxit/src/opnsense/mvc/app/models/OPNsense/Unifi/General.php: -------------------------------------------------------------------------------- 1 | 5 | * All rights reserved. 6 | */ 7 | 8 | namespace OPNsense\Unifi; 9 | 10 | use OPNsense\Base\BaseModel; 11 | 12 | class General extends BaseModel 13 | { 14 | } 15 | -------------------------------------------------------------------------------- /net-mgmt/unifi-maxit/src/opnsense/mvc/app/models/OPNsense/Unifi/General.xml: -------------------------------------------------------------------------------- 1 | 2 | //OPNsense/unifi/general 3 | Unifi general configuration 4 | 0.0.1 5 | 6 | 7 | 0 8 | Y 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /net-mgmt/unifi-maxit/src/opnsense/mvc/app/models/OPNsense/Unifi/Menu/Menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /net-mgmt/unifi-maxit/src/opnsense/mvc/app/views/OPNsense/Unifi/general.volt: -------------------------------------------------------------------------------- 1 | {# 2 | # Copyright (c) 2021 Michael Muenz 3 | # All rights reserved. 4 | #} 5 | 6 |
    7 | 11 | {{ partial("layout_partials/base_form",['fields':generalForm,'id':'frm_general_settings'])}} 12 |
    13 |
    14 | 15 |
    16 |
    17 | 18 | 40 | -------------------------------------------------------------------------------- /net-mgmt/unifi-maxit/src/opnsense/service/conf/actions.d/actions_unifi.conf: -------------------------------------------------------------------------------- 1 | [start] 2 | command:/usr/local/etc/rc.d/unifi start 3 | parameters: 4 | type:script 5 | message:starting Unifi 6 | 7 | [stop] 8 | command:/usr/local/etc/rc.d/unifi stop 9 | parameters: 10 | type:script 11 | message:stopping Unifi 12 | 13 | [restart] 14 | command:/usr/local/etc/rc.d/unifi restart 15 | parameters: 16 | type:script 17 | message:restarting Unifi 18 | 19 | [status] 20 | command:/usr/local/etc/rc.d/unifi status;exit 0 21 | parameters: 22 | type:script_output 23 | message:request Unifi status 24 | -------------------------------------------------------------------------------- /net-mgmt/unifi-maxit/src/opnsense/service/templates/OPNsense/Unifi/+TARGETS: -------------------------------------------------------------------------------- 1 | unifi:/etc/rc.conf.d/unifi 2 | -------------------------------------------------------------------------------- /net-mgmt/unifi-maxit/src/opnsense/service/templates/OPNsense/Unifi/unifi: -------------------------------------------------------------------------------- 1 | {% if helpers.exists('OPNsense.unifi.general.enabled') and OPNsense.unifi.general.enabled == '1' %} 2 | unifi_enable="YES" 3 | {% else %} 4 | unifi_enable="NO" 5 | {% endif %} 6 | -------------------------------------------------------------------------------- /ruleset.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Slightly enhanced version of the PSR2 standard 4 | 5 | 6 | 9 | 10 | *.css 11 | *.js 12 | 13 | -------------------------------------------------------------------------------- /sysutils/auto-recovery/Makefile: -------------------------------------------------------------------------------- 1 | PLUGIN_NAME= auto-recovery-community 2 | PLUGIN_VERSION= 1.0 3 | PLUGIN_COMMENT= A configuration rollback feature for OPNsense 4 | PLUGIN_MAINTAINER= opnsense@moov.de 5 | 6 | .include "../../Mk/plugins.mk" 7 | -------------------------------------------------------------------------------- /sysutils/auto-recovery/pkg-descr: -------------------------------------------------------------------------------- 1 | Set a timer to perform a rollback to a previous configuration state. 2 | It is a safety net when making critical configuration on a remote device. 3 | 4 | Plugin Changelog 5 | ================ 6 | 7 | 1.0 8 | 9 | * Initial release 10 | -------------------------------------------------------------------------------- /sysutils/auto-recovery/src/opnsense/mvc/app/controllers/OPNsense/AutoRecovery/Api/ServiceController.php: -------------------------------------------------------------------------------- 1 | general->action; 57 | if (!empty((string)$model->general->configd_command)) { 58 | // Replace spaces with colons before passing the value to configdRun(). 59 | $configdcmd = str_replace(' ', ':',(string)$model->general->configd_command); 60 | } else { 61 | $configdcmd = 'not_found'; 62 | } 63 | // Convert minutes to seconds 64 | $countdown = 60 * (string)$model->general->countdown; 65 | 66 | $backend = new Backend(); 67 | $response = $backend->configdRun("autorecovery countdown ${action} ${configdcmd} ${countdown}"); 68 | return array("response" => $response); 69 | } 70 | 71 | /** 72 | * get remaining time for current countdown 73 | * @return string 74 | */ 75 | public function timeAction() 76 | { 77 | $backend = new Backend(); 78 | $response = $backend->configdRun("autorecovery status"); 79 | return array("response" => $response); 80 | } 81 | 82 | /** 83 | * abort countdown 84 | * @return string 85 | */ 86 | public function abortAction() 87 | { 88 | $backend = new Backend(); 89 | $response = $backend->configdRun("autorecovery abort"); 90 | return array("response" => $response); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /sysutils/auto-recovery/src/opnsense/mvc/app/controllers/OPNsense/AutoRecovery/Api/SettingsController.php: -------------------------------------------------------------------------------- 1 | view->pick('OPNsense/AutoRecovery/index'); 44 | // fetch form data "general" in 45 | $this->view->generalForm = $this->getForm("general"); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /sysutils/auto-recovery/src/opnsense/mvc/app/controllers/OPNsense/AutoRecovery/forms/general.xml: -------------------------------------------------------------------------------- 1 |
    2 | 3 | 4 | header 5 | 6 | 7 | autorecovery.general.countdown 8 | 9 | text 10 | The number of minutes to wait before starting recovery procedures. 11 | 12 | 13 | autorecovery.general.action 14 | 15 | dropdown 16 | The recovery action that should be performed. 17 | 18 | 19 | 20 | header 21 | 22 | 23 | 24 | autorecovery.general.configd_command 25 | 26 | dropdown 27 | Select a pre-defined system command which should be run. 28 | 29 |
    30 | -------------------------------------------------------------------------------- /sysutils/auto-recovery/src/opnsense/mvc/app/models/OPNsense/AutoRecovery/ACL/ACL.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | System: Auto Recovery 4 | 5 | ui/autorecovery/* 6 | api/autorecovery/* 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /sysutils/auto-recovery/src/opnsense/mvc/app/models/OPNsense/AutoRecovery/AutoRecovery.php: -------------------------------------------------------------------------------- 1 | 2 | //OPNsense/AutoRecovery 3 | 1.0.0 4 | A configuration rollback functionality for OPNsense 5 | 6 | 7 | 8 | 10 9 | 1 10 | 11 | 10080 12 | Please specify a value between 1 and 10080 minutes. 13 | Y 14 | 15 | 16 | Y 17 | restore_reboot 18 | 19 | Restore config and reboot [default] 20 | Restore config and restart all services 21 | Restore config and run system command 22 | Restore config 23 | Reboot OPNsense 24 | Run system command 25 | Do nothing (for testing purpose) 26 | 27 | 28 | 29 | 30 | /(.){1,255}/ 31 | 32 | Select a command from the list. 33 | N 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /sysutils/auto-recovery/src/opnsense/mvc/app/models/OPNsense/AutoRecovery/Menu/Menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /sysutils/auto-recovery/src/opnsense/mvc/app/views/OPNsense/AutoRecovery/index.volt: -------------------------------------------------------------------------------- 1 | {# 2 | 3 | Copyright (C) 2023 Frank Wall 4 | OPNsense® is Copyright © 2014 – 2015 by Deciso B.V. 5 | All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without modification, 8 | are permitted provided that the following conditions are met: 9 | 10 | 1. Redistributions of source code must retain the above copyright notice, 11 | this list of conditions and the following disclaimer. 12 | 13 | 2. Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | 17 | THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, 18 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 19 | AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 20 | AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | POSSIBILITY OF SUCH DAMAGE. 27 | 28 | #} 29 | 30 | 89 | 90 |
    91 | {{ partial("layout_partials/base_form",['fields':generalForm,'id':'frm_GeneralSettings'])}} 92 |
    93 | 94 |
    95 |
    96 | 99 |

    {{ lang._('%sHOW IT WORKS:%s') | format('', '') }}

    100 |
      101 |
    • {{ lang._("Enter the countdown and choose a recovery action.") }}
    • 102 |
    • {{ lang._("Hit the Start Countdown button.") }}
    • 103 |
    • {{ lang._("Auto Recovery automatically creates a configuration backup and starts the countdown.") }}
    • 104 |
    • {{ lang._("The GUI will refresh and display the recovery time.") }}
    • 105 |
    • {{ lang._("When the countdown reaches 0, the selected recovery actions are performed.") }}
    • 106 |
    • {{ lang._("Depending on the selected recovery action, the previous configuration will be restored and all configuration changes since starting the countdown are lost.") }}
    • 107 |
    108 |
    109 | {{ lang._('%sPLEASE NOTE:%s Auto Recovery is a community plugin without support or guarantees. Auto Recovery can only restore the OPNsense system configuration to a previous state. It does not restore any other files nor does it revert any filesystem modifications. It certainly is not meant to replace a backup, nor does it protect against failed software upgrades.') | format('', '') }} 110 |
    111 | 112 | 113 |
    114 | -------------------------------------------------------------------------------- /sysutils/auto-recovery/src/opnsense/scripts/OPNsense/AutoRecovery/auto-recovery.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Copyright (c) 2023 Frank Wall 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions 7 | # are met: 8 | # 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 12 | # 2. Redistributions in binary form must reproduce the above copyright 13 | # notice, this list of conditions and the following disclaimer in the 14 | # documentation and/or other materials provided with the distribution. 15 | # 16 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | # SUCH DAMAGE. 27 | 28 | # Configuration variables. 29 | BASE_DIR='/var/etc/auto-recovery' 30 | ABORT_FILE="${BASE_DIR}/autorecover.abort" 31 | CONFIG_FILE='/conf/config.xml' 32 | CONFIG_BACKUP_FILE="${BASE_DIR}/config.xml_recover" 33 | CONFIG_ORIGINAL_FILE="${BASE_DIR}/config.xml_orig" 34 | COUNTDOWN=0 35 | SCRIPT_NAME='AutoRecovery' 36 | START_TIME="`date +%s`" 37 | STATE_FILE="${BASE_DIR}/countdown.state" 38 | VERBOSE=0 39 | 40 | # Possible recovery actions. 41 | DO_RESTORE=0 42 | DO_REBOOT=0 43 | DO_RELOAD=0 44 | DO_CONFIGD=0 45 | 46 | # Recovery commands. 47 | RESTORE_CMD='configctl template reload \*' 48 | REBOOT_CMD='configctl system reboot' 49 | RELOAD_CMD='configctl service reload all' 50 | CONFIGD_CMD='configctl' 51 | 52 | # Print usage information. 53 | usage() { 54 | echo "usage: `basename $0` COUNTDOWN_IN_SECONDS" 55 | } 56 | 57 | # Print fatal errors on STDERR and exit. 58 | fatal() { 59 | 1>&2 echo "[ERROR] $@" 60 | syslog $@ 61 | cleanup 62 | exit 1 63 | } 64 | 65 | # Print errors on STDERR. 66 | error() { 67 | 1>&2 echo "[ERROR] $@" 68 | syslog $@ 69 | } 70 | 71 | # Print message on STDOUT. 72 | log() { 73 | 1>&2 echo "$@" 74 | syslog $@ 75 | } 76 | 77 | # Print debug messages. 78 | verbose() { 79 | [ "$VERBOSE" = "1" ] && echo $@ 80 | } 81 | 82 | # Send message to syslog. 83 | syslog() { 84 | logger "${SCRIPT_NAME}: $@" 85 | } 86 | 87 | # Remove state information. 88 | cleanup() { 89 | rm -f $ABORT_FILE $STATE_FILE 90 | } 91 | 92 | # Check args. 93 | if [ "$#" -lt "1" ]; then 94 | usage 95 | exit 1 96 | fi 97 | 98 | # Get user input. 99 | while [ "$1" != "" ]; do 100 | case "$1" in 101 | --action*) 102 | RECOVERY_ACTION="`echo $1 | cut -d= -f2`" 103 | shift 104 | ;; 105 | --configd*) 106 | _tmp_cmd="${CONFIGD_CMD} `echo $1 | cut -d= -f2`" 107 | # Replace colons with spaces to restore correct configd command. 108 | CONFIGD_CMD="`echo ${_tmp_cmd} | sed -e 's/:/ /'`" 109 | shift 110 | ;; 111 | -v*) 112 | VERBOSE=1 113 | shift 114 | ;; 115 | *) 116 | COUNTDOWN=$1 117 | shift 118 | ;; 119 | esac 120 | done 121 | 122 | # Enable selected recovery actions. 123 | case "$RECOVERY_ACTION" in 124 | restore_reboot) 125 | DO_RESTORE=1 126 | DO_REBOOT=1 127 | ;; 128 | restore_reload) 129 | DO_RESTORE=1 130 | DO_RELOAD=1 131 | ;; 132 | restore_configd) 133 | DO_RESTORE=1 134 | DO_CONFIGD=1 135 | ;; 136 | restore) 137 | DO_RESTORE=1 138 | ;; 139 | reboot) 140 | DO_REBOOT=1 141 | ;; 142 | configd) 143 | DO_CONFIGD=1 144 | ;; 145 | noop) 146 | log "test mode enabled" 147 | ;; 148 | *) 149 | usage 150 | exit 1 151 | ;; 152 | esac 153 | 154 | # Verify args 155 | if [ "${COUNTDOWN}" -le 1 ]; then 156 | usage 157 | exit 1 158 | fi 159 | 160 | mkdir -p $BASE_DIR || fatal "Unable to create ${BASE_DIR}" 161 | 162 | # Save the current configuration. 163 | if [ "${DO_RESTORE}" == "1" ]; then 164 | cp $CONFIG_FILE $CONFIG_BACKUP_FILE 165 | if [ "$?" -gt "0" ]; then 166 | fatal "Unable to create a backup of the config file" 167 | fi 168 | fi 169 | 170 | # Calculate target time. 171 | TARGET_TIME="`expr $START_TIME + $COUNTDOWN`" 172 | 173 | # Start countdown. 174 | echo $TARGET_TIME > $STATE_FILE 175 | if [ "$?" -gt "0" ]; then 176 | fatal "Unable to create state file" 177 | fi 178 | log "Countdown initiated: ${COUNTDOWN} seconds remaining" 179 | 180 | # Main loop 181 | while [ 1 ]; do 182 | # Check if the countdown must be aborted. 183 | if [ -f "$ABORT_FILE" ]; then 184 | verbose "Found file: $ABORT_FILE" 185 | log "Countdown aborted on user request" 186 | cleanup 187 | exit 0 188 | fi 189 | 190 | # Check if target time is reached. 191 | cur_time="`date +%s`" 192 | if [ "$cur_time" -ge "$TARGET_TIME" ]; then 193 | log "Performing system recovery... (${RECOVERY_ACTION})" 194 | 195 | # Restore configuration backup. 196 | if [ "${DO_RESTORE}" == "1" ]; then 197 | log "Restoring configuration backup" 198 | 199 | # Perform an additional backup of the currently running configuration. 200 | # Just for extra safekeeping if the recovery process goes horribly wrong. 201 | cp $CONFIG_FILE $CONFIG_ORIGINAL_FILE 202 | 203 | # Restore the backup configuration. 204 | cp $CONFIG_BACKUP_FILE $CONFIG_FILE 205 | if [ "$?" -gt "0" ]; then 206 | fatal "Unable to restore config file" 207 | fi 208 | 209 | # Reload all templates. 210 | eval $RESTORE_CMD 211 | if [ "$?" -gt "0" ]; then 212 | error "Reload templates command exited with non-zero exit code" 213 | fi 214 | fi 215 | 216 | # Restart all services. 217 | if [ "${DO_RELOAD}" == "1" ]; then 218 | log "Restarting all services" 219 | eval $RELOAD_CMD 220 | if [ "$?" -gt "0" ]; then 221 | error "Restart services command exited with non-zero exit code" 222 | fi 223 | fi 224 | 225 | # Run configd command. 226 | if [ "${DO_CONFIGD}" == "1" ]; then 227 | log "Running system command: ${CONFIGD_CMD}" 228 | eval $CONFIGD_CMD 229 | if [ "$?" -gt "0" ]; then 230 | error "System command exited with non-zero exit code" 231 | fi 232 | fi 233 | 234 | # Reboot the system. 235 | if [ "${DO_REBOOT}" == "1" ]; then 236 | # Need to cleanup before issuing the reboot command, otherwise 237 | # the state file would not get removed. 238 | cleanup 239 | log "Rebooting the system" 240 | eval $REBOOT_CMD 241 | if [ "$?" -gt "0" ]; then 242 | error "Reboot command exited with non-zero exit code" 243 | fi 244 | fi 245 | 246 | cleanup 247 | exit 0 248 | fi 249 | 250 | # Print status information. 251 | remaining_time="`expr $TARGET_TIME - $cur_time`" 252 | verbose "Countdown: $remaining_time seconds" 253 | sleep 1 254 | done 255 | 256 | exit 0 257 | -------------------------------------------------------------------------------- /sysutils/auto-recovery/src/opnsense/service/conf/actions.d/actions_autorecovery.conf: -------------------------------------------------------------------------------- 1 | [countdown] 2 | command:/usr/sbin/daemon -f /usr/local/opnsense/scripts/OPNsense/AutoRecovery/auto-recovery.sh 3 | parameters:--action=%s --configd=%s %s 4 | type:script 5 | message:starting auto recovery countdown 6 | 7 | [abort] 8 | command:touch /var/etc/auto-recovery/autorecover.abort 9 | parameters: 10 | type:script_output 11 | message:aborting auto recovery countdown 12 | 13 | [status] 14 | command:cat /var/etc/auto-recovery/countdown.state 2>/dev/null || echo -1 15 | parameters: 16 | type:script_output 17 | message:requesting auto recovery status 18 | --------------------------------------------------------------------------------