Skip to content

Commit 8b2bc28

Browse files
renovate[bot]Zoey2936
authored andcommitted
see commit body
zh-lang by @ZhWn update alpine to 3.22 (includes openssl 3.5) remove liboqs/oqs-provider sinc eopenssl 3.5 now has mlkem support dep updates run internal APIs in unix sockets instead of tcp ports improve templates (not done yeet) Signed-off-by: Zoey <zoey@z0ey.de>
1 parent 7fa5f5f commit 8b2bc28

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1066
-721
lines changed

.github/workflows/docker.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ jobs:
6565
sed -i "s|\"0.0.0\"|\"$version\"|g" frontend/js/i18n/en-lang.json
6666
sed -i "s|\"0.0.0\"|\"$version\"|g" frontend/js/i18n/de-lang.json
6767
sed -i "s|\"0.0.0\"|\"$version\"|g" frontend/js/i18n/it-lang.json
68+
sed -i "s|\"0.0.0\"|\"$version\"|g" frontend/js/i18n/zh-lang.json
6869
sed -i "s|\"0.0.0\"|\"$version\"|g" frontend/package.json
6970
sed -i "s|\"0.0.0\"|\"$version\"|g" backend/package.json
7071
- name: Build

.github/workflows/spellcheck.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ jobs:
1515
with:
1616
check_filenames: true
1717
check_hidden: true
18-
skip: .git,.gitignore,yarn.lock,de-lang.json,it-lang.json,showdown.min.js,jquery.min.js,xregexp-all.js
18+
skip: .git,.gitignore,yarn.lock,de-lang.json,it-lang.json,zh-lang.json,showdown.min.js,jquery.min.js,xregexp-all.js
19+
ignore_words_list: alog

Caddy.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.21.3
1+
FROM alpine:3.22.0
22
RUN apk add --no-cache ca-certificates tzdata
33
COPY --from=caddy:2.10.0 /usr/bin/caddy /usr/bin/caddy
44
COPY Caddyfile /etc/caddy/Caddyfile

Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile:labs
2-
FROM --platform="$BUILDPLATFORM" alpine:3.21.3 AS frontend
2+
FROM --platform="$BUILDPLATFORM" alpine:3.22.0 AS frontend
33
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
44
ARG NODE_ENV=production
55
COPY frontend /app
@@ -13,7 +13,7 @@ COPY darkmode.css /app/dist/css/darkmode.css
1313
COPY security.txt /app/dist/.well-known/security.txt
1414

1515

16-
FROM --platform="$BUILDPLATFORM" alpine:3.21.3 AS build-backend
16+
FROM --platform="$BUILDPLATFORM" alpine:3.22.0 AS build-backend
1717
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
1818
ARG NODE_ENV=production \
1919
TARGETARCH
@@ -28,16 +28,16 @@ RUN apk upgrade --no-cache -a && \
2828
else yarn install; fi && \
2929
yarn cache clean && \
3030
clean-modules --yes
31-
FROM alpine:3.21.3 AS strip-backend
31+
FROM alpine:3.22.0 AS strip-backend
3232
COPY --from=build-backend /app /app
3333
RUN apk upgrade --no-cache -a && \
3434
apk add --no-cache ca-certificates binutils file && \
3535
find /app/node_modules -name "*.node" -type f -exec strip -s {} \; && \
3636
find /app/node_modules -name "*.node" -type f -exec file {} \;
3737

38-
FROM --platform="$BUILDPLATFORM" alpine:3.21.3 AS crowdsec
38+
FROM --platform="$BUILDPLATFORM" alpine:3.22.0 AS crowdsec
3939
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
40-
ARG CSNB_VER=v1.1.1
40+
ARG CSNB_VER=v1.1.2
4141
WORKDIR /src
4242
RUN apk upgrade --no-cache -a && \
4343
apk add --no-cache ca-certificates git build-base && \
@@ -62,10 +62,10 @@ RUN apk upgrade --no-cache -a && \
6262
sed -i "s|APPSEC_PROCESS_TIMEOUT=.*|APPSEC_PROCESS_TIMEOUT=10000|g" /src/crowdsec-nginx-bouncer/lua-mod/config_example.conf
6363

6464

65-
FROM zoeyvid/nginx-quic:485-python
65+
FROM zoeyvid/nginx-quic:514-python
6666
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
6767
ENV NODE_ENV=production
68-
ARG CRS_VER=v4.14.0
68+
ARG CRS_VER=v4.15.0
6969

