Skip to content

Commit dd038b6

Browse files
renovate[bot]Zoey2936
authored andcommitted
dep updates/try to close NginxProxyManager#704
Signed-off-by: Zoey <zoey@z0ey.de>
1 parent 61164ee commit dd038b6

File tree

9 files changed

+26
-27
lines changed

9 files changed

+26
-27
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ ARG CRS_VER=v4.0.0
6363

6464
COPY rootfs /
6565
COPY --from=zoeyvid/certbot-docker:26 /usr/local /usr/local
66-
COPY --from=zoeyvid/curl-quic:373 /usr/local/bin/curl /usr/local/bin/curl
66+
COPY --from=zoeyvid/curl-quic:374 /usr/local/bin/curl /usr/local/bin/curl
6767

6868
RUN apk upgrade --no-cache -a && \
6969
apk add --no-cache ca-certificates tzdata tini \

README.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,7 @@ so that the barrier for entry here is low.
100100

101101
# Crowdsec
102102
1. Install crowdsec using this compose file: https://github.com/ZoeyVid/NPMplus/blob/develop/compose.crowdsec.yaml
103-
2. open `/opt/crowdsec/conf/acquis.d/appsec.yaml` and fill it with:
104-
```yaml
105-
listen_addr: 0.0.0.0:7422
106-
appsec_config: crowdsecurity/virtual-patching
107-
name: myAppSecComponent
108-
source: appsec
109-
labels:
110-
type: appsec
111-
```
112-
3. open `/opt/crowdsec/conf/acquis.d/npmplus.yaml` and fill it with:
103+
2. open `/opt/crowdsec/conf/acquis.d/npmplus.yaml` and fill it with:
113104
```yaml
114105
filenames:
115106
- /opt/npm/nginx/access.log
@@ -127,15 +118,22 @@ container_name:
127118
- npmplus
128119
labels:
129120
type: modsecurity
121+
---
122+
listen_addr: 0.0.0.0:7422
123+
appsec_config: crowdsecurity/virtual-patching
124+
name: appsec
125+
source: appsec
126+
labels:
127+
type: appsec
130128
```
131-
4. make sure to use `network_mode: host` in your compose file
132-
5. run `docker exec crowdsec cscli bouncers add npmplus -o raw` and save the output
133-
6. open `/opt/npm/etc/crowdsec/crowdsec.conf`
134-
7. set `ENABLED` to `true`
135-
8. use the output of step 5 as `API_KEY`
136-
9. save the file
137-
10. set LOGROTATE to `true` in your `compose.yaml`
138-
11. redeploy the `compose.yaml`
129+
3. make sure to use `network_mode: host` in your compose file
130+
4. run `docker exec crowdsec cscli bouncers add npmplus -o raw` and save the output
131+
5. open `/opt/npm/etc/crowdsec/crowdsec.conf`
132+
6. set `ENABLED` to `true`
133+
7. use the output of step 5 as `API_KEY`
134+
8. save the file
135+
9. set LOGROTATE to `true` in your `compose.yaml`
136+
10. redeploy the `compose.yaml`
139137

140138
# coreruleset plugins
141139
1. Download the plugin (all files inside the `plugins` folder of the git repo), most time: `<plugin-name>-before.conf`, `<plugin-name>-config.conf` and `<plugin-name>-after.conf` and sometimes `<plugin-name>.data` and/or `<plugin-name>.lua` or somilar files

backend/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"bcrypt": "5.1.1",
1212
"body-parser": "1.20.2",
1313
"compression": "1.7.4",
14-
"express": "4.18.3",
15-
"express-fileupload": "1.4.3",
14+
"express": "4.19.0",
15+
"express-fileupload": "1.5.0",
1616
"gravatar": "1.8.2",
1717
"jsonwebtoken": "9.0.2",
1818
"knex": "3.1.0",

compose.crowdsec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ services:
99
- "127.0.0.1:8080:8080"
1010
environment:
1111
- "TZ=Europe/Berlin"
12-
- "COLLECTIONS=ZoeyVid/npmplus crowdsecurity/appsec-virtual-patching"
12+
- "COLLECTIONS=ZoeyVid/npmplus"
1313
volumes:
1414
- "/opt/crowdsec/conf:/etc/crowdsec"
1515
- "/opt/crowdsec/data:/var/lib/crowdsec/data"

compose.override.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: "3"
21
services:
32
npmplus-caddy:
43
container_name: npmplus-caddy

