diff --git a/docs/index.md b/docs/index.md index 553c47b12..0a9c84e10 100644 --- a/docs/index.md +++ b/docs/index.md @@ -75,9 +75,9 @@ BunkerWeb has a pro version to further improve the security of your applications We have centralised version management and support within the panel for greater ease of use. -More detailed information about this version can be found [by visiting our website](https://www.bunkerweb.io/#services?utm_campaign=self&utm_source=doc). +More detailed information about this version can be found [by visiting our website.](https://www.bunkerweb.io/#services?utm_campaign=self&utm_source=doc) -If you're interested, upgrade to the pro version in just a few clicks, [following the steps here.](https://panel.bunkerweb.io/?utm_campaign=self&utm_source=doc). +If you're interested, upgrade to the pro version in just a few clicks, [following the steps here.](https://panel.bunkerweb.io/?utm_campaign=self&utm_source=doc) Note that in the documentation, it will be mentioned when a feature is for the pro version. diff --git a/docs/plugins.md b/docs/plugins.md index 7bdbca341..cf9b6de7f 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -581,7 +581,7 @@ For example, you can get the request arguments in your template like this : ``` -You can power-up your plugin page with additionnal scripting with the **actions.py** file when sending a **POST /plugins/<*plugin_id*>**. +You can power-up your plugin page with additional scripting with the **actions.py** file when sending a **POST /plugins/<*plugin_id*>**. Here is what is send to the function : diff --git a/docs/quickstart-guide.md b/docs/quickstart-guide.md index 7f244430a..8c7794c39 100644 --- a/docs/quickstart-guide.md +++ b/docs/quickstart-guide.md @@ -2431,6 +2431,12 @@ By default, BunkerWeb will only listen on IPv4 addresses and won't use IPv6 for This quickstart is just a tiny fraction of the functionality that BunkerWeb has to offer. Be curious and see what else BunkerWeb has to offer. -The documentation shares free and professional features. The latter will be marked accordingly to avoid confusion. +You can take a detailed look at the many [plugins and settings available](settings.md) in this solution. -If you want to make the most of the solution, don't hesitate to [take a detailed look at the features from the panel.](https://panel.bunkerweb.io/?utm_campaign=self&utm_source=doc) +Details on the use of certain plugins can also be found on the [security tuning page.](security-tuning.md) + +For simplified use of the solution, don't hesitate to [try out the web UI.](web-ui.md) + +Please note that **BunkerWeb comes in both free and pro versions**, with pro features indicated to avoid confusion. + +If you'd like to find out more about the pro version, and use the solution to the full, [visit the panel.](https://panel.bunkerweb.io/?utm_campaign=self&utm_source=doc) diff --git a/docs/web-ui.md b/docs/web-ui.md index 5736aa9e5..531bd14cb 100644 --- a/docs/web-ui.md +++ b/docs/web-ui.md @@ -1729,7 +1729,7 @@ After a successful login/password combination, you will be prompted to enter you systemctl restart bunkerweb ``` -## Upgrade pro version +## Upgrade to PRO In case you have buy a pro version and you already have a BunkerWeb setup with an UI, you can update **pro settings** inside **global config page**. diff --git a/src/bw/Dockerfile b/src/bw/Dockerfile index dd79a1d96..c773f5a2a 100644 --- a/src/bw/Dockerfile +++ b/src/bw/Dockerfile @@ -67,8 +67,8 @@ RUN apk add --no-cache pcre bash python3 yajl && \ mkdir -p /var/www/html && \ mkdir -p /etc/bunkerweb && \ mkdir -p /data/cache && ln -s /data/cache /var/cache/bunkerweb && \ - for dir in $(echo "configs plugins") ; do mkdir -p "/data/${dir}" && ln -s "/data/${dir}" "/etc/bunkerweb/${dir}" ; done && \ - for dir in $(echo "configs/http configs/stream configs/server-http configs/server-stream configs/default-server-http configs/default-server-stream configs/modsec configs/modsec-crs") ; do mkdir "/data/${dir}" ; done && \ + for dir in $(echo "pro configs plugins") ; do mkdir -p "/data/${dir}" && ln -s "/data/${dir}" "/etc/bunkerweb/${dir}" ; done && \ + for dir in $(echo "pro/plugins configs/http configs/stream configs/server-http configs/server-stream configs/default-server-http configs/default-server-stream configs/modsec configs/modsec-crs") ; do mkdir "/data/${dir}" ; done && \ chown -R root:nginx /data /etc/nginx /var/cache/bunkerweb /etc/bunkerweb /var/tmp/bunkerweb /var/run/bunkerweb /var/log/bunkerweb /usr/bin/bwcli && \ chmod -R 770 /data /etc/nginx /var/cache/bunkerweb /var/tmp/bunkerweb /var/log/bunkerweb /var/run/bunkerweb && \ chmod 750 cli/main.py gen/main.py helpers/*.sh entrypoint.sh /usr/bin/bwcli deps/python/bin/* && \ diff --git a/src/bw/lua/bunkerweb/api.lua b/src/bw/lua/bunkerweb/api.lua index ec02a80b9..59df14b3b 100644 --- a/src/bw/lua/bunkerweb/api.lua +++ b/src/bw/lua/bunkerweb/api.lua @@ -128,6 +128,8 @@ api.global.POST["^/confs$"] = function(self) destination = "/etc/bunkerweb/configs" elseif self.ctx.bw.uri == "/plugins" then destination = "/etc/bunkerweb/plugins" + elseif self.ctx.bw.uri == "/pro_plugins" then + destination = "/etc/bunkerweb/pro/plugins" end local form, err = upload:new(4096) if not form then @@ -175,6 +177,8 @@ api.global.POST["^/custom_configs$"] = api.global.POST["^/confs$"] api.global.POST["^/plugins$"] = api.global.POST["^/confs$"] +api.global.POST["^/pro_plugins$"] = api.global.POST["^/confs$"] + api.global.POST["^/unban$"] = function(self) read_body() local data = get_body_data() diff --git a/src/common/confs/http.conf b/src/common/confs/http.conf index 6eef32804..06c27d3f3 100644 --- a/src/common/confs/http.conf +++ b/src/common/confs/http.conf @@ -40,7 +40,7 @@ resolver {{ DNS_RESOLVERS }} {% if USE_IPV6 == "no" %}ipv6=off{% endif %}; port_in_redirect off; # lua configs -lua_package_path "/usr/share/bunkerweb/lua/?.lua;/usr/share/bunkerweb/core/?.lua;/etc/bunkerweb/plugins/?.lua;/usr/share/bunkerweb/deps/lib/lua/?.lua;;"; +lua_package_path "/usr/share/bunkerweb/lua/?.lua;/usr/share/bunkerweb/core/?.lua;/etc/bunkerweb/plugins/?.lua;/etc/bunkerweb/pro/plugins/?.lua;/usr/share/bunkerweb/deps/lib/lua/?.lua;;"; lua_package_cpath "/usr/share/bunkerweb/deps/lib/?.so;/usr/share/bunkerweb/deps/lib/lua/?.so;;"; lua_ssl_trusted_certificate "/usr/share/bunkerweb/misc/root-ca.pem"; lua_ssl_verify_depth 2; diff --git a/src/common/confs/init-lua.conf b/src/common/confs/init-lua.conf index a8811b535..f5c13599b 100644 --- a/src/common/confs/init-lua.conf +++ b/src/common/confs/init-lua.conf @@ -41,7 +41,7 @@ init_by_lua_block { -- Load plugins into the datastore logger:log(NOTICE, "saving plugins into datastore ...") local plugins = {} - local plugin_paths = { "/usr/share/bunkerweb/core", "/etc/bunkerweb/plugins" } + local plugin_paths = { "/usr/share/bunkerweb/core", "/etc/bunkerweb/plugins", "/etc/bunkerweb/pro/plugins" } for i, plugin_path in ipairs(plugin_paths) do local paths = popen("find -L " .. plugin_path .. " -maxdepth 1 -type d ! -path " .. plugin_path) for path in paths:lines() do diff --git a/src/common/confs/init-stream-lua.conf b/src/common/confs/init-stream-lua.conf index 737238cb7..f9fa82873 100644 --- a/src/common/confs/init-stream-lua.conf +++ b/src/common/confs/init-stream-lua.conf @@ -41,7 +41,7 @@ init_by_lua_block { -- Load plugins into the datastore logger:log(NOTICE, "saving plugins into datastore ...") local plugins = {} - local plugin_paths = { "/usr/share/bunkerweb/core", "/etc/bunkerweb/plugins" } + local plugin_paths = { "/usr/share/bunkerweb/core", "/etc/bunkerweb/plugins", "/etc/bunkerweb/pro/plugins" } for i, plugin_path in ipairs(plugin_paths) do local paths = popen("find -L " .. plugin_path .. " -maxdepth 1 -type d ! -path " .. plugin_path) for path in paths:lines() do diff --git a/src/common/confs/stream.conf b/src/common/confs/stream.conf index a863fbbb0..62bf6fb4d 100644 --- a/src/common/confs/stream.conf +++ b/src/common/confs/stream.conf @@ -23,7 +23,7 @@ resolver_timeout 30s; tcp_nodelay on; # lua path and dicts -lua_package_path "/usr/share/bunkerweb/lua/?.lua;/usr/share/bunkerweb/core/?.lua;/etc/bunkerweb/plugins/?.lua;/usr/share/bunkerweb/deps/lib/lua/?.lua;;"; +lua_package_path "/usr/share/bunkerweb/lua/?.lua;/usr/share/bunkerweb/core/?.lua;/etc/bunkerweb/plugins/?.lua;/etc/bunkerweb/pro/plugins/?.lua;/usr/share/bunkerweb/deps/lib/lua/?.lua;;"; lua_package_cpath "/usr/share/bunkerweb/deps/lib/?.so;/usr/share/bunkerweb/deps/lib/lua/?.so;;"; lua_ssl_trusted_certificate "/usr/share/bunkerweb/misc/root-ca.pem"; lua_ssl_verify_depth 2; diff --git a/src/common/core/antibot/ui/template.html b/src/common/core/antibot/ui/template.html index 12afbca5f..649bcd513 100644 --- a/src/common/core/antibot/ui/template.html +++ b/src/common/core/antibot/ui/template.html @@ -68,7 +68,7 @@ -