7070
COPY rootfs /
7171
COPY --from=strip-backend /app /app

README.md

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# NPMplus
22

3-
This is an improved fork of the nginx-proxy-manager and comes as a pre-built docker image that enables you to easily forward to your websites
4-
running at home or otherwise, including free TLS, without having to know too much about Nginx or Certbot. <br>
3+
This is an improved fork of the nginx-proxy-manager and comes as a pre-built docker image that enables you to easily forward to your websites running at home or otherwise, including free TLS, without having to know too much about Nginx or Certbot. <br>
54
If you don't need the web GUI of NPMplus, you may also have a look at caddy: https://caddyserver.com
65

76
- [Quick Setup](#quick-setup)
@@ -31,7 +30,7 @@ so that the barrier for entry here is low.
3130
- Supports HTTP/3 (QUIC) protocol, requires you to expose https with udp.
3231
- Supports CrowdSec IPS. Please see [here](https://github.com/ZoeyVid/NPMplus#crowdsec) to enable it.
3332
- goaccess included, see compose.yaml to enable, runs by default on `https://<ip>:91` (nginx config from [here](https://github.com/xavier-hernandez/goaccess-for-nginxproxymanager/blob/main/resources/nginx/nginx.conf))
34-
- Supports ModSecurity, with coreruleset as an option. You can configure ModSecurity/coreruleset by editing the files in the `/opt/npmplus/modsecurity` folder (no support from me, you need to write the rules yourself - for CoreRuleSet I can try to help you).
33+
- Supports ModSecurity (which tends to overblocking), with coreruleset as an option. You can configure ModSecurity/coreruleset by editing the files in the `/opt/npmplus/modsecurity` folder (no support from me, you need to write the rules yourself - for CoreRuleSet I can try to help you).
3534
- By default NPMplus UI does not work when you proxy NPMplus through NPMplus and you have CoreRuleSet enabled, see below
3635
- ModSecurity by default blocks uploads of big files, you need to edit its config to fix this, but it can use a lot of resources to scan big files by ModSecurity
3736
- ModSecurity overblocking (403 Error) when using CoreRuleSet? Please see [here](https://coreruleset.org/docs/concepts/false_positives_tuning) and edit the `/opt/npmplus/modsecurity/crs-setup.conf` file.
@@ -58,8 +57,7 @@ so that the barrier for entry here is low.
5857
- `Server` response header hidden
5958
- PHP optional, with option to add extensions; available packages can added using envs in the compose file, recommended to be used together with PUID/PGID
6059
- Allows different acme servers using env
61-
- Supports up to 99 domains per cert
62-
- Brotli compression can be enabled
60+
- Supports Brotli compression
6361
- punycode domain support
6462
- HTTP/2 always enabled with fixed upload
6563
- Allows infinite upload size (may be limited if you use ModSecurity)
@@ -107,18 +105,20 @@ The default admin password will be logged to the NPMplus docker logs <br>
107105
Immediately after logging in with this default user you will be asked to modify your details and change your password. <br>
108106

109107
# Crowdsec
110-
Note: Using Immich behind NPMplus with enabled appsec causes issues, see here: [#1241](https://github.com/ZoeyVid/NPMplus/discussions/1241)
108+
Note: Using Immich behind NPMplus with enabled appsec causes issues, see here: [#1241](https://github.com/ZoeyVid/NPMplus/discussions/1241) <br>
109+
Note: If you don't [disable sharing in crowdsec](https://docs.crowdsec.net/docs/next/configuration/crowdsec_configuration/#sharing), you need to mention that [this](https://docs.crowdsec.net/docs/central_api/intro/#signal-meta-data) is sent to crowdsec in your privacy policy.
111110
1. Install crowdsec and the ZoeyVid/npmplus collection for example by using crowdsec container at the end of the compose.yaml
112111
2. set LOGROTATE to `true` in your `compose.yaml` and redeploy
113112
3. open `/opt/crowdsec/conf/acquis.d/npmplus.yaml` (path may be different depending how you installed crowdsec) and fill it with:
114113
```yaml
115114
filenames:
116-
- /opt/npmplus/nginx/*.log
115+
- /opt/npmplus/nginx/access.log
116+
- /opt/npmplus/nginx/error.log
117117
labels:
118118
type: npmplus
119119
---
120120
filenames:
121-
- /opt/npmplus/nginx/*.log
121+
- /opt/npmplus/nginx/error.log
122122
labels:
123123
type: modsecurity
124124
---
@@ -227,7 +227,7 @@ proxy_set_header X-authentik-uid $authentik_uid;
227227
#auth_request_set $authentik_auth $upstream_http_authorization;
228228
#proxy_set_header Authorization $authentik_auth;
229229
```
230-
2. create a location with the path `/outpost.goauthentik.io`, this should proxy to your authentik, examples: http://authentik.company:9000/outpost.goauthentik.io (embedded outpost) or http://outpost.company:9000 (manual outpost deployments), then press the gear button and paste the following in the new text field
230+
2. create a location with the path `/outpost.goauthentik.io`, this should proxy to your authentik, examples: `http://authentik.company:9000/outpost.goauthentik.io` (embedded outpost) or `http://outpost.company:9000` (manual outpost deployments), then press the gear button and paste the following in the new text field
231231
```
232232
auth_request_set $auth_cookie $upstream_http_set_cookie;
233233
more_set_headers 'Set-Cookie: $auth_cookie';
@@ -273,6 +273,37 @@ proxy_pass_request_body off;
273273
proxy_set_header Content-Length "";
274274
```
275275

276+
### tinyauth config example (no guarantee for security of it)
277+
1. create a custom location / (or the location you want to use), set your proxy settings, then press the gear button and paste the following in the new text field:
278+
```
279+
auth_request /tinyauth;
280+
error_page 401 = @tinyauth_login;
281+
```
282+
2. create a location with the path `/tinyauth`, this should proxy to your tinyauth, example: `http://<ip>:<port>/api/auth/nginx`
283+
3. paste the following in the advanced config tab, you may need to adjust the last lines:
284+
```
285+
location @tinyauth_login {
286+
internal;
287+
return 302 http://tinyauth.example.com/login?redirect_uri=$scheme://$host$request_uri; # Make sure to replace the http://tinyauth.example.com with your own app URL
288+
}
289+
```
290+
291+
### Hints for Your Privacy Policy
292+
**Note: This is not legal advice. The following points are intended to give you hints and help you identify areas that may be relevant to your privacy policy. This list may not be complete or correct.**
293+
1. NPMplus **always** writes the nginx error logs to your Docker logs; it uses the error level “warn” (so every error nginx and the nginx modules mark as error level “warn” or higher will be logged), as it contains user information (like IPs) you should mention it in your privacy policy. With the default installation no user data should leave your system because of NPMplus (except for data sent to your backends, as this is the task of a reverse proxy), this should be the only data created by NPMplus containing user information by default.
294+
2. If you enable `LOGROTATE` the access and error (also level “warn”) logs will be written to your disk and rotated every 25 hours and deleted based on your set number of set rotations. The access logs use these formats: [http](https://github.com/ZoeyVid/NPMplus/blob/c6a2df722390eb3f4377c603e16587fe8c74e54f/rootfs/usr/local/nginx/conf/nginx.conf#L30) and [stream](https://github.com/ZoeyVid/NPMplus/blob/c6a2df722390eb3f4377c603e16587fe8c74e54f/rootfs/usr/local/nginx/conf/nginx.conf#L249). These include user information (like IPs), so make sure to also mention that these exist and what you are doing with them.
295+
3. If you use crowdsec, and you do **not** [disable sharing in crowdsec](https://docs.crowdsec.net/docs/next/configuration/crowdsec_configuration/#sharing), you need to mention that [this](https://docs.crowdsec.net/docs/central_api/intro/#signal-meta-data) is sent to crowdsec in your privacy policy.
296+
4. If you block IPs like for example through access lists, geoip and/or crowdsec block lists, then you may also need to be mention this.
297+
5. If GoAccess is enabled, it processes access logs to generate statistics, which are saved on disk for a time you can configure. These statistics include user information (like IPs), so make sure to also mention this.
298+
6. If you use the PHP-FPM option, error logs from PHP-FPM will also be written to Docker logs. These include user information (like IPs), so make sure to also mention this.
299+
7. If you use open-appsec `NGINX_LOAD_OPENAPPSEC_ATTACHMENT_MODULE`, you should also include information about it; since I don't use it myself, I can't give you further hints.
300+
8. If you collect any user information (like through other custom nginx modules, modules you can load via env, lua scripts, ...), also mention it.
301+
10. If you use the caddy http to https redirect container, you should also mention the data collected by it, since it will also collect (error) logs.
302+
11. If you do any extra custom/advanced configuration/modification, which is in someway related to the users data, then yes, keep in mind to also mention this.
303+
12. Anything else you do with the users data, should also be mentioned. (Like what you backend does or any other proxies in front of NPMplus, how data is stored, how long, ads, analytic tools, how data is handled if they contact your, etc.)
304+
13. I think this does not need to be mentioned, but you can mention it if you want to be sure (does not apply if you use letsencrypt, they don't support OCSP anymore): some clients (like firefox) send OCSP requests to your CA by default if the CA adds OCSP-URLs to your cert (can be disabled by the users in firefox), I think this does not need to be mentioned as no data goes to you, but directly to the CA and the client initiates this check by itself and is not ask or required by you to do this, your cert just says the the client can check this if it wants
305+
14. Also optional and should no be required, I think: some information about the data saved by the nameservers running your domain, should not be required I think, since nearly always there is a provider between the users and your nameserver which acts like a proxy so the dns requests of your users will be hidden as theier provider, which instead should explain theier users how they handle data as "dns proxy"
306+
276307
### prerun scripts (EXPERT option) - if you don't know what this is, ignore it
277308
if you need to run scripts before NPMplus launches put them under: `/opt/npmplus/prerun/*.sh` (please add `#!/usr/bin/env sh` / `#!/usr/bin/env bash` to the top of the script) you need to create this folder yourself, also enable the env
278309

backend/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ async function appStart() {
2121
internalCertificate.initTimer();
2222
internalIpRanges.initTimer();
2323

24-
const server = app.listen(Number(process.env.NIBEP), '127.0.0.1', () => {
25-
logger.info('Backend PID ' + process.pid + ' listening on port ' + process.env.NIBEP);
24+
const server = app.listen('/run/npmplus.sock', () => {
25+
logger.info('Backend PID ' + process.pid + ' listening on unix socket');
2626

2727
process.on('SIGTERM', () => {
2828
logger.info('PID ' + process.pid + ' received SIGTERM');

backend/internal/ip_ranges.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ const internalIpRanges = {
104104
let template = null;
105105
const filename = '/tmp/ip_ranges.conf';
106106
try {
107-
template = fs.readFileSync('/app/templates/ip_ranges.conf', { encoding: 'utf8' });
107+
template = fs.readFileSync('/app/templates/_ip_ranges.conf', { encoding: 'utf8' });
108108
} catch (err) {
109109
reject(new error.ConfigurationError(err.message));
110110
return;

backend/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "A beautiful interface for creating Nginx endpoints",
55
"main": "index.js",
66
"dependencies": {
7-
"@apidevtools/json-schema-ref-parser": "12.0.2",
7+
"@apidevtools/json-schema-ref-parser": "13.0.5",
88
"ajv": "8.17.1",
99
"apache-md5": "1.1.8",
1010
"archiver": "7.0.1",
@@ -23,7 +23,7 @@
2323
"moment": "2.30.1",
2424
"mysql2": "3.14.1",
2525
"node-rsa": "1.1.1",
26-
"openid-client": "6.5.0",
26+
"openid-client": "6.5.1",
2727
"objection": "3.1.5",
2828
"path": "0.12.7",
2929
"pg": "8.16.0",
@@ -33,12 +33,12 @@
3333
"author": "Jamie Curnow <jc@jc21.com> and ZoeyVid <zoeyvid@zvcdn.de>",
3434
"license": "MIT",
3535
"devDependencies": {
36-
"@apidevtools/swagger-parser": "10.1.1",
37-
"@eslint/js": "9.27.0",
38-
"eslint": "9.27.0",
36+
"@apidevtools/swagger-parser": "11.0.1",
37+
"@eslint/js": "9.29.0",
38+
"eslint": "9.29.0",
3939
"eslint-config-prettier": "10.1.5",
40-
"eslint-plugin-prettier": "5.4.0",
41-
"globals": "16.1.0",
40+
"eslint-plugin-prettier": "5.4.1",
41+
"globals": "16.2.0",
4242
"prettier": "3.5.3"
4343
},
4444
"scripts": {

backend/templates/_access.conf

Lines changed: 0 additions & 24 deletions
This file was deleted.

backend/templates/_brotli.conf

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)