compose.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: "3"
21
services:
32
npmplus:
43
container_name: npmplus
@@ -23,7 +22,7 @@ services:
2322
# - "IPV6_BINDING=[::1]" # IPv6 address to bind, defaults to all
2423
# - "NPM_IPV6_BINDING=[::1]" # IPv6 address to bind for the NPM UI, defaults to all
2524
# - "GOA_IPV6_BINDING=[::1]" # IPv6 address to bind for goaccess, defaults to all
26-
# - "DISABLE_IPV6=true" # disable IPv6, overrides with IPV6_BINDING, default false
25+
# - "DISABLE_IPV6=true" # disable IPv6 and IPv6 resolver of nginx, overrides with IPV6_BINDING, default false
2726
# - "NPM_DISABLE_IPV6=true" # disable IPv6 for the NPM UI, overrides NPM_IPV6_BINDING, default false
2827
# - "GOA_DISABLE_IPV6=true" # disable IPv6 for goaccess, overrides GOA_IPV6_BINDING, default false
2928
# - "NPM_LISTEN_LOCALHOST=true" # Binds the NPM UI only to localhost, overrides NPM_IPV4_BINDING/NPM_IPV6_BINDING, default false

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "A beautiful interface for creating Nginx endpoints",
55
"main": "js/index.js",
66
"dependencies": {
7-
"@babel/core": "7.24.0",
7+
"@babel/core": "7.24.3",
88
"babel-core": "6.26.3",
99
"babel-loader": "8.3.0",
1010
"babel-preset-env": "1.7.0",

rootfs/usr/local/bin/start.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,12 +700,14 @@ find /usr/local/nginx/conf/conf.d -type f -name '*.conf' -exec sed -i "s/#\?list
700700
find /data/nginx -type f -name '*.conf' -not -path "/data/nginx/custom/*" -exec sed -i "s/#\?listen \([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+:\)\?\([0-9]\+\)/listen $IPV4_BINDING:\2/g" {} \;
701701

702702
if [ "$DISABLE_IPV6" = "true" ]; then
703+
sed -i "s|ipv6=on;|ipv6=off;|g"
703704
sed -i "s/#\?listen \[\([0-9a-f:]\+\)\]:\([0-9]\+\)/#listen \[\1\]:\2/g" /app/templates/_listen.conf
704705
sed -i "s/#\?listen \[\([0-9a-f:]\+\)\]:\([0-9]\+\)/#listen \[\1\]:\2/g" /app/templates/default.conf
705706
sed -i "s/#\?listen \[\([0-9a-f:]\+\)\]:\({{ incoming_port }}\)/#listen \[\1\]:\2/g" /app/templates/stream.conf
706707
find /usr/local/nginx/conf/conf.d -type f -name '*.conf' -exec sed -i "s/#\?listen \[\([0-9a-f:]\+\)\]:\([0-9]\+\)/#listen \[\1\]:\2/g" {} \;
707708
find /data/nginx -type f -name '*.conf' -not -path "/data/nginx/custom/*" -exec sed -i "s/#\?listen \[\([0-9a-f:]\+\)\]:\([0-9]\+\)/#listen \[\1\]:\2/g" {} \;
708709
else
710+
sed -i "s|ipv6=off;|ipv6=on;|g"
709711
sed -i "s/#\?listen \[\([0-9a-f:]\+\)\]:\([0-9]\+\)/listen $IPV6_BINDING:\2/g" /app/templates/_listen.conf
710712
sed -i "s/#\?listen \[\([0-9a-f:]\+\)\]:\([0-9]\+\)/listen $IPV6_BINDING:\2/g" /app/templates/default.conf
711713
sed -i "s/#\?listen \[\([0-9a-f:]\+\)\]:\({{ incoming_port }}\)/listen $IPV6_BINDING:\2/g" /app/templates/stream.conf

rootfs/usr/local/nginx/conf/nginx.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ http {
5454
quic_retry on;
5555
ssl_dyn_rec_enable on;
5656

57-
resolver local=on valid=10s ipv6=off;
57+
resolver local=on valid=10s ipv6=on;
5858
fastcgi_index index.php;
5959
index index.php index.html;
6060

@@ -143,6 +143,7 @@ http {
143143
stream {
144144
log_format proxy '$remote_addr [$time_local] $protocol $status $bytes_sent $bytes_received $session_time "$upstream_addr" "$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"';
145145
access_log off; # stream
146+
resolver local=on valid=10s ipv6=on;
146147

147148
# Custom
148149
include /data/nginx/custom/stream_top.conf;

0 commit comments

Comments
 (0)