diff --git a/.dockerignore b/.dockerignore index 37ad4766..cce31779 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,4 +3,4 @@ .vscode/ __pycache__ env -node_modules \ No newline at end of file +node_modules diff --git a/.github/workflows/dev-update-mmdb.yml b/.github/workflows/dev-update-mmdb.yml index 49f3c3b2..b8430b6c 100644 --- a/.github/workflows/dev-update-mmdb.yml +++ b/.github/workflows/dev-update-mmdb.yml @@ -23,7 +23,7 @@ jobs: cd src/bw/misc/ CURL_RETURN_CODE=0 CURL_OUTPUT=`curl -w httpcode=%{http_code} -s -o asn.mmdb.gz https://download.db-ip.com/free/dbip-asn-lite-$(date +%Y-%m).mmdb.gz 2> /dev/null` || CURL_RETURN_CODE=$? - if [ ${CURL_RETURN_CODE} -ne 0 ]; then + if [ ${CURL_RETURN_CODE} -ne 0 ]; then echo "Curl connection failed when downloading asn-lite mmdb file with return code - ${CURL_RETURN_CODE}" exit 1 else @@ -37,7 +37,7 @@ jobs: fi CURL_RETURN_CODE=0 CURL_OUTPUT=`curl -w httpcode=%{http_code} -s -o country.mmdb.gz https://download.db-ip.com/free/dbip-country-lite-$(date +%Y-%m).mmdb.gz 2> /dev/null` || CURL_RETURN_CODE=$? - if [ ${CURL_RETURN_CODE} -ne 0 ]; then + if [ ${CURL_RETURN_CODE} -ne 0 ]; then echo "Curl connection failed when downloading country-lite mmdb file with return code - ${CURL_RETURN_CODE}" exit 1 else diff --git a/.github/workflows/push-github.yml b/.github/workflows/push-github.yml index 8b564c8e..e0e2a862 100644 --- a/.github/workflows/push-github.yml +++ b/.github/workflows/push-github.yml @@ -56,7 +56,7 @@ jobs: body: | Documentation : https://docs.bunkerweb.io/${{ inputs.VERSION }}/ - Docker tags : + Docker tags : - BunkerWeb : `bunkerity/bunkerweb:${{ inputs.VERSION }}` or `ghcr.io/bunkerity/bunkerweb:${{ inputs.VERSION }}` - Scheduler : `bunkerity/bunkerweb-scheduler:${{ inputs.VERSION }}` or `ghcr.io/bunkerity/bunkerweb-scheduler:${{ inputs.VERSION }}` - Autoconf : `bunkerity/bunkerweb-autoconf:${{ inputs.VERSION }}` or `ghcr.io/bunkerity/bunkerweb-autoconf:${{ inputs.VERSION }}` @@ -64,7 +64,7 @@ jobs: Linux packages : https://packagecloud.io/app/bunkerity/bunkerweb/search?q=${{ inputs.VERSION }}&filter=all&dist= - Changelog : + Changelog : ${{ steps.getchangelog.outputs.content }} draft: true prerelease: ${{ inputs.PRERELEASE }} @@ -82,7 +82,7 @@ jobs: Documentation : https://docs.bunkerweb.io/${{ inputs.VERSION }}/ - Docker tags : + Docker tags : - BunkerWeb : `bunkerity/bunkerweb:${{ inputs.VERSION }}` or `ghcr.io/bunkerity/bunkerweb:${{ inputs.VERSION }}` - Scheduler : `bunkerity/bunkerweb-scheduler:${{ inputs.VERSION }}` or `ghcr.io/bunkerity/bunkerweb-scheduler:${{ inputs.VERSION }}` - Autoconf : `bunkerity/bunkerweb-autoconf:${{ inputs.VERSION }}` or `ghcr.io/bunkerity/bunkerweb-autoconf:${{ inputs.VERSION }}` diff --git a/.github/workflows/staging-tests.yml b/.github/workflows/staging-tests.yml index 71171b8a..27d3a4fa 100644 --- a/.github/workflows/staging-tests.yml +++ b/.github/workflows/staging-tests.yml @@ -50,7 +50,7 @@ jobs: if: inputs.TYPE == 'k8s' - run: | echo "$SECRET_KEY" > /tmp/.secret_key - openssl enc -d -in /tmp/terraform.tar.enc -aes-256-cbc -pbkdf2 -iter 100000 -md sha256 -pass file:/tmp/.secret_key -out /tmp/terraform.tar + openssl enc -d -in /tmp/terraform.tar.enc -aes-256-cbc -pbkdf2 -iter 100000 -md sha256 -pass file:/tmp/.secret_key -out /tmp/terraform.tar rm -f /tmp/.secret_key tar xf /tmp/terraform.tar -C / mkdir /tmp/reg diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..1c93f580 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,18 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +exclude: (^LICENSE.md$|^src/VERSION$|^src/(deps/src/|common/core/modsecurity/files/coreruleset/|ui/static/js/(editor/|utils/purify/|tsparticles\.bundle\.min\.js))|\.(svg|drawio|patch\d?|ascii|pem|tf|tftpl)$) +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-case-conflict + - id: detect-private-key + - id: end-of-file-fixer + - id: requirements-txt-fixer + - id: trailing-whitespace + + - repo: https://github.com/ambv/black + rev: 23.9.1 + hooks: + - id: black + language_version: python3.9 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c5e42fc..b8323adc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## v1.5.3 - +## v1.5.3 - - [BUGFIX] Fix BunkerWeb not loading his own settings after a docker restart - [BUGFIX] Fix Custom configs not following the service name after an update on the UI diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index a7fc73ed..d24a0dff 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -125,4 +125,4 @@ enforcement ladder](https://github.com/mozilla/diversity). For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at -https://www.contributor-covenant.org/translations. \ No newline at end of file +https://www.contributor-covenant.org/translations. diff --git a/README.md b/README.md index 0d02d3ff..2ae3e5dc 100644 --- a/README.md +++ b/README.md @@ -19,13 +19,13 @@

📓 Documentation - | + | 👨‍💻 Demo - | + | 🛡️ Examples - | + | 💬 Chat - | + | 📝 Forum | ⚙️ Configurator @@ -142,7 +142,7 @@ Another core component of BunkerWeb is the ModSecurity Web Application Firewall State of the current configuration of BunkerWeb is stored in a backend database which contains the following data : - Settings defined for all the services -- Custom configurations +- Custom configurations - BunkerWeb instances - Metadata about jobs execution - Cached files @@ -355,3 +355,8 @@ If you would like to contribute to the plugins you can read the [contributing gu # Security policy We take security bugs as serious issues and encourage responsible disclosure, see our [security policy](./SECURITY.md) for more information. + + +# Stargazers over time + +[![Stargazers over time](https://starchart.cc/bunkerity/bunkerweb.svg)](https://starchart.cc/bunkerity/bunkerweb) diff --git a/SECURITY.md b/SECURITY.md index 4727f3b5..f1679de3 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -14,4 +14,4 @@ Here is a non-exhaustive list of issues we consider as high risk : ## Bounty -To encourage responsible disclosure, we may reward you with a bounty at the sole discretion of the maintainers. \ No newline at end of file +To encourage responsible disclosure, we may reward you with a bounty at the sole discretion of the maintainers. diff --git a/docs/concepts.md b/docs/concepts.md index 4410c539..4c4cce88 100644 --- a/docs/concepts.md +++ b/docs/concepts.md @@ -143,4 +143,4 @@ In essence, the scheduler serves as the brain of BunkerWeb, orchestrating variou Depending on the integration approach, the execution environment of the scheduler may differ. In container-based integrations, the scheduler is executed within its dedicated container, providing isolation and flexibility. On the other hand, for Linux-based integrations, the scheduler is self-contained within the bunkerweb service, simplifying the deployment and management process. -By employing the scheduler, BunkerWeb streamlines the automation and coordination of essential tasks, enabling efficient and reliable operation of the entire system. \ No newline at end of file +By employing the scheduler, BunkerWeb streamlines the automation and coordination of essential tasks, enabling efficient and reliable operation of the entire system. diff --git a/docs/integrations.md b/docs/integrations.md index 2ab99ff7..59bc08ef 100644 --- a/docs/integrations.md +++ b/docs/integrations.md @@ -136,15 +136,15 @@ volumes: ``` For example, if you have a value of **100000**, the mapped UID/GID will be **100100** (100000 + 100) : - + ```shell mkdir bw-data && \ sudo chgrp 100100 bw-data && \ chmod 770 bw-data ``` - + Or if the folder already exists : - + ```shell sudo chgrp -R 100100 bw-data && \ chmod -R 770 bw-data @@ -188,7 +188,7 @@ By default, BunkerWeb container is listening (inside the container) on **8080/tc !!! warning "Privileged ports in rootless mode or when using podman" If you are using [Docker in rootless mode](https://docs.docker.com/engine/security/rootless) and want to redirect privileged ports (< 1024) like 80 and 443 to BunkerWeb, please refer to the prerequisites [here](https://docs.docker.com/engine/security/rootless/#exposing-privileged-ports). - + If you are using [podman](https://podman.io/) you can lower the minimum number for unprivileged ports : ```shell sudo sysctl net.ipv4.ip_unprivileged_port_start=1 @@ -465,7 +465,7 @@ As for the database volume, the documentation does not specify a specific approa !!! info "Database backend" Please be aware that our instructions assume you are using MariaDB as the default database backend, as configured by the `DATABASE_URI` setting. However, we understand that you may prefer to utilize alternative backends for your Docker integration. If that is the case, rest assured that other database backends are still possible. See docker-compose files in the [misc/integrations folder](https://github.com/bunkerity/bunkerweb/tree/v1.5.2/misc/integrations) folder of the repository for more information. - + Clustered database backends setup are out-of-the-scope of this documentation. Here is the stack boilerplate that you can deploy using `docker stack deploy` : @@ -638,7 +638,7 @@ Given the presence of multiple BunkerWeb instances, it is necessary to establish !!! info "Database backend" Please be aware that our instructions assume you are using MariaDB as the default database backend, as configured by the `DATABASE_URI` setting. However, we understand that you may prefer to utilize alternative backends for your Docker integration. If that is the case, rest assured that other database backends are still possible. See docker-compose files in the [misc/integrations folder](https://github.com/bunkerity/bunkerweb/tree/v1.5.2/misc/integrations) folder of the repository for more information. - + Clustered database backends setup are out-of-the-scope of this documentation. Please ensure that both the scheduler and autoconf services have access to the Kubernetes API. It is recommended to utilize [RBAC authorization](https://kubernetes.io/docs/reference/access-authn-authz/rbac/) for this purpose. @@ -985,7 +985,7 @@ To simplify the installation process, Linux package repositories for BunkerWeb a sudo apt update && \ sudo apt install -y bunkerweb=1.5.2 ``` - + To prevent upgrading NGINX and/or BunkerWeb packages when executing `apt upgrade`, you can use the following command : ```shell @@ -1022,7 +1022,7 @@ To simplify the installation process, Linux package repositories for BunkerWeb a sudo apt update && \ sudo apt install -y bunkerweb=1.5.2 ``` - + To prevent upgrading NGINX and/or BunkerWeb packages when executing `apt upgrade`, you can use the following command : ```shell @@ -1188,7 +1188,7 @@ the configuration of BunkerWeb is done by using specific role variables : List of supported providers : -- virtualbox +- virtualbox - libvirt !!! note "Supported Base Images" @@ -1253,4 +1253,4 @@ Vagrant.configure("2") do |config| # For libvirt # config.vm.provider "libvirt" end -``` \ No newline at end of file +``` diff --git a/docs/migrating.md b/docs/migrating.md index 6d67d57a..b2b0434e 100644 --- a/docs/migrating.md +++ b/docs/migrating.md @@ -38,4 +38,4 @@ See the list of [redis settings](settings.md#redis) and the corresponding docume ## Default values and new settings -The default value of some settings have changed and we have added many other settings, we recommend you read the [security tuning](security-tuning.md) and [settings](settings.md) sections of the documentation. \ No newline at end of file +The default value of some settings have changed and we have added many other settings, we recommend you read the [security tuning](security-tuning.md) and [settings](settings.md) sections of the documentation. diff --git a/docs/misc/pdf.js b/docs/misc/pdf.js index 23ef1c29..5314dfc0 100644 --- a/docs/misc/pdf.js +++ b/docs/misc/pdf.js @@ -13,7 +13,7 @@ console.log('Saving', url, 'to', pdfPath); // totalPages – total pages in the document headerHtml = `

- ${title} + ${title}
`; footerHtml = `
/
`; @@ -46,4 +46,4 @@ footerHtml = `
-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/docs/plugins.md b/docs/plugins.md index ccb84666..cad2e93e 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -218,7 +218,7 @@ The first step is to install the plugin by putting the plugin files inside the c === "Ansible" When using the [Ansible integration](integrations.md#ansible), you can use the `plugins` variable to set a local folder containing your plugins that will be copied to your BunkerWeb instances. - + Let's assume that you have plugins inside the `bunkerweb-plugins` folder : ```shell @@ -231,7 +231,7 @@ The first step is to install the plugin by putting the plugin files inside the c [mybunkers] 192.168.0.42 ... custom_plugins="{{ playbook_dir }}/bunkerweb-plugins" ``` - + Or alternatively, in your playbook file : ```yaml diff --git a/docs/quickstart-guide.md b/docs/quickstart-guide.md index 55a404dd..3b36042e 100644 --- a/docs/quickstart-guide.md +++ b/docs/quickstart-guide.md @@ -280,7 +280,7 @@ You will find more settings about reverse proxy in the [settings section](settin [mybunkers] 192.168.0.42 variables_env="{{ playbook_dir }}/my_variables.env" ``` - + Or alternatively, in your playbook file : ```yaml @@ -355,7 +355,7 @@ You will find more settings about reverse proxy in the [settings section](settin ```shell curl -H "Host: app1.example.com" http://ip-or-fqdn-of-server ``` - + If you are using HTTPS, you will need to play with SNI : ```shell @@ -716,7 +716,7 @@ You will find more settings about reverse proxy in the [settings section](settin [mybunkers] 192.168.0.42 variables_env="{{ playbook_dir }}/my_variables.env" ``` - + Or alternatively, in your playbook file : ```yaml @@ -1226,7 +1226,7 @@ For complete list of settings regarding `stream` mode, please refer to the [sett - 80:8080 # Keep it if you want to use Let's Encrypt automation - 10000:10000 # app1 - 20000:20000 # app2 - + ... ``` @@ -1450,14 +1450,14 @@ Some integrations provide more convenient ways to apply configurations, such as === "Docker" When using the [Docker integration](integrations.md#docker), you have two choices for the addition of custom configurations : - + - Using specific settings `*_CUSTOM_CONF_*` as environment variables (recommended) - Writing .conf files to the volume mounted on /data of the scheduler - + **Using settings** - + The settings to use must follow the pattern `_CUSTOM_CONF__` : - + - `` : optional primary server name if multisite mode is enabled and the config must be applied to a specific service - `` : the type of config, accepted values are `HTTP`, `DEFAULT_SERVER_HTTP`, `SERVER_HTTP`, `MODSEC`, `MODSEC_CRS`, `STREAM` and `SERVER_STREAM` - `` : the name of config without the .conf suffix @@ -1529,9 +1529,9 @@ Some integrations provide more convenient ways to apply configurations, such as When using labels with the Docker autoconf integration, you can only apply custom configurations for the corresponding web service. Applying **http**, **default-server-http**, **stream** or any global configurations (like **server-http** or **server-stream** for all services) is not possible : you will need to mount files for that purpose. The labels to use must follow the pattern `bunkerweb.CUSTOM_CONF__` : - + - `` : the type of config, accepted values are `SERVER_HTTP`, `MODSEC`, `MODSEC_CRS` and `SERVER_STREAM` - - `` : the name of config without the .conf suffix + - `` : the name of config without the .conf suffix Here is a dummy example using a docker-compose file : @@ -1553,13 +1553,13 @@ Some integrations provide more convenient ways to apply configurations, such as **Using files** The first thing to do is to create the folders : - + ```shell mkdir -p ./bw-data/configs/server-http ``` You can now write your configurations : - + ```shell echo "location /hello { default_type 'text/plain'; @@ -1568,7 +1568,7 @@ Some integrations provide more convenient ways to apply configurations, such as } }" > ./bw-data/configs/server-http/hello-world.conf ``` - + Because the scheduler runs as an unprivileged user with UID and GID 101, you will need to edit the permissions : ```shell @@ -1906,7 +1906,7 @@ BunkerWeb supports PHP using external or remote [PHP-FPM](https://www.php.net/ma find ./www -type f -exec chmod 0640 {} \; && \ find ./www -type d -exec chmod 0750 {} \; ``` - + When you start the BunkerWeb autoconf stack, mount the `www` folder into `/var/www/html` for the BunkerWeb container : ```yaml @@ -2064,7 +2064,7 @@ BunkerWeb supports PHP using external or remote [PHP-FPM](https://www.php.net/ma find /shared/www -type f -exec chmod 0640 {} \; && \ find /shared/www -type d -exec chmod 0750 {} \; ``` - + When you start the BunkerWeb stack, mount the `/shared/www` folder into `/var/www/html` for the BunkerWeb container : ```yaml @@ -2249,14 +2249,14 @@ BunkerWeb supports PHP using external or remote [PHP-FPM](https://www.php.net/ma app3.example.com_LOCAL_PHP=/run/php/php-fpm.sock app3.example.com_LOCAL_PHP_PATH=/var/www/html/app3.example.com ``` - + The `custom_site` variable can be used to specify a directory containing your application files (e.g : `www`) that will be copied to `/var/www/html` and the `custom_www_owner` variable contains the owner that should be set for the files and folders. Here is an example using the Ansible inventory (replace `www-data` with the user running the PHP-FPM service): ```ini [mybunkers] 192.168.0.42 variables_env="{{ playbook_dir }}/my_variables.env" custom_www="{{ playbook_dir }}/my_app" custom_www_owner="www-data" ``` - + Or alternatively, in your playbook file : ```yaml @@ -2354,7 +2354,7 @@ By default, BunkerWeb will only listen on IPv4 adresses and won't use IPv6 for n image: bunkerity/bunkerweb:1.5.2 environment: - USE_IPv6=yes - + ... networks: @@ -2399,7 +2399,7 @@ By default, BunkerWeb will only listen on IPv4 adresses and won't use IPv6 for n image: bunkerity/bunkerweb:1.5.2 environment: - USE_IPv6=yes - + ... networks: @@ -2410,6 +2410,6 @@ By default, BunkerWeb will only listen on IPv4 adresses and won't use IPv6 for n config: - subnet: fd00:13:37::/48 gateway: fd00:13:37::1 - + ... - ``` \ No newline at end of file + ``` diff --git a/docs/requirements.in b/docs/requirements.in index f1d804fc..e519d9a1 100644 --- a/docs/requirements.in +++ b/docs/requirements.in @@ -2,4 +2,4 @@ mkdocs==1.5.3 mkdocs-material==9.4.2 pytablewriter==1.1.0 mike==1.1.2 -mkdocs-print-site-plugin==2.3.6 \ No newline at end of file +mkdocs-print-site-plugin==2.3.6 diff --git a/docs/requirements.txt b/docs/requirements.txt index b2306d8c..ac84df06 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -431,6 +431,12 @@ regex==2023.8.8 \ requests==2.31.0 \ --hash=sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f \ --hash=sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1 + # via importlib-metadata + +# The following packages are considered to be unsafe in a requirements file: +setuptools==68.2.2 \ + --hash=sha256:4ac1475276d2f1c48684874089fefcd83bd7162ddaafb81fac866ba0db282a87 \ + --hash=sha256:b454a35605876da60632df1a60f736524eb73cc47bbc9f3f1ef1b644de74fd2a # via mkdocs-material six==1.16.0 \ --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ @@ -491,10 +497,4 @@ watchdog==3.0.0 \ zipp==3.17.0 \ --hash=sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31 \ --hash=sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0 - # via importlib-metadata - -# The following packages are considered to be unsafe in a requirements file: -setuptools==68.2.2 \ - --hash=sha256:4ac1475276d2f1c48684874089fefcd83bd7162ddaafb81fac866ba0db282a87 \ - --hash=sha256:b454a35605876da60632df1a60f736524eb73cc47bbc9f3f1ef1b644de74fd2a # via pytablewriter diff --git a/docs/robots.txt b/docs/robots.txt index 3a6a4a47..ace58387 100644 --- a/docs/robots.txt +++ b/docs/robots.txt @@ -1,4 +1,4 @@ User-agent: * Allow: /latest/ -Sitemap: https://docs.bunkerweb.io/latest/sitemap.xml \ No newline at end of file +Sitemap: https://docs.bunkerweb.io/latest/sitemap.xml diff --git a/docs/settings.md b/docs/settings.md index 051a63d8..4ee85745 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -539,4 +539,3 @@ Allow access based on internal and external IP/network/rDNS/ASN whitelists. |`WHITELIST_USER_AGENT_URLS`| |global |no |List of URLs, separated with spaces, containing good User-Agent to whitelist. | |`WHITELIST_URI` | |multisite|no |List of URI (PCRE regex), separated with spaces, to whitelist. | |`WHITELIST_URI_URLS` | |global |no |List of URLs, separated with spaces, containing bad URI to whitelist. | - diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 578c93fd..cc4bfe21 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -273,7 +273,7 @@ You can manually unban an IP which can be useful when doing some tests but it ne ```shell sudo bwcli unban 1.2.3.4 ``` - + ## Whitelisting If you have bots that need to access your website, the recommended way to avoid any false positive is to whitelist them using the [whitelisting feature](security-tuning.md#blacklisting-and-whitelisting). We don't recommend using the `WHITELIST_URI*` or `WHITELIST_USER_AGENT*` settings unless they are set to secret and unpredictable values. Common use cases are : @@ -284,4 +284,4 @@ If you have bots that need to access your website, the recommended way to avoid ## Timezone -When using container-based integrations, the timezone of the container may not match the one of the host machine. To resolve that, you can set the `TZ` environment variable to the timezone of your choice on your containers (e.g. `TZ=Europe/Paris`). You will find the list of timezone identifers [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). \ No newline at end of file +When using container-based integrations, the timezone of the container may not match the one of the host machine. To resolve that, you can set the `TZ` environment variable to the timezone of your choice on your containers (e.g. `TZ=Europe/Paris`). You will find the list of timezone identifers [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). diff --git a/docs/web-ui.md b/docs/web-ui.md index 4b1c0e55..2477f56a 100644 --- a/docs/web-ui.md +++ b/docs/web-ui.md @@ -945,4 +945,4 @@ Because the web UI is a web application, the recommended installation procedure ```shell systemctl restart bunkerweb - ``` \ No newline at end of file + ``` diff --git a/examples/authelia/variables.env b/examples/authelia/variables.env index 96a565ed..04c39eb9 100644 --- a/examples/authelia/variables.env +++ b/examples/authelia/variables.env @@ -30,4 +30,4 @@ app2.example.com_REVERSE_PROXY_HOST=http://app2.example.com app2.example.com_REVERSE_PROXY_AUTH_REQUEST=/authelia app2.example.com_REVERSE_PROXY_AUTH_REQUEST_SIGNIN_URL=https://auth.example.com/?rd=$scheme%3A%2F%2F$host$request_uri app2.example.com_REVERSE_PROXY_AUTH_REQUEST_SET=$user $upstream_http_remote_user;$groups $upstream_http_remote_groups;$name $upstream_http_remote_name;$email $upstream_http_remote_email -app2.example.com_REVERSE_PROXY_HEADERS=Remote-User $user;Remote-Groups $groups;Remote-Name $name;Remote-Email $email \ No newline at end of file +app2.example.com_REVERSE_PROXY_HEADERS=Remote-User $user;Remote-Groups $groups;Remote-Name $name;Remote-Email $email diff --git a/examples/authentik/.env b/examples/authentik/.env index 464014c7..1f5456b8 100644 --- a/examples/authentik/.env +++ b/examples/authentik/.env @@ -2,4 +2,4 @@ PG_PASS=changeme AUTHENTIK_SECRET_KEY=changeme AUTHENTIK_COOKIE_DOMAIN=example.com AUTHENTIK_BOOTSTRAP_PASSWORD=changeme -AUTHENTIK_BOOTSTRAP_TOKEN=changeme \ No newline at end of file +AUTHENTIK_BOOTSTRAP_TOKEN=changeme diff --git a/examples/behind-reverse-proxy/setup-linux.sh b/examples/behind-reverse-proxy/setup-linux.sh index ae1baf25..0edd7a72 100755 --- a/examples/behind-reverse-proxy/setup-linux.sh +++ b/examples/behind-reverse-proxy/setup-linux.sh @@ -21,4 +21,4 @@ systemctl stop bunkerweb systemctl stop haproxy systemctl start haproxy -echo "hello" > /var/www/html/index.html \ No newline at end of file +echo "hello" > /var/www/html/index.html diff --git a/examples/behind-reverse-proxy/variables.env b/examples/behind-reverse-proxy/variables.env index bf34f304..a7ae9b03 100644 --- a/examples/behind-reverse-proxy/variables.env +++ b/examples/behind-reverse-proxy/variables.env @@ -3,4 +3,4 @@ DNS_RESOLVERS=8.8.8.8 8.8.4.4 SERVER_NAME=www.example.com # real IP settings USE_REAL_IP=yes -REAL_IP_FROM=127.0.0.0/8 \ No newline at end of file +REAL_IP_FROM=127.0.0.0/8 diff --git a/examples/bigbluebutton/docker-compose.yml b/examples/bigbluebutton/docker-compose.yml index f0622f0e..7063403d 100644 --- a/examples/bigbluebutton/docker-compose.yml +++ b/examples/bigbluebutton/docker-compose.yml @@ -84,4 +84,4 @@ networks: driver: default config: - subnet: 10.20.30.0/24 - bw-docker: \ No newline at end of file + bw-docker: diff --git a/examples/certbot-dns-ovh/entrypoint.sh b/examples/certbot-dns-ovh/entrypoint.sh index 0283814c..9276028f 100644 --- a/examples/certbot-dns-ovh/entrypoint.sh +++ b/examples/certbot-dns-ovh/entrypoint.sh @@ -20,4 +20,4 @@ chown -R 0:101 /etc/letsencrypt && chmod -R 770 /etc/letsencrypt echo "Certbot ended, sleeping for 24 hours" -sleep 86400 \ No newline at end of file +sleep 86400 diff --git a/examples/cors/setup-autoconf.sh b/examples/cors/setup-autoconf.sh index d759cf0f..3d7eb0a5 100755 --- a/examples/cors/setup-autoconf.sh +++ b/examples/cors/setup-autoconf.sh @@ -7,4 +7,4 @@ fi chown -R 33:101 ./www find ./www -type f -exec chmod 0640 {} \; -find ./www -type d -exec chmod 0750 {} \; \ No newline at end of file +find ./www -type d -exec chmod 0750 {} \; diff --git a/examples/cors/setup-docker.sh b/examples/cors/setup-docker.sh index d759cf0f..3d7eb0a5 100755 --- a/examples/cors/setup-docker.sh +++ b/examples/cors/setup-docker.sh @@ -7,4 +7,4 @@ fi chown -R 33:101 ./www find ./www -type f -exec chmod 0640 {} \; -find ./www -type d -exec chmod 0750 {} \; \ No newline at end of file +find ./www -type d -exec chmod 0750 {} \; diff --git a/examples/cors/setup-linux.sh b/examples/cors/setup-linux.sh index bbe51bae..aa048e8e 100755 --- a/examples/cors/setup-linux.sh +++ b/examples/cors/setup-linux.sh @@ -16,4 +16,4 @@ fi cp -r ./www/* /var/www/html chown -R $user:nginx /var/www/html find /var/www/html -type f -exec chmod 0640 {} \; -find /var/www/html -type d -exec chmod 0750 {} \; \ No newline at end of file +find /var/www/html -type d -exec chmod 0750 {} \; diff --git a/examples/cors/variables.env b/examples/cors/variables.env index a9558a60..db25d7dc 100644 --- a/examples/cors/variables.env +++ b/examples/cors/variables.env @@ -16,4 +16,4 @@ app1.example.com_LOCAL_PHP_PATH=/var/www/html/app1.example.com app2.example.com_LOCAL_PHP=/run/php/php-fpm.sock app2.example.com_LOCAL_PHP_PATH=/var/www/html/app2.example.com app3.example.com_LOCAL_PHP=/run/php/php-fpm.sock -app3.example.com_LOCAL_PHP_PATH=/var/www/html/app3.example.com \ No newline at end of file +app3.example.com_LOCAL_PHP_PATH=/var/www/html/app3.example.com diff --git a/examples/drupal/bw-data/configs/modsec-crs/drupal.conf b/examples/drupal/bw-data/configs/modsec-crs/drupal.conf index 24802a41..da9441ef 100644 --- a/examples/drupal/bw-data/configs/modsec-crs/drupal.conf +++ b/examples/drupal/bw-data/configs/modsec-crs/drupal.conf @@ -4,4 +4,4 @@ SecAction \ nolog,\ pass,\ t:none,\ - setvar:tx.crs_exclusions_drupal=1" \ No newline at end of file + setvar:tx.crs_exclusions_drupal=1" diff --git a/examples/drupal/setup-swarm.sh b/examples/drupal/setup-swarm.sh index 063f6d72..a62cfc60 100755 --- a/examples/drupal/setup-swarm.sh +++ b/examples/drupal/setup-swarm.sh @@ -10,4 +10,4 @@ docker config rm cfg_drupal_modsec_crs # create configs -docker config create -l bunkerweb.CONFIG_TYPE=modsec-crs -l bunkerweb.CONFIG_SITE=www.example.com cfg_drupal_modsec_crs ./bw-data/configs/modsec-crs/drupal.conf \ No newline at end of file +docker config create -l bunkerweb.CONFIG_TYPE=modsec-crs -l bunkerweb.CONFIG_SITE=www.example.com cfg_drupal_modsec_crs ./bw-data/configs/modsec-crs/drupal.conf diff --git a/examples/drupal/variables.env b/examples/drupal/variables.env index 23ec3d46..e2ad8014 100644 --- a/examples/drupal/variables.env +++ b/examples/drupal/variables.env @@ -10,4 +10,4 @@ USE_GZIP=yes LIMIT_REQ_URL_1=/core/install.php LIMIT_REQ_RATE_1=5r/s LOCAL_PHP=/run/php/php-fpm.sock -LOCAL_PHP_PATH=/var/www/html \ No newline at end of file +LOCAL_PHP_PATH=/var/www/html diff --git a/examples/gogs/bw-data/configs/modsec-crs/gogs.conf b/examples/gogs/bw-data/configs/modsec-crs/gogs.conf index 027241cb..f6f11c02 100644 --- a/examples/gogs/bw-data/configs/modsec-crs/gogs.conf +++ b/examples/gogs/bw-data/configs/modsec-crs/gogs.conf @@ -4,4 +4,4 @@ SecAction \ nolog,\ pass,\ t:none,\ - setvar:'tx.allowed_request_content_type=|application/x-www-form-urlencoded| |multipart/form-data| |multipart/related| |text/xml| |application/xml| |application/soap+xml| |application/x-amf| |application/json| |application/cloudevents+json| |application/cloudevents-batch+json| |application/octet-stream| |application/csp-report| |application/xss-auditor-report| |text/plain| |application/x-git-upload-pack-request| |application/x-git-receive-pack-request|'" \ No newline at end of file + setvar:'tx.allowed_request_content_type=|application/x-www-form-urlencoded| |multipart/form-data| |multipart/related| |text/xml| |application/xml| |application/soap+xml| |application/x-amf| |application/json| |application/cloudevents+json| |application/cloudevents-batch+json| |application/octet-stream| |application/csp-report| |application/xss-auditor-report| |text/plain| |application/x-git-upload-pack-request| |application/x-git-receive-pack-request|'" diff --git a/examples/gogs/setup-swarm.sh b/examples/gogs/setup-swarm.sh index 6bcabb2c..5266d70e 100755 --- a/examples/gogs/setup-swarm.sh +++ b/examples/gogs/setup-swarm.sh @@ -10,4 +10,4 @@ docker config rm cfg_gogs_modsec_crs # create configs -docker config create -l bunkerweb.CONFIG_TYPE=modsec-crs -l bunkerweb.CONFIG_SITE=www.example.com cfg_gogs_modsec_crs ./bw-data/configs/modsec-crs/gogs.conf \ No newline at end of file +docker config create -l bunkerweb.CONFIG_TYPE=modsec-crs -l bunkerweb.CONFIG_SITE=www.example.com cfg_gogs_modsec_crs ./bw-data/configs/modsec-crs/gogs.conf diff --git a/examples/joomla/variables.env b/examples/joomla/variables.env index 0fd50b4a..bad26da3 100644 --- a/examples/joomla/variables.env +++ b/examples/joomla/variables.env @@ -12,4 +12,4 @@ LIMIT_REQ_RATE_1=8r/s LIMIT_REQ_URL_2=/installation/index.php LIMIT_REQ_RATE_2=8r/s LOCAL_PHP=/run/php/php-fpm.sock -LOCAL_PHP_PATH=/var/www/html \ No newline at end of file +LOCAL_PHP_PATH=/var/www/html diff --git a/examples/magento/setup-swarm.sh b/examples/magento/setup-swarm.sh index d2aa8961..21c47b21 100755 --- a/examples/magento/setup-swarm.sh +++ b/examples/magento/setup-swarm.sh @@ -10,4 +10,4 @@ docker config rm cfg_magento_server_http # create configs -docker config create -l bunkerweb.CONFIG_TYPE=server-http -l bunkerweb.CONFIG_SITE=www.example.com cfg_magento_server_http ./bw-data/configs/server-http/buffering.conf \ No newline at end of file +docker config create -l bunkerweb.CONFIG_TYPE=server-http -l bunkerweb.CONFIG_SITE=www.example.com cfg_magento_server_http ./bw-data/configs/server-http/buffering.conf diff --git a/examples/mongo-express/bw-data/configs/modsec/mongo-express.conf b/examples/mongo-express/bw-data/configs/modsec/mongo-express.conf index 4a43bc4d..a992d086 100644 --- a/examples/mongo-express/bw-data/configs/modsec/mongo-express.conf +++ b/examples/mongo-express/bw-data/configs/modsec/mongo-express.conf @@ -1 +1 @@ -SecRule REQUEST_FILENAME "@rx ^/db" "id:1,ctl:ruleRemoveByTag=attack-generic,ctl:ruleRemoveByTag=attack-protocol,nolog" \ No newline at end of file +SecRule REQUEST_FILENAME "@rx ^/db" "id:1,ctl:ruleRemoveByTag=attack-generic,ctl:ruleRemoveByTag=attack-protocol,nolog" diff --git a/examples/mongo-express/setup-swarm.sh b/examples/mongo-express/setup-swarm.sh index 1b62e7ac..e8a7f6f6 100755 --- a/examples/mongo-express/setup-swarm.sh +++ b/examples/mongo-express/setup-swarm.sh @@ -10,4 +10,4 @@ docker config rm cfg_me_modsec # create configs -docker config create -l bunkerweb.CONFIG_TYPE=modsec -l bunkerweb.CONFIG_SITE=www.example.com cfg_me_modsec ./bw-data/configs/modsec/mongo-express.conf \ No newline at end of file +docker config create -l bunkerweb.CONFIG_TYPE=modsec -l bunkerweb.CONFIG_SITE=www.example.com cfg_me_modsec ./bw-data/configs/modsec/mongo-express.conf diff --git a/examples/nextcloud/bw-data/configs/modsec/nextcloud.conf b/examples/nextcloud/bw-data/configs/modsec/nextcloud.conf index 0f57eb89..bbe63e41 100644 --- a/examples/nextcloud/bw-data/configs/modsec/nextcloud.conf +++ b/examples/nextcloud/bw-data/configs/modsec/nextcloud.conf @@ -1 +1 @@ -SecRule REQUEST_FILENAME "@rx ^/remote.php/dav/files/" "id:2000,ctl:ruleRemoveByTag=attack-protocol,ctl:ruleRemoveByTag=attack-generic,nolog" \ No newline at end of file +SecRule REQUEST_FILENAME "@rx ^/remote.php/dav/files/" "id:2000,ctl:ruleRemoveByTag=attack-protocol,ctl:ruleRemoveByTag=attack-generic,nolog" diff --git a/examples/nextcloud/setup-swarm.sh b/examples/nextcloud/setup-swarm.sh index bfe39b83..7f1079a5 100755 --- a/examples/nextcloud/setup-swarm.sh +++ b/examples/nextcloud/setup-swarm.sh @@ -12,4 +12,4 @@ docker config rm cfg_nextcloud_modsec_crs # create configs docker config create -l bunkerweb.CONFIG_TYPE=modsec -l bunkerweb.CONFIG_SITE=www.example.com cfg_nextcloud_modsec ./bw-data/configs/modsec/nextcloud.conf -docker config create -l bunkerweb.CONFIG_TYPE=modsec-crs -l bunkerweb.CONFIG_SITE=www.example.com cfg_nextcloud_modsec_crs ./bw-data/configs/modsec-crs/nextcloud.conf \ No newline at end of file +docker config create -l bunkerweb.CONFIG_TYPE=modsec-crs -l bunkerweb.CONFIG_SITE=www.example.com cfg_nextcloud_modsec_crs ./bw-data/configs/modsec-crs/nextcloud.conf diff --git a/examples/nextcloud/variables.env b/examples/nextcloud/variables.env index 814bfa03..8a0f79b8 100644 --- a/examples/nextcloud/variables.env +++ b/examples/nextcloud/variables.env @@ -16,4 +16,4 @@ LIMIT_REQ_RATE_1=5r/s LIMIT_REQ_URL_2=/apps/text/session/sync LIMIT_REQ_RATE_2=8r/s LIMIT_REQ_URL_3=/core/preview -LIMIT_REQ_RATE_3=5r/s \ No newline at end of file +LIMIT_REQ_RATE_3=5r/s diff --git a/examples/php-cookie-flags/setup-linux.sh b/examples/php-cookie-flags/setup-linux.sh index 8d69ed38..ade3fe90 100755 --- a/examples/php-cookie-flags/setup-linux.sh +++ b/examples/php-cookie-flags/setup-linux.sh @@ -17,4 +17,4 @@ fi cp -r ./www/* /var/www/html chown -R $user:nginx /var/www/html find /var/www/html -type f -exec chmod 0640 {} \; -find /var/www/html -type d -exec chmod 0750 {} \; \ No newline at end of file +find /var/www/html -type d -exec chmod 0750 {} \; diff --git a/examples/php-cookie-flags/www/index.php b/examples/php-cookie-flags/www/index.php index 544b97c6..547b1e9a 100644 --- a/examples/php-cookie-flags/www/index.php +++ b/examples/php-cookie-flags/www/index.php @@ -17,4 +17,4 @@ if(!isset($_COOKIE[$cookie_name])) { ?> - \ No newline at end of file + diff --git a/examples/php-multisite/setup-linux.sh b/examples/php-multisite/setup-linux.sh index 8d69ed38..ade3fe90 100755 --- a/examples/php-multisite/setup-linux.sh +++ b/examples/php-multisite/setup-linux.sh @@ -17,4 +17,4 @@ fi cp -r ./www/* /var/www/html chown -R $user:nginx /var/www/html find /var/www/html -type f -exec chmod 0640 {} \; -find /var/www/html -type d -exec chmod 0750 {} \; \ No newline at end of file +find /var/www/html -type d -exec chmod 0750 {} \; diff --git a/examples/php-singlesite/setup-linux.sh b/examples/php-singlesite/setup-linux.sh index 8d69ed38..ade3fe90 100755 --- a/examples/php-singlesite/setup-linux.sh +++ b/examples/php-singlesite/setup-linux.sh @@ -17,4 +17,4 @@ fi cp -r ./www/* /var/www/html chown -R $user:nginx /var/www/html find /var/www/html -type f -exec chmod 0640 {} \; -find /var/www/html -type d -exec chmod 0750 {} \; \ No newline at end of file +find /var/www/html -type d -exec chmod 0750 {} \; diff --git a/examples/reverse-proxy-singlesite/bw-data/configs/server-http/redirects.conf b/examples/reverse-proxy-singlesite/bw-data/configs/server-http/redirects.conf index 9ddeb11c..2951a30f 100644 --- a/examples/reverse-proxy-singlesite/bw-data/configs/server-http/redirects.conf +++ b/examples/reverse-proxy-singlesite/bw-data/configs/server-http/redirects.conf @@ -1,4 +1,4 @@ port_in_redirect off; location ~ ^/(app1|app2)$ { rewrite ^(.*)$ $1/ permanent; -} \ No newline at end of file +} diff --git a/examples/swarm-configs/all-server-http.conf b/examples/swarm-configs/all-server-http.conf index efbe85f5..b762ddf3 100644 --- a/examples/swarm-configs/all-server-http.conf +++ b/examples/swarm-configs/all-server-http.conf @@ -3,4 +3,4 @@ location /hello { content_by_lua_block { ngx.say("hello") } -} \ No newline at end of file +} diff --git a/examples/swarm-configs/app1-server-http.conf b/examples/swarm-configs/app1-server-http.conf index 4ced8b37..8f1e218e 100644 --- a/examples/swarm-configs/app1-server-http.conf +++ b/examples/swarm-configs/app1-server-http.conf @@ -3,4 +3,4 @@ location /app1 { content_by_lua_block { ngx.say("app1") } -} \ No newline at end of file +} diff --git a/examples/swarm-configs/app2-server-http.conf b/examples/swarm-configs/app2-server-http.conf index 9f06ddbb..058238e4 100644 --- a/examples/swarm-configs/app2-server-http.conf +++ b/examples/swarm-configs/app2-server-http.conf @@ -3,4 +3,4 @@ location /app2 { content_by_lua_block { ngx.say("app2") } -} \ No newline at end of file +} diff --git a/examples/swarm-configs/app3-server-http.conf b/examples/swarm-configs/app3-server-http.conf index ae5a2ea8..57b44270 100644 --- a/examples/swarm-configs/app3-server-http.conf +++ b/examples/swarm-configs/app3-server-http.conf @@ -3,4 +3,4 @@ location /app3 { content_by_lua_block { ngx.say("app3") } -} \ No newline at end of file +} diff --git a/examples/swarm-configs/setup-swarm.sh b/examples/swarm-configs/setup-swarm.sh index b67ff3e5..42140793 100755 --- a/examples/swarm-configs/setup-swarm.sh +++ b/examples/swarm-configs/setup-swarm.sh @@ -16,4 +16,4 @@ docker config rm cfg_app3_server_http docker config create -l bunkerweb.CONFIG_TYPE=server-http cfg_all_server_http ./all-server-http.conf docker config create -l bunkerweb.CONFIG_TYPE=server-http -l bunkerweb.CONFIG_SITE=app1.example.com cfg_app1_server_http ./app1-server-http.conf docker config create -l bunkerweb.CONFIG_TYPE=server-http -l bunkerweb.CONFIG_SITE=app2.example.com cfg_app2_server_http ./app2-server-http.conf -docker config create -l bunkerweb.CONFIG_TYPE=server-http -l bunkerweb.CONFIG_SITE=app3.example.com cfg_app3_server_http ./app3-server-http.conf \ No newline at end of file +docker config create -l bunkerweb.CONFIG_TYPE=server-http -l bunkerweb.CONFIG_SITE=app3.example.com cfg_app3_server_http ./app3-server-http.conf diff --git a/examples/syslog/syslog-ng.conf b/examples/syslog/syslog-ng.conf index 687b3e5a..d4af5665 100644 --- a/examples/syslog/syslog-ng.conf +++ b/examples/syslog/syslog-ng.conf @@ -12,4 +12,4 @@ log { destination { file("/var/log/syslog"); }; -}; \ No newline at end of file +}; diff --git a/examples/wordpress/setup-swarm.sh b/examples/wordpress/setup-swarm.sh index 2b8c3a48..8df19b8d 100755 --- a/examples/wordpress/setup-swarm.sh +++ b/examples/wordpress/setup-swarm.sh @@ -10,4 +10,4 @@ docker config rm cfg_wordpress_modsec_crs # create configs -docker config create -l bunkerweb.CONFIG_TYPE=modsec-crs -l bunkerweb.CONFIG_SITE=www.example.com cfg_wordpress_modsec_crs ./bw-data/configs/modsec-crs/wordpress.conf \ No newline at end of file +docker config create -l bunkerweb.CONFIG_TYPE=modsec-crs -l bunkerweb.CONFIG_SITE=www.example.com cfg_wordpress_modsec_crs ./bw-data/configs/modsec-crs/wordpress.conf diff --git a/mkdocs.yml b/mkdocs.yml index cdd05b98..e7eba015 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -70,4 +70,4 @@ plugins: - search - print-site - mike: - canonical_version: latest \ No newline at end of file + canonical_version: latest diff --git a/pyproject.toml b/pyproject.toml index 3f586484..31d407c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,13 @@ [project] name = "BunkerWeb" description = "Make your web services secure by default !" -version = "1.4.3" +version = "1.5.2" authors = [ { name = "Bunkerity", email = "contact@bunkerity.com" } ] [tool.black] +py39 = true exclude = ''' /( | \.git @@ -14,4 +15,4 @@ exclude = ''' | src/common/core/modsecurity | env )/ -''' \ No newline at end of file +''' diff --git a/src/bw/loading/index.html b/src/bw/loading/index.html index 7f067eba..8770f5c1 100644 --- a/src/bw/loading/index.html +++ b/src/bw/loading/index.html @@ -9,7 +9,7 @@ rel="icon" href="data:image/svg+xml, %3Csvg version='1.0' xmlns='http://www.w3.org/2000/svg' width='96.000000pt' height='96.000000pt' viewBox='0 0 96.000000 96.000000' preserveAspectRatio='xMidYMid meet'%3E%3Cg transform='translate(0.000000,96.000000) scale(0.100000,-0.100000)'%0Afill='%23085577' stroke='none'%3E%3Cpath d='M535 863 c-22 -2 -139 -17 -260 -34 -228 -31 -267 -43 -272 -85 -2%0A-10 23 -181 55 -379 l57 -360 400 0 400 0 20 40 c16 31 20 59 19 125 -1 100%0A-24 165 -73 199 -41 29 -46 57 -22 111 30 67 29 188 -3 256 -13 28 -37 60 -53%0A72 -55 39 -169 62 -268 55z m-15 -348 c30 -16 60 -61 60 -90 0 -10 -8 -33 -17%0A-52 -16 -34 -16 -41 0 -116 9 -44 15 -82 12 -85 -6 -7 -92 -21 -131 -21 l-31%0A-1 -6 85 c-4 75 -8 89 -31 112 -20 20 -26 36 -26 70 0 38 5 50 34 79 39 39 86%0A45 136 19z'/%3E%3C/g%3E%3C/svg%3E" type="image/svg+xml" - /> + /> @@ -315,6 +315,6 @@ - + - \ No newline at end of file + diff --git a/src/common/confs/api.conf b/src/common/confs/api.conf index 8ee33565..bb7a8a88 100644 --- a/src/common/confs/api.conf +++ b/src/common/confs/api.conf @@ -1,6 +1,6 @@ server { server_name {{ API_SERVER_NAME }}; - + # HTTP listen listen {{ API_LISTEN_IP }}:{{ API_HTTP_PORT }}; {% if API_LISTEN_IP != "127.0.0.1" +%} diff --git a/src/common/confs/default-server-http.conf b/src/common/confs/default-server-http.conf index a0b702ad..f1d0b06f 100644 --- a/src/common/confs/default-server-http.conf +++ b/src/common/confs/default-server-http.conf @@ -33,7 +33,7 @@ server { # include core and plugins default-server configurations include /etc/nginx/default-server-http/*.conf; - + # include custom default-server configurations include /etc/bunkerweb/configs/default-server-http/*.conf; diff --git a/src/common/confs/dhparam b/src/common/confs/dhparam index 088f9673..9b182b72 100644 --- a/src/common/confs/dhparam +++ b/src/common/confs/dhparam @@ -5,4 +5,4 @@ MIIBCAKCAQEA//////////+t+FRYortKmq/cViAnPTzx2LnFg84tNpWp4TZBFGQz YdEIqUuyyOP7uWrat2DX9GgdT0Kj3jlN9K5W7edjcrsZCwenyO4KbXCeAvzhzffi 7MA0BM0oNC9hkXL+nOmFg/+OTxIy7vKBg8P+OxtMb61zO7X8vC7CIAXFjvGDfRaD ssbzSibBsu/6iGtCOGEoXJf//////////wIBAg== ------END DH PARAMETERS----- \ No newline at end of file +-----END DH PARAMETERS----- diff --git a/src/common/confs/healthcheck.conf b/src/common/confs/healthcheck.conf index f8519f06..28701353 100644 --- a/src/common/confs/healthcheck.conf +++ b/src/common/confs/healthcheck.conf @@ -14,10 +14,10 @@ server { ngx.say("ok") } } - + # disable logging access_log off; - + # don't respond to other requests location / { return 444; diff --git a/src/common/confs/nginx.conf b/src/common/confs/nginx.conf index 7bf691d5..17dd950f 100644 --- a/src/common/confs/nginx.conf +++ b/src/common/confs/nginx.conf @@ -60,4 +60,4 @@ stream { # include custom stream configurations include /etc/bunkerweb/configs/stream/*.conf; -} \ No newline at end of file +} diff --git a/src/common/confs/server-http/log-lua.conf b/src/common/confs/server-http/log-lua.conf index 29ec7d70..1bac9d89 100644 --- a/src/common/confs/server-http/log-lua.conf +++ b/src/common/confs/server-http/log-lua.conf @@ -71,4 +71,4 @@ log_by_lua_block { ngx.ctx = ctx logger:log(ngx.INFO, "log phase ended") -} \ No newline at end of file +} diff --git a/src/common/confs/server-http/server.conf b/src/common/confs/server-http/server.conf index 31a729fa..4a137ed6 100644 --- a/src/common/confs/server-http/server.conf +++ b/src/common/confs/server-http/server.conf @@ -25,7 +25,7 @@ server { include {{ NGINX_PREFIX }}set-lua.conf; include {{ NGINX_PREFIX }}access-lua.conf; include {{ NGINX_PREFIX }}log-lua.conf; - + # include config files include {{ NGINX_PREFIX }}server-http/*.conf; -} \ No newline at end of file +} diff --git a/src/common/confs/server-stream/server-stream.conf b/src/common/confs/server-stream/server-stream.conf index 6b7981a1..1e2c7dd5 100644 --- a/src/common/confs/server-stream/server-stream.conf +++ b/src/common/confs/server-stream/server-stream.conf @@ -23,7 +23,7 @@ server { # include LUA files include {{ NGINX_PREFIX }}preread-stream-lua.conf; include {{ NGINX_PREFIX }}log-stream-lua.conf; - + # include config files include {{ NGINX_PREFIX }}server-stream/*.conf; -} \ No newline at end of file +} diff --git a/src/common/confs/stream.conf b/src/common/confs/stream.conf index bfa09d7a..a863fbbb 100644 --- a/src/common/confs/stream.conf +++ b/src/common/confs/stream.conf @@ -81,4 +81,4 @@ upstream {{ SERVER_NAME.split(" ")[0] }} { {% endif %} {% endif %} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/antibot/confs/server-http/antibot.conf b/src/common/core/antibot/confs/server-http/antibot.conf index 8480c67a..2d6601ac 100644 --- a/src/common/core/antibot/confs/server-http/antibot.conf +++ b/src/common/core/antibot/confs/server-http/antibot.conf @@ -23,4 +23,4 @@ location {{ ANTIBOT_URI }} { ngx.ctx = ctx } } -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/authbasic/confs/server-http/auth-basic.conf b/src/common/core/authbasic/confs/server-http/auth-basic.conf index d36b9d4f..b0b1574a 100644 --- a/src/common/core/authbasic/confs/server-http/auth-basic.conf +++ b/src/common/core/authbasic/confs/server-http/auth-basic.conf @@ -5,7 +5,7 @@ auth_basic_user_file {{ NGINX_PREFIX }}server-http/htpasswd; {% else %} location {{ AUTH_BASIC_LOCATION }} { auth_basic "{{ AUTH_BASIC_TEXT }}"; - auth_basic_user_file {{ NGINX_PREFIX }}server-http/htpasswd; + auth_basic_user_file {{ NGINX_PREFIX }}server-http/htpasswd; } {% endif %} {% endif %} diff --git a/src/common/core/brotli/confs/server-http/brotli.conf b/src/common/core/brotli/confs/server-http/brotli.conf index bfcee741..fef7df4b 100644 --- a/src/common/core/brotli/confs/server-http/brotli.conf +++ b/src/common/core/brotli/confs/server-http/brotli.conf @@ -3,4 +3,4 @@ brotli on; brotli_types {{ BROTLI_TYPES }}; brotli_comp_level {{ BROTLI_COMP_LEVEL }}; brotli_min_length {{ BROTLI_MIN_LENGTH }}; -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/clientcache/confs/http/client-cache.conf b/src/common/core/clientcache/confs/http/client-cache.conf index 5ae16465..d2a0e147 100644 --- a/src/common/core/clientcache/confs/http/client-cache.conf +++ b/src/common/core/clientcache/confs/http/client-cache.conf @@ -1,4 +1,4 @@ map $uri $cache_control { default ""; "~\.({{ CLIENT_CACHE_EXTENSIONS }})$" "{{ CLIENT_CACHE_CONTROL }}"; -} \ No newline at end of file +} diff --git a/src/common/core/clientcache/confs/server-http/client-cache.conf b/src/common/core/clientcache/confs/server-http/client-cache.conf index 0f13a7e3..73f3ba92 100644 --- a/src/common/core/clientcache/confs/server-http/client-cache.conf +++ b/src/common/core/clientcache/confs/server-http/client-cache.conf @@ -5,4 +5,4 @@ etag on; {% else +%} etag off; {% endif +%} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/customcert/confs/server-http/custom-cert.conf b/src/common/core/customcert/confs/server-http/custom-cert.conf index 85aaefc1..fc319ad2 100644 --- a/src/common/core/customcert/confs/server-http/custom-cert.conf +++ b/src/common/core/customcert/confs/server-http/custom-cert.conf @@ -31,4 +31,4 @@ ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDS {% endif %} {% endif %} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/customcert/confs/server-stream/custom-cert.conf b/src/common/core/customcert/confs/server-stream/custom-cert.conf index 391524be..0c36ae19 100644 --- a/src/common/core/customcert/confs/server-stream/custom-cert.conf +++ b/src/common/core/customcert/confs/server-stream/custom-cert.conf @@ -31,4 +31,4 @@ ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDS {% endif %} {% endif %} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/errors/confs/default-server-http/errors.conf b/src/common/core/errors/confs/default-server-http/errors.conf index baf9446b..4861f288 100644 --- a/src/common/core/errors/confs/default-server-http/errors.conf +++ b/src/common/core/errors/confs/default-server-http/errors.conf @@ -19,4 +19,4 @@ location {% if intercepted_error_code == "400" %}= /{% else %} @{% endif %}bwerr errors:render_template(tostring(ngx.status)) } } -{% endfor %} \ No newline at end of file +{% endfor %} diff --git a/src/common/core/errors/confs/server-http/errors.conf b/src/common/core/errors/confs/server-http/errors.conf index 7137b7e5..19777b3e 100644 --- a/src/common/core/errors/confs/server-http/errors.conf +++ b/src/common/core/errors/confs/server-http/errors.conf @@ -38,4 +38,4 @@ location = {{ page }} { {% endif %} {% endfor %} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/gzip/confs/server-http/gzip.conf b/src/common/core/gzip/confs/server-http/gzip.conf index 1d324fbf..01fe9542 100644 --- a/src/common/core/gzip/confs/server-http/gzip.conf +++ b/src/common/core/gzip/confs/server-http/gzip.conf @@ -3,4 +3,4 @@ gzip on; gzip_types {{ GZIP_TYPES }}; gzip_comp_level {{ GZIP_COMP_LEVEL }}; gzip_min_length {{ GZIP_MIN_LENGTH }}; -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/headers/confs/http/headers.conf b/src/common/core/headers/confs/http/headers.conf index 2502cb55..254360ac 100644 --- a/src/common/core/headers/confs/http/headers.conf +++ b/src/common/core/headers/confs/http/headers.conf @@ -1,4 +1,4 @@ map $scheme $header_cookie_secure { default ""; "https" "secure"; -} \ No newline at end of file +} diff --git a/src/common/core/headers/confs/server-http/cookies.conf b/src/common/core/headers/confs/server-http/cookies.conf index f0efd707..37961b4d 100644 --- a/src/common/core/headers/confs/server-http/cookies.conf +++ b/src/common/core/headers/confs/server-http/cookies.conf @@ -6,4 +6,4 @@ set_cookie_flag {{ v }}; {% endif +%} {% endif +%} -{% endfor %} \ No newline at end of file +{% endfor %} diff --git a/src/common/core/inject/confs/server-http/inject.conf b/src/common/core/inject/confs/server-http/inject.conf index c56e10a7..acdacb94 100644 --- a/src/common/core/inject/confs/server-http/inject.conf +++ b/src/common/core/inject/confs/server-http/inject.conf @@ -1,3 +1,3 @@ {% if INJECT_BODY != "" +%} sub_filter '' '{{ INJECT_BODY }}'; -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/letsencrypt/confs/default-server-http/lets-encrypt.conf b/src/common/core/letsencrypt/confs/default-server-http/lets-encrypt.conf index b7e87931..bdb35943 100644 --- a/src/common/core/letsencrypt/confs/default-server-http/lets-encrypt.conf +++ b/src/common/core/letsencrypt/confs/default-server-http/lets-encrypt.conf @@ -2,4 +2,4 @@ location ~ ^/.well-known/acme-challenge/ { root /var/tmp/bunkerweb/lets-encrypt; auth_basic off; -} \ No newline at end of file +} diff --git a/src/common/core/limit/confs/http/limitconn.conf b/src/common/core/limit/confs/http/limitconn.conf index 86753686..a34b2461 100644 --- a/src/common/core/limit/confs/http/limitconn.conf +++ b/src/common/core/limit/confs/http/limitconn.conf @@ -17,4 +17,4 @@ limit_conn_log_level warn; limit_conn_status 429; -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/limit/confs/server-http/limitconn.conf b/src/common/core/limit/confs/server-http/limitconn.conf index 88a4ea0e..17c0b122 100644 --- a/src/common/core/limit/confs/server-http/limitconn.conf +++ b/src/common/core/limit/confs/server-http/limitconn.conf @@ -3,4 +3,4 @@ limit_conn v1ips {{ LIMIT_CONN_MAX_HTTP1 }}; limit_conn v2ips {{ LIMIT_CONN_MAX_HTTP2 }}; -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/limit/confs/server-stream/limitconn.conf b/src/common/core/limit/confs/server-stream/limitconn.conf index 4e0f0efd..6f3951eb 100644 --- a/src/common/core/limit/confs/server-stream/limitconn.conf +++ b/src/common/core/limit/confs/server-stream/limitconn.conf @@ -2,4 +2,4 @@ limit_conn sips {{ LIMIT_CONN_MAX_STREAM }}; -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/limit/confs/stream/limitconn.conf b/src/common/core/limit/confs/stream/limitconn.conf index db1073df..6109d64c 100644 --- a/src/common/core/limit/confs/stream/limitconn.conf +++ b/src/common/core/limit/confs/stream/limitconn.conf @@ -3,4 +3,4 @@ limit_conn_zone $binary_remote_addr zone=sips:10m; limit_conn_log_level warn; -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/misc/confs/default-server-http/disable.conf b/src/common/core/misc/confs/default-server-http/disable.conf index 53f113c6..091fba89 100644 --- a/src/common/core/misc/confs/default-server-http/disable.conf +++ b/src/common/core/misc/confs/default-server-http/disable.conf @@ -3,4 +3,4 @@ location / { set $reason "default"; return {{ DENY_HTTP_STATUS }}; } -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/misc/confs/default-server-http/page.conf b/src/common/core/misc/confs/default-server-http/page.conf index f4764ef6..1180e207 100644 --- a/src/common/core/misc/confs/default-server-http/page.conf +++ b/src/common/core/misc/confs/default-server-http/page.conf @@ -3,4 +3,4 @@ root /usr/share/bunkerweb/core/misc/files; location / { try_files /default.html =404; } -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/misc/confs/server-http/max-client-size.conf b/src/common/core/misc/confs/server-http/max-client-size.conf index 7eecca76..89d400b0 100644 --- a/src/common/core/misc/confs/server-http/max-client-size.conf +++ b/src/common/core/misc/confs/server-http/max-client-size.conf @@ -1 +1 @@ -client_max_body_size {{ MAX_CLIENT_SIZE }}; \ No newline at end of file +client_max_body_size {{ MAX_CLIENT_SIZE }}; diff --git a/src/common/core/misc/confs/server-http/open-file-cache.conf b/src/common/core/misc/confs/server-http/open-file-cache.conf index 9f88af3f..63736c39 100644 --- a/src/common/core/misc/confs/server-http/open-file-cache.conf +++ b/src/common/core/misc/confs/server-http/open-file-cache.conf @@ -1,4 +1,4 @@ open_file_cache {{ OPEN_FILE_CACHE }}; open_file_cache_errors {% if OPEN_FILE_CACHE_ERRORS == "yes" +%} on {% else +%} off {% endif +%}; open_file_cache_min_uses {{ OPEN_FILE_CACHE_MIN_USES }}; -open_file_cache_valid {{ OPEN_FILE_CACHE_VALID }}; \ No newline at end of file +open_file_cache_valid {{ OPEN_FILE_CACHE_VALID }}; diff --git a/src/common/core/misc/confs/server-http/redirect-http-to-https.conf b/src/common/core/misc/confs/server-http/redirect-http-to-https.conf index 39937b92..c9107181 100644 --- a/src/common/core/misc/confs/server-http/redirect-http-to-https.conf +++ b/src/common/core/misc/confs/server-http/redirect-http-to-https.conf @@ -9,4 +9,3 @@ if ($scheme = http) { } {% endif +%} {% endif +%} - diff --git a/src/common/core/misc/confs/server-http/serve-files.conf b/src/common/core/misc/confs/server-http/serve-files.conf index ae96a1f8..84ecd27c 100644 --- a/src/common/core/misc/confs/server-http/serve-files.conf +++ b/src/common/core/misc/confs/server-http/serve-files.conf @@ -3,4 +3,4 @@ try_files $uri $uri/ =404; {% else +%} root /nowhere; -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/modsecurity/confs/server-http/modsecurity-rules.conf.modsec b/src/common/core/modsecurity/confs/server-http/modsecurity-rules.conf.modsec index 5526739e..832f3e7d 100644 --- a/src/common/core/modsecurity/confs/server-http/modsecurity-rules.conf.modsec +++ b/src/common/core/modsecurity/confs/server-http/modsecurity-rules.conf.modsec @@ -68,7 +68,7 @@ SecAuditLog /var/log/bunkerweb/modsec_audit.log {% if USE_MODSECURITY_CRS == "yes" %} include /usr/share/bunkerweb/core/modsecurity/files/crs-setup.conf -# custom CRS configurations before loading rules (e.g. exclusions) +# custom CRS configurations before loading rules (e.g. exclusions) {% if is_custom_conf("/etc/bunkerweb/configs/modsec-crs") %} include /etc/bunkerweb/configs/modsec-crs/*.conf {% endif %} @@ -127,4 +127,4 @@ SecRuleUpdateActionById 959100 "t:none,deny,status:{{ DENY_HTTP_STATUS }},setenv # let BW manage when method is not allowed (and save up some computing) SecRuleUpdateActionById 911100 "t:none,allow,nolog" -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/modsecurity/confs/server-http/modsecurity.conf b/src/common/core/modsecurity/confs/server-http/modsecurity.conf index ab7a49ef..cf64d00d 100644 --- a/src/common/core/modsecurity/confs/server-http/modsecurity.conf +++ b/src/common/core/modsecurity/confs/server-http/modsecurity.conf @@ -1,4 +1,4 @@ {% if USE_MODSECURITY == "yes" +%} modsecurity on; modsecurity_rules_file {{ NGINX_PREFIX }}server-http/modsecurity-rules.conf.modsec; -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/php/confs/server-http/fastcgi_params b/src/common/core/php/confs/server-http/fastcgi_params index c7101b60..032d49af 100644 --- a/src/common/core/php/confs/server-http/fastcgi_params +++ b/src/common/core/php/confs/server-http/fastcgi_params @@ -34,4 +34,4 @@ fastcgi_param SERVER_PORT $server_port; fastcgi_param SERVER_NAME $server_name; # PHP only, required if PHP was built with --enable-force-cgi-redirect -fastcgi_param REDIRECT_STATUS 200; \ No newline at end of file +fastcgi_param REDIRECT_STATUS 200; diff --git a/src/common/core/php/confs/server-http/php.conf b/src/common/core/php/confs/server-http/php.conf index e7e1d3b8..7ae4a220 100644 --- a/src/common/core/php/confs/server-http/php.conf +++ b/src/common/core/php/confs/server-http/php.conf @@ -12,4 +12,4 @@ location ~ \.php$ { {% endif %} fastcgi_index index.php; } -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/realip/confs/default-server-http/real-ip.conf b/src/common/core/realip/confs/default-server-http/real-ip.conf index ad99190d..8662f977 100644 --- a/src/common/core/realip/confs/default-server-http/real-ip.conf +++ b/src/common/core/realip/confs/default-server-http/real-ip.conf @@ -13,4 +13,4 @@ real_ip_recursive on; {% else +%} real_ip_recursive off; {% endif +%} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/realip/confs/server-http/real-ip.conf b/src/common/core/realip/confs/server-http/real-ip.conf index ad99190d..8662f977 100644 --- a/src/common/core/realip/confs/server-http/real-ip.conf +++ b/src/common/core/realip/confs/server-http/real-ip.conf @@ -13,4 +13,4 @@ real_ip_recursive on; {% else +%} real_ip_recursive off; {% endif +%} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/realip/confs/server-stream/real-ip.conf b/src/common/core/realip/confs/server-stream/real-ip.conf index 684968c3..7fa02f9a 100644 --- a/src/common/core/realip/confs/server-stream/real-ip.conf +++ b/src/common/core/realip/confs/server-stream/real-ip.conf @@ -7,4 +7,4 @@ set_real_ip_from {{ element }}; set_real_ip_from {{ element }}; {% endfor %} {% endif %} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/redirect/confs/server-http/redirect.conf b/src/common/core/redirect/confs/server-http/redirect.conf index 24dc7fad..3323580e 100644 --- a/src/common/core/redirect/confs/server-http/redirect.conf +++ b/src/common/core/redirect/confs/server-http/redirect.conf @@ -4,4 +4,4 @@ return {{ REDIRECT_TO_STATUS_CODE }} {{ REDIRECT_TO }}$request_uri; {% else +%} return {{ REDIRECT_TO_STATUS_CODE }} {{ REDIRECT_TO }}; {% endif %} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/reverseproxy/confs/http/reverse-proxy.conf b/src/common/core/reverseproxy/confs/http/reverse-proxy.conf index ed4f6eaf..79272ceb 100644 --- a/src/common/core/reverseproxy/confs/http/reverse-proxy.conf +++ b/src/common/core/reverseproxy/confs/http/reverse-proxy.conf @@ -5,4 +5,4 @@ proxy_cache_path /var/tmp/bunkerweb/proxy_cache levels={{ PROXY_CACHE_PATH_LEVEL map $http_upgrade $connection_upgrade { default upgrade; '' close; -} \ No newline at end of file +} diff --git a/src/common/core/reverseproxy/confs/server-stream/reverse-proxy.conf b/src/common/core/reverseproxy/confs/server-stream/reverse-proxy.conf index 0bdf135c..5a37eccc 100644 --- a/src/common/core/reverseproxy/confs/server-stream/reverse-proxy.conf +++ b/src/common/core/reverseproxy/confs/server-stream/reverse-proxy.conf @@ -8,4 +8,4 @@ proxy_protocol on; set $backend "{{ SERVER_NAME.split(" ")[0] }}"; proxy_pass $backend; -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/selfsigned/confs/server-http/self-signed.conf b/src/common/core/selfsigned/confs/server-http/self-signed.conf index da5242d7..d305f81a 100644 --- a/src/common/core/selfsigned/confs/server-http/self-signed.conf +++ b/src/common/core/selfsigned/confs/server-http/self-signed.conf @@ -19,4 +19,4 @@ ssl_dhparam /etc/nginx/dhparam; ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; {% endif %} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/selfsigned/confs/server-stream/self-signed.conf b/src/common/core/selfsigned/confs/server-stream/self-signed.conf index 672649eb..3779b16e 100644 --- a/src/common/core/selfsigned/confs/server-stream/self-signed.conf +++ b/src/common/core/selfsigned/confs/server-stream/self-signed.conf @@ -19,4 +19,4 @@ ssl_dhparam /etc/nginx/dhparam; ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; {% endif %} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/common/core/whitelist/confs/default-server-http/whitelist.conf b/src/common/core/whitelist/confs/default-server-http/whitelist.conf index 20e9304a..3bbb93e5 100644 --- a/src/common/core/whitelist/confs/default-server-http/whitelist.conf +++ b/src/common/core/whitelist/confs/default-server-http/whitelist.conf @@ -1 +1 @@ -set $is_whitelisted 'no'; \ No newline at end of file +set $is_whitelisted 'no'; diff --git a/src/common/core/whitelist/confs/server-http/whitelist.conf b/src/common/core/whitelist/confs/server-http/whitelist.conf index 20e9304a..3bbb93e5 100644 --- a/src/common/core/whitelist/confs/server-http/whitelist.conf +++ b/src/common/core/whitelist/confs/server-http/whitelist.conf @@ -1 +1 @@ -set $is_whitelisted 'no'; \ No newline at end of file +set $is_whitelisted 'no'; diff --git a/src/common/core/whitelist/confs/server-stream/whitelist.conf b/src/common/core/whitelist/confs/server-stream/whitelist.conf index 20e9304a..3bbb93e5 100644 --- a/src/common/core/whitelist/confs/server-stream/whitelist.conf +++ b/src/common/core/whitelist/confs/server-stream/whitelist.conf @@ -1 +1 @@ -set $is_whitelisted 'no'; \ No newline at end of file +set $is_whitelisted 'no'; diff --git a/src/common/helpers/bwcli b/src/common/helpers/bwcli index 41515031..75e34de6 100644 --- a/src/common/helpers/bwcli +++ b/src/common/helpers/bwcli @@ -2,4 +2,4 @@ /usr/share/bunkerweb/cli/main.py "$@" -exit $? \ No newline at end of file +exit $? diff --git a/src/common/helpers/data.sh b/src/common/helpers/data.sh index 1e98d477..57cd5c43 100644 --- a/src/common/helpers/data.sh +++ b/src/common/helpers/data.sh @@ -38,4 +38,4 @@ for file in $(find /data -type f) ; do log "$1" "❌" "Wrong permissions on ${file} (at least R needed for user nginx with uid 101 and gid 101)" exit 1 fi -done \ No newline at end of file +done diff --git a/src/common/helpers/healthcheck-autoconf.sh b/src/common/helpers/healthcheck-autoconf.sh index 51de62c5..2fadc22e 100644 --- a/src/common/helpers/healthcheck-autoconf.sh +++ b/src/common/helpers/healthcheck-autoconf.sh @@ -4,4 +4,4 @@ if [ ! -f /var/tmp/bunkerweb/autoconf.healthy ] ; then exit 1 fi -exit 0 \ No newline at end of file +exit 0 diff --git a/src/common/helpers/healthcheck-scheduler.sh b/src/common/helpers/healthcheck-scheduler.sh index 1e1819f9..3dc87758 100644 --- a/src/common/helpers/healthcheck-scheduler.sh +++ b/src/common/helpers/healthcheck-scheduler.sh @@ -8,4 +8,4 @@ if [ ! -f /var/tmp/bunkerweb/scheduler.healthy ] ; then exit 1 fi -exit 0 \ No newline at end of file +exit 0 diff --git a/src/common/helpers/healthcheck-ui.sh b/src/common/helpers/healthcheck-ui.sh index 60e7c9fc..2e22bd15 100644 --- a/src/common/helpers/healthcheck-ui.sh +++ b/src/common/helpers/healthcheck-ui.sh @@ -8,4 +8,4 @@ if [ ! -f /var/tmp/bunkerweb/ui.healthy ] ; then exit 1 fi -exit 0 \ No newline at end of file +exit 0 diff --git a/src/common/helpers/utils.sh b/src/common/helpers/utils.sh index 80beb6af..0ef5e99d 100644 --- a/src/common/helpers/utils.sh +++ b/src/common/helpers/utils.sh @@ -60,4 +60,4 @@ for var_name in $(python3 -c 'import os ; [print(k) for k in os.environ]') ; do echo "${var_name}=${var_value}" fi done -} \ No newline at end of file +} diff --git a/src/deps/init_deps.sh b/src/deps/init_deps.sh index ed50b461..040d3102 100755 --- a/src/deps/init_deps.sh +++ b/src/deps/init_deps.sh @@ -19,7 +19,7 @@ do sha512="$(echo $download | jq -r .sha512)" echo "ℹ️ Downloading ${name} from ${url}" - + if [ ! -d "src/deps/src/${id}" ] ; then do_and_check_cmd wget -q -O "src/deps/src/${id}.tar.gz" "$url" check="$(sha512sum "src/deps/src/${id}.tar.gz" | cut -d ' ' -f 1)" diff --git a/src/deps/misc/lua-pack.Makefile b/src/deps/misc/lua-pack.Makefile index 522e31de..1da84419 100644 --- a/src/deps/misc/lua-pack.Makefile +++ b/src/deps/misc/lua-pack.Makefile @@ -21,4 +21,4 @@ install: lua_pack.so clean: rm -f *.so *.o *.rock -# eof \ No newline at end of file +# eof diff --git a/src/deps/misc/ngx_http_modsecurity_access.c b/src/deps/misc/ngx_http_modsecurity_access.c index 033a2b91..045b2621 100644 --- a/src/deps/misc/ngx_http_modsecurity_access.c +++ b/src/deps/misc/ngx_http_modsecurity_access.c @@ -225,4 +225,3 @@ ngx_http_modsecurity_access_handler(ngx_http_request_t *r) #endif return NGX_DECLINED; } - diff --git a/src/deps/requirements-deps.txt b/src/deps/requirements-deps.txt index d0a968d0..12a793b3 100644 --- a/src/deps/requirements-deps.txt +++ b/src/deps/requirements-deps.txt @@ -113,6 +113,12 @@ importlib-metadata==6.8.0 \ packaging==23.1 \ --hash=sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61 \ --hash=sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f + # via importlib-metadata + +# The following packages are considered to be unsafe in a requirements file: +pip==23.2.1 \ + --hash=sha256:7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be \ + --hash=sha256:fb0bd5435b3200c602b5bf61d2d43c2f13c02e29c1707567ae7fbc514eb9faf2 # via # build # pip-upgrader @@ -137,6 +143,12 @@ pyproject-hooks==1.0.0 \ requests==2.31.0 \ --hash=sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f \ --hash=sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1 + # via + # -r requirements-deps.in + # pip-tools +setuptools==68.2.2 \ + --hash=sha256:4ac1475276d2f1c48684874089fefcd83bd7162ddaafb81fac866ba0db282a87 \ + --hash=sha256:b454a35605876da60632df1a60f736524eb73cc47bbc9f3f1ef1b644de74fd2a # via pip-upgrader terminaltables==3.1.10 \ --hash=sha256:ba6eca5cb5ba02bba4c9f4f985af80c54ec3dccf94cfcd190154386255e47543 \ @@ -167,18 +179,6 @@ wheel==0.41.2 \ zipp==3.17.0 \ --hash=sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31 \ --hash=sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0 - # via importlib-metadata - -# The following packages are considered to be unsafe in a requirements file: -pip==23.2.1 \ - --hash=sha256:7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be \ - --hash=sha256:fb0bd5435b3200c602b5bf61d2d43c2f13c02e29c1707567ae7fbc514eb9faf2 - # via - # -r requirements-deps.in - # pip-tools -setuptools==68.2.2 \ - --hash=sha256:4ac1475276d2f1c48684874089fefcd83bd7162ddaafb81fac866ba0db282a87 \ - --hash=sha256:b454a35605876da60632df1a60f736524eb73cc47bbc9f3f1ef1b644de74fd2a # via # -r requirements-deps.in # pip-tools diff --git a/src/deps/requirements.txt b/src/deps/requirements.txt index 3575f895..2eb99385 100644 --- a/src/deps/requirements.txt +++ b/src/deps/requirements.txt @@ -19,6 +19,12 @@ importlib-metadata==6.8.0 \ packaging==23.1 \ --hash=sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61 \ --hash=sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f + # via importlib-metadata + +# The following packages are considered to be unsafe in a requirements file: +pip==23.2.1 \ + --hash=sha256:7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be \ + --hash=sha256:fb0bd5435b3200c602b5bf61d2d43c2f13c02e29c1707567ae7fbc514eb9faf2 # via build pip-tools==7.3.0 \ --hash=sha256:8717693288720a8c6ebd07149c93ab0be1fced0b5191df9e9decd3263e20d85e \ @@ -27,6 +33,12 @@ pip-tools==7.3.0 \ pyproject-hooks==1.0.0 \ --hash=sha256:283c11acd6b928d2f6a7c73fa0d01cb2bdc5f07c57a2eeb6e83d5e56b97976f8 \ --hash=sha256:f271b298b97f5955d53fb12b72c1fb1948c22c1a6b70b315c54cedaca0264ef5 + # via + # -r requirements.in + # pip-tools +setuptools==68.2.2 \ + --hash=sha256:4ac1475276d2f1c48684874089fefcd83bd7162ddaafb81fac866ba0db282a87 \ + --hash=sha256:b454a35605876da60632df1a60f736524eb73cc47bbc9f3f1ef1b644de74fd2a # via build tomli==2.0.1 \ --hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \ @@ -44,18 +56,6 @@ wheel==0.41.2 \ zipp==3.17.0 \ --hash=sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31 \ --hash=sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0 - # via importlib-metadata - -# The following packages are considered to be unsafe in a requirements file: -pip==23.2.1 \ - --hash=sha256:7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be \ - --hash=sha256:fb0bd5435b3200c602b5bf61d2d43c2f13c02e29c1707567ae7fbc514eb9faf2 - # via - # -r requirements.in - # pip-tools -setuptools==68.2.2 \ - --hash=sha256:4ac1475276d2f1c48684874089fefcd83bd7162ddaafb81fac866ba0db282a87 \ - --hash=sha256:b454a35605876da60632df1a60f736524eb73cc47bbc9f3f1ef1b644de74fd2a # via # -r requirements.in # pip-tools diff --git a/src/linux/Dockerfile-centos b/src/linux/Dockerfile-centos index 3bb45bd0..2ed55225 100644 --- a/src/linux/Dockerfile-centos +++ b/src/linux/Dockerfile-centos @@ -13,7 +13,7 @@ RUN dnf update -y && \ dnf module -y reset ruby && dnf module -y enable ruby:2.6 && dnf module -y install ruby:2.6/common && \ gem install fpm && \ # TODO: find a way to install nginx-1.24.0 as it's not yet available in centos 8 - dnf install nginx-${NGINX_VERSION} -y + dnf install nginx-${NGINX_VERSION} -y WORKDIR /tmp/bunkerweb/deps diff --git a/src/linux/RPM-GPG-KEY-centosofficial b/src/linux/RPM-GPG-KEY-centosofficial index 94ebc832..30235a86 100644 --- a/src/linux/RPM-GPG-KEY-centosofficial +++ b/src/linux/RPM-GPG-KEY-centosofficial @@ -27,4 +27,4 @@ rCTTbCn3NSUO9qxEXC+K/1m1kaXoCGA0UWlVGZ1JSifbbMx0yxq/brpEZPUYm+32 o8XfbocBWljFUJ+6aljTvZ3LQLKTSPW7TFO+GXycAOmCGhlXh2tlc6iTc41PACqy yy+mHmSv =kkH7 ------END PGP PUBLIC KEY BLOCK----- \ No newline at end of file +-----END PGP PUBLIC KEY BLOCK----- diff --git a/src/linux/centos.repo b/src/linux/centos.repo index 977151a4..b6f2d236 100644 --- a/src/linux/centos.repo +++ b/src/linux/centos.repo @@ -3,4 +3,4 @@ name = CentOS 8 Base OS baseurl = http://mirror.centos.org/centos/8-stream/BaseOS/%ARCH%/os/ gpgcheck = 1 enabled = 1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial \ No newline at end of file +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial diff --git a/src/linux/nginx.repo b/src/linux/nginx.repo index 3894a9f1..3c2d4b16 100644 --- a/src/linux/nginx.repo +++ b/src/linux/nginx.repo @@ -4,4 +4,4 @@ baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=1 enabled=1 gpgkey=https://nginx.org/keys/nginx_signing.key -module_hotfixes=true \ No newline at end of file +module_hotfixes=true diff --git a/src/linux/scripts/afterRemoveDEB.sh b/src/linux/scripts/afterRemoveDEB.sh index 7674d44b..2ed0afbe 100644 --- a/src/linux/scripts/afterRemoveDEB.sh +++ b/src/linux/scripts/afterRemoveDEB.sh @@ -20,7 +20,7 @@ function reload_systemd() { do_and_check_cmd systemctl reset-failed } -# remove a systemd service +# remove a systemd service function remove_systemd_service { service=$1 service_file="/lib/systemd/system/$service.service" @@ -126,7 +126,7 @@ if [ "$1" = "remove" ]; then elif [ "$1" = "purge" ]; then # Call the purge function purge -else +else echo "Package is being upgraded" # Check the version of the package and if it's inferior to 1.5.2, we need to copy the variables.env file VERSION=$(dpkg-query -W -f='${Version}' bunkerweb) @@ -138,4 +138,4 @@ else cp -f /etc/bunkerweb/variables.env /var/tmp/variables.env cp -f /etc/bunkerweb/ui.env /var/tmp/ui.env exit 0 -fi \ No newline at end of file +fi diff --git a/src/linux/scripts/afterRemoveRPM.sh b/src/linux/scripts/afterRemoveRPM.sh index 08027193..8cbbb4ee 100644 --- a/src/linux/scripts/afterRemoveRPM.sh +++ b/src/linux/scripts/afterRemoveRPM.sh @@ -20,7 +20,7 @@ function reload_systemd() { do_and_check_cmd systemctl reset-failed } -# remove a systemd service +# remove a systemd service function remove_systemd_service { service=$1 service_file="/lib/systemd/system/$service.service" @@ -142,7 +142,7 @@ elif [ "$1" = "1" ]; then cp -f /var/lib/bunkerweb/db.sqlite3 /var/tmp/db.sqlite3 exit 0 fi -else +else echo "Error" exit 0 -fi \ No newline at end of file +fi diff --git a/src/linux/scripts/bunkerweb-ui.sh b/src/linux/scripts/bunkerweb-ui.sh index 4f777483..8e3946c0 100755 --- a/src/linux/scripts/bunkerweb-ui.sh +++ b/src/linux/scripts/bunkerweb-ui.sh @@ -3,7 +3,7 @@ # Set the PYTHONPATH export PYTHONPATH=/usr/share/bunkerweb/deps/python/:/usr/share/bunkerweb/ui/ -# Create the ui.env file if it doesn't exist +# Create the ui.env file if it doesn't exist if [ ! -f /etc/bunkerweb/ui.env ]; then echo "ADMIN_USERNAME=admin" > /etc/bunkerweb/ui.env echo "ADMIN_PASSWORD=changeme" >> /etc/bunkerweb/ui.env @@ -57,4 +57,4 @@ case $1 in echo "Usage: $0 {start|stop|reload}" exit 1 ;; -esac \ No newline at end of file +esac diff --git a/src/linux/scripts/start.sh b/src/linux/scripts/start.sh index 56b3d33b..fc24fee3 100644 --- a/src/linux/scripts/start.sh +++ b/src/linux/scripts/start.sh @@ -218,13 +218,13 @@ function reload() # List of differents args case $1 in - "start") + "start") start ;; - "stop") + "stop") stop ;; - "reload") + "reload") reload ;; *) diff --git a/src/scheduler/entrypoint.sh b/src/scheduler/entrypoint.sh index 57dcc69a..c5bf153d 100755 --- a/src/scheduler/entrypoint.sh +++ b/src/scheduler/entrypoint.sh @@ -52,4 +52,4 @@ if [ -f /var/tmp/bunkerweb/scheduler.healthy ] ; then rm /var/tmp/bunkerweb/scheduler.healthy fi log "ENTRYPOINT" "ℹ️ " "Scheduler stopped" -exit 0 \ No newline at end of file +exit 0 diff --git a/src/scheduler/requirements.txt b/src/scheduler/requirements.txt index 8758c80f..2c6a73fe 100644 --- a/src/scheduler/requirements.txt +++ b/src/scheduler/requirements.txt @@ -240,6 +240,14 @@ requests==2.31.0 \ schedule==1.2.0 \ --hash=sha256:415908febaba0bc9a7c727a32efb407d646fe994367ef9157d123aabbe539ea8 \ --hash=sha256:b4ad697aafba7184c9eb6a1e2ebc41f781547242acde8ceae9a0a25b04c0922d + # via + # -r requirements.in + # requests + +# The following packages are considered to be unsafe in a requirements file: +setuptools==68.2.2 \ + --hash=sha256:4ac1475276d2f1c48684874089fefcd83bd7162ddaafb81fac866ba0db282a87 \ + --hash=sha256:b454a35605876da60632df1a60f736524eb73cc47bbc9f3f1ef1b644de74fd2a # via -r requirements.in six==1.16.0 \ --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ @@ -249,14 +257,6 @@ urllib3==1.26.16 \ --hash=sha256:8d36afa7616d8ab714608411b4a3b13e58f463aee519024578e062e141dce20f \ --hash=sha256:8f135f6502756bde6b2a9b28989df5fbe87c9970cecaa69041edcce7f0589b14 # via - # -r requirements.in - # requests - -# The following packages are considered to be unsafe in a requirements file: -setuptools==68.2.2 \ - --hash=sha256:4ac1475276d2f1c48684874089fefcd83bd7162ddaafb81fac866ba0db282a87 \ - --hash=sha256:b454a35605876da60632df1a60f736524eb73cc47bbc9f3f1ef1b644de74fd2a - # via # acme # certbot # josepy diff --git a/src/ui/static/js/global.js b/src/ui/static/js/global.js index 1d8effff..00ece953 100644 --- a/src/ui/static/js/global.js +++ b/src/ui/static/js/global.js @@ -94,7 +94,7 @@ class News { `; }); //create card - const card = ` + const card = `
@@ -105,12 +105,12 @@ class News { src="${img}" alt="image" /> -

{{ post['title'] }}

+ class="cursor-pointer mt-3 mb-1 text-3xl dark:text-white tracking-wide">{{ post['title'] }}
-
${excerpt} diff --git a/src/ui/static/js/plugins.js b/src/ui/static/js/plugins.js index c597071a..2757424b 100644 --- a/src/ui/static/js/plugins.js +++ b/src/ui/static/js/plugins.js @@ -377,7 +377,7 @@ class Upload { ${name} ${fileSize} - + @@ -398,7 +398,7 @@ class Upload { - + ${name} ${fileSize}
diff --git a/src/ui/templates/services.html b/src/ui/templates/services.html index 4104919e..f57db3b0 100644 --- a/src/ui/templates/services.html +++ b/src/ui/templates/services.html @@ -37,7 +37,7 @@
{{ service["SERVER_NAME"]['method'] }}
- +
- + - + {% if service["SERVER_NAME"]['method'] == "ui" %} {%endif%} {% endif %} {% endfor %} diff --git a/tests/core/antibot/Dockerfile b/tests/core/antibot/Dockerfile index 469e4802..6efb3c49 100644 --- a/tests/core/antibot/Dockerfile +++ b/tests/core/antibot/Dockerfile @@ -22,4 +22,4 @@ WORKDIR /opt/tests COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/authbasic/Dockerfile b/tests/core/authbasic/Dockerfile index 469e4802..6efb3c49 100644 --- a/tests/core/authbasic/Dockerfile +++ b/tests/core/authbasic/Dockerfile @@ -22,4 +22,4 @@ WORKDIR /opt/tests COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/badbehavior/Dockerfile b/tests/core/badbehavior/Dockerfile index 18a441c6..96b95a8e 100644 --- a/tests/core/badbehavior/Dockerfile +++ b/tests/core/badbehavior/Dockerfile @@ -11,4 +11,4 @@ WORKDIR /opt/tests COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/blacklist/Dockerfile b/tests/core/blacklist/Dockerfile index 18a441c6..96b95a8e 100644 --- a/tests/core/blacklist/Dockerfile +++ b/tests/core/blacklist/Dockerfile @@ -11,4 +11,4 @@ WORKDIR /opt/tests COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/blacklist/api/Dockerfile b/tests/core/blacklist/api/Dockerfile index 6d72c91e..982a9bc0 100644 --- a/tests/core/blacklist/api/Dockerfile +++ b/tests/core/blacklist/api/Dockerfile @@ -11,4 +11,4 @@ WORKDIR /opt/blacklist_api COPY main.py . -ENTRYPOINT [ "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080", "--proxy-headers", "--forwarded-allow-ips", "\"*\"" ] \ No newline at end of file +ENTRYPOINT [ "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080", "--proxy-headers", "--forwarded-allow-ips", "\"*\"" ] diff --git a/tests/core/blacklist/init/Dockerfile b/tests/core/blacklist/init/Dockerfile index 024b0b3a..f9efd6d3 100644 --- a/tests/core/blacklist/init/Dockerfile +++ b/tests/core/blacklist/init/Dockerfile @@ -11,4 +11,4 @@ WORKDIR /opt/blacklist_init COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/brotli/Dockerfile b/tests/core/brotli/Dockerfile index 18a441c6..96b95a8e 100644 --- a/tests/core/brotli/Dockerfile +++ b/tests/core/brotli/Dockerfile @@ -11,4 +11,4 @@ WORKDIR /opt/tests COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/bunkernet/Dockerfile b/tests/core/bunkernet/Dockerfile index 18a441c6..96b95a8e 100644 --- a/tests/core/bunkernet/Dockerfile +++ b/tests/core/bunkernet/Dockerfile @@ -11,4 +11,4 @@ WORKDIR /opt/tests COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/bunkernet/api/Dockerfile b/tests/core/bunkernet/api/Dockerfile index 6d72c91e..982a9bc0 100644 --- a/tests/core/bunkernet/api/Dockerfile +++ b/tests/core/bunkernet/api/Dockerfile @@ -11,4 +11,4 @@ WORKDIR /opt/blacklist_api COPY main.py . -ENTRYPOINT [ "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080", "--proxy-headers", "--forwarded-allow-ips", "\"*\"" ] \ No newline at end of file +ENTRYPOINT [ "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080", "--proxy-headers", "--forwarded-allow-ips", "\"*\"" ] diff --git a/tests/core/bwcli/test.sh b/tests/core/bwcli/test.sh index 79f47403..1f50ac1b 100755 --- a/tests/core/bwcli/test.sh +++ b/tests/core/bwcli/test.sh @@ -36,7 +36,7 @@ else exit 1 fi echo "⌨️ Redis installed ✅" - + echo "USE_REDIS=yes" | sudo tee -a /etc/bunkerweb/variables.env echo "REDIS_HOST=127.0.0.1" | sudo tee -a /etc/bunkerweb/variables.env export USE_REDIS="yes" diff --git a/tests/core/clientcache/Dockerfile b/tests/core/clientcache/Dockerfile index 18a441c6..96b95a8e 100644 --- a/tests/core/clientcache/Dockerfile +++ b/tests/core/clientcache/Dockerfile @@ -11,4 +11,4 @@ WORKDIR /opt/tests COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/cors/Dockerfile b/tests/core/cors/Dockerfile index 469e4802..6efb3c49 100644 --- a/tests/core/cors/Dockerfile +++ b/tests/core/cors/Dockerfile @@ -22,4 +22,4 @@ WORKDIR /opt/tests COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/cors/Dockerfile.init b/tests/core/cors/Dockerfile.init index bb223e7a..7571ef11 100644 --- a/tests/core/cors/Dockerfile.init +++ b/tests/core/cors/Dockerfile.init @@ -7,4 +7,4 @@ COPY entrypoint.sh . RUN apk add --no-cache bash && \ chmod +x entrypoint.sh -ENTRYPOINT [ "./entrypoint.sh" ] \ No newline at end of file +ENTRYPOINT [ "./entrypoint.sh" ] diff --git a/tests/core/country/Dockerfile b/tests/core/country/Dockerfile index 18a441c6..96b95a8e 100644 --- a/tests/core/country/Dockerfile +++ b/tests/core/country/Dockerfile @@ -11,4 +11,4 @@ WORKDIR /opt/tests COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/customcert/Dockerfile b/tests/core/customcert/Dockerfile index 18a441c6..96b95a8e 100644 --- a/tests/core/customcert/Dockerfile +++ b/tests/core/customcert/Dockerfile @@ -11,4 +11,4 @@ WORKDIR /opt/tests COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/customcert/init/Dockerfile b/tests/core/customcert/init/Dockerfile index ca3152c2..71334cee 100644 --- a/tests/core/customcert/init/Dockerfile +++ b/tests/core/customcert/init/Dockerfile @@ -8,4 +8,4 @@ COPY entrypoint.sh . RUN chmod +x entrypoint.sh -ENTRYPOINT [ "./entrypoint.sh" ] \ No newline at end of file +ENTRYPOINT [ "./entrypoint.sh" ] diff --git a/tests/core/db/Dockerfile b/tests/core/db/Dockerfile index dc7255d8..dc0dc44d 100644 --- a/tests/core/db/Dockerfile +++ b/tests/core/db/Dockerfile @@ -22,4 +22,4 @@ RUN chown -R nginx:nginx external bunkerweb && \ USER nginx:nginx -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/db/init/Dockerfile b/tests/core/db/init/Dockerfile index 189a3756..c6f32b8a 100644 --- a/tests/core/db/init/Dockerfile +++ b/tests/core/db/init/Dockerfile @@ -8,4 +8,4 @@ COPY entrypoint.sh . RUN chmod +x entrypoint.sh -ENTRYPOINT [ "./entrypoint.sh" ] \ No newline at end of file +ENTRYPOINT [ "./entrypoint.sh" ] diff --git a/tests/core/dnsbl/Dockerfile b/tests/core/dnsbl/Dockerfile index 18a441c6..96b95a8e 100644 --- a/tests/core/dnsbl/Dockerfile +++ b/tests/core/dnsbl/Dockerfile @@ -11,4 +11,4 @@ WORKDIR /opt/tests COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/dnsbl/init/Dockerfile b/tests/core/dnsbl/init/Dockerfile index 469e4802..6efb3c49 100644 --- a/tests/core/dnsbl/init/Dockerfile +++ b/tests/core/dnsbl/init/Dockerfile @@ -22,4 +22,4 @@ WORKDIR /opt/tests COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/errors/Dockerfile b/tests/core/errors/Dockerfile index 469e4802..6efb3c49 100644 --- a/tests/core/errors/Dockerfile +++ b/tests/core/errors/Dockerfile @@ -22,4 +22,4 @@ WORKDIR /opt/tests COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/greylist/Dockerfile b/tests/core/greylist/Dockerfile index 18a441c6..96b95a8e 100644 --- a/tests/core/greylist/Dockerfile +++ b/tests/core/greylist/Dockerfile @@ -11,4 +11,4 @@ WORKDIR /opt/tests COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/greylist/api/Dockerfile b/tests/core/greylist/api/Dockerfile index 7e86d9f1..00d1b146 100644 --- a/tests/core/greylist/api/Dockerfile +++ b/tests/core/greylist/api/Dockerfile @@ -11,4 +11,4 @@ WORKDIR /opt/greylist_api COPY main.py . -ENTRYPOINT [ "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080", "--proxy-headers", "--forwarded-allow-ips", "\"*\"" ] \ No newline at end of file +ENTRYPOINT [ "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080", "--proxy-headers", "--forwarded-allow-ips", "\"*\"" ] diff --git a/tests/core/greylist/init/Dockerfile b/tests/core/greylist/init/Dockerfile index 024b0b3a..f9efd6d3 100644 --- a/tests/core/greylist/init/Dockerfile +++ b/tests/core/greylist/init/Dockerfile @@ -11,4 +11,4 @@ WORKDIR /opt/blacklist_init COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/gzip/Dockerfile b/tests/core/gzip/Dockerfile index 18a441c6..96b95a8e 100644 --- a/tests/core/gzip/Dockerfile +++ b/tests/core/gzip/Dockerfile @@ -11,4 +11,4 @@ WORKDIR /opt/tests COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/headers/Dockerfile b/tests/core/headers/Dockerfile index 18a441c6..96b95a8e 100644 --- a/tests/core/headers/Dockerfile +++ b/tests/core/headers/Dockerfile @@ -11,4 +11,4 @@ WORKDIR /opt/tests COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/headers/www/index.php b/tests/core/headers/www/index.php index c66d0c75..f1a5b5ba 100644 --- a/tests/core/headers/www/index.php +++ b/tests/core/headers/www/index.php @@ -1,3 +1,3 @@ \ No newline at end of file +?> diff --git a/tests/core/inject/Dockerfile b/tests/core/inject/Dockerfile index 18a441c6..96b95a8e 100644 --- a/tests/core/inject/Dockerfile +++ b/tests/core/inject/Dockerfile @@ -11,4 +11,4 @@ WORKDIR /opt/tests COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/limit/Dockerfile b/tests/core/limit/Dockerfile index 18a441c6..96b95a8e 100644 --- a/tests/core/limit/Dockerfile +++ b/tests/core/limit/Dockerfile @@ -11,4 +11,4 @@ WORKDIR /opt/tests COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/misc/Dockerfile b/tests/core/misc/Dockerfile index 83c14ff1..74d3db78 100644 --- a/tests/core/misc/Dockerfile +++ b/tests/core/misc/Dockerfile @@ -13,4 +13,4 @@ COPY main.py . RUN apk add --no-cache curl -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/modsecurity/Dockerfile b/tests/core/modsecurity/Dockerfile index 18a441c6..96b95a8e 100644 --- a/tests/core/modsecurity/Dockerfile +++ b/tests/core/modsecurity/Dockerfile @@ -11,4 +11,4 @@ WORKDIR /opt/tests COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/redirect/Dockerfile b/tests/core/redirect/Dockerfile index 469e4802..6efb3c49 100644 --- a/tests/core/redirect/Dockerfile +++ b/tests/core/redirect/Dockerfile @@ -22,4 +22,4 @@ WORKDIR /opt/tests COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/redis/Dockerfile b/tests/core/redis/Dockerfile index d4a6a1da..274055bd 100644 --- a/tests/core/redis/Dockerfile +++ b/tests/core/redis/Dockerfile @@ -24,4 +24,4 @@ COPY main.py . EXPOSE 8080 -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/reversescan/Dockerfile b/tests/core/reversescan/Dockerfile index 1de2499d..83d06e39 100644 --- a/tests/core/reversescan/Dockerfile +++ b/tests/core/reversescan/Dockerfile @@ -24,4 +24,4 @@ COPY main.py . EXPOSE 80 -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/selfsigned/Dockerfile b/tests/core/selfsigned/Dockerfile index 18a441c6..96b95a8e 100644 --- a/tests/core/selfsigned/Dockerfile +++ b/tests/core/selfsigned/Dockerfile @@ -11,4 +11,4 @@ WORKDIR /opt/tests COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/sessions/Dockerfile b/tests/core/sessions/Dockerfile index 469e4802..6efb3c49 100644 --- a/tests/core/sessions/Dockerfile +++ b/tests/core/sessions/Dockerfile @@ -22,4 +22,4 @@ WORKDIR /opt/tests COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/whitelist/Dockerfile b/tests/core/whitelist/Dockerfile index 18a441c6..96b95a8e 100644 --- a/tests/core/whitelist/Dockerfile +++ b/tests/core/whitelist/Dockerfile @@ -11,4 +11,4 @@ WORKDIR /opt/tests COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/core/whitelist/api/Dockerfile b/tests/core/whitelist/api/Dockerfile index 7e86d9f1..00d1b146 100644 --- a/tests/core/whitelist/api/Dockerfile +++ b/tests/core/whitelist/api/Dockerfile @@ -11,4 +11,4 @@ WORKDIR /opt/greylist_api COPY main.py . -ENTRYPOINT [ "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080", "--proxy-headers", "--forwarded-allow-ips", "\"*\"" ] \ No newline at end of file +ENTRYPOINT [ "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080", "--proxy-headers", "--forwarded-allow-ips", "\"*\"" ] diff --git a/tests/core/whitelist/init/Dockerfile b/tests/core/whitelist/init/Dockerfile index 024b0b3a..f9efd6d3 100644 --- a/tests/core/whitelist/init/Dockerfile +++ b/tests/core/whitelist/init/Dockerfile @@ -11,4 +11,4 @@ WORKDIR /opt/blacklist_init COPY main.py . -ENTRYPOINT [ "python3", "main.py" ] \ No newline at end of file +ENTRYPOINT [ "python3", "main.py" ] diff --git a/tests/linux/Dockerfile-centos b/tests/linux/Dockerfile-centos index f807bc74..0e3d08b9 100644 --- a/tests/linux/Dockerfile-centos +++ b/tests/linux/Dockerfile-centos @@ -23,4 +23,4 @@ COPY ./package-centos/*.rpm /opt VOLUME /run /tmp -CMD /usr/sbin/init \ No newline at end of file +CMD /usr/sbin/init diff --git a/tests/linux/Dockerfile-rhel b/tests/linux/Dockerfile-rhel index 14e45339..cd46d4a0 100644 --- a/tests/linux/Dockerfile-rhel +++ b/tests/linux/Dockerfile-rhel @@ -18,4 +18,4 @@ RUN rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch. dnf install php-fpm curl yum-utils -y && \ dnf install nginx-${NGINX_VERSION} -y -COPY ./package-rhel/*.rpm /opt \ No newline at end of file +COPY ./package-rhel/*.rpm /opt diff --git a/tests/linux/Linux.sh b/tests/linux/Linux.sh index c4f4df67..8c4c2858 100755 --- a/tests/linux/Linux.sh +++ b/tests/linux/Linux.sh @@ -69,5 +69,3 @@ function main() { } main - - diff --git a/tests/www-deb.conf b/tests/www-deb.conf index 74d9aeeb..fa53694e 100644 --- a/tests/www-deb.conf +++ b/tests/www-deb.conf @@ -9,4 +9,4 @@ pm = dynamic pm.max_children = 5 pm.start_servers = 2 pm.min_spare_servers = 1 -pm.max_spare_servers = 3 \ No newline at end of file +pm.max_spare_servers = 3 diff --git a/tests/www-rpm.conf b/tests/www-rpm.conf index 276c8c75..124ea5d2 100644 --- a/tests/www-rpm.conf +++ b/tests/www-rpm.conf @@ -9,4 +9,4 @@ pm = dynamic pm.max_children = 5 pm.start_servers = 2 pm.min_spare_servers = 1 -pm.max_spare_servers = 3 \ No newline at end of file +pm.max_spare_servers = 3