Skip to content

Commit

Permalink
dep updates/fix updating streams/close #965
Browse files Browse the repository at this point in the history
Signed-off-by: Zoey <zoey@z0ey.de>

close #965 by merging https://github.com/NginxProxyManager/nginx-proxy-manager/pull/4166/files and adding multi lang support

Co-Authored-By: Remco Kersten <55450744+kerstenremco@users.noreply.github.com>
  • Loading branch information
Zoey2936 and kerstenremco committed Nov 17, 2024
1 parent 8846543 commit 8fa829b
Show file tree
Hide file tree
Showing 13 changed files with 517 additions and 549 deletions.
9 changes: 3 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,12 @@ RUN apk upgrade --no-cache -a && \
sed -i "s|APPSEC_PROCESS_TIMEOUT=.*|APPSEC_PROCESS_TIMEOUT=10000|g" /src/crowdsec-nginx-bouncer/lua-mod/config_example.conf


FROM zoeyvid/nginx-quic:351-python
FROM zoeyvid/nginx-quic:352-python
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]

# until https://github.com/certbot/certbot/issues/9967 is closed
ENV PYTHONWARNINGS=ignore

COPY rootfs /
COPY --from=zoeyvid/certbot-docker:60 /usr/local /usr/local
COPY --from=zoeyvid/curl-quic:423 /usr/local/bin/curl /usr/local/bin/curl
COPY --from=zoeyvid/certbot-docker:64 /usr/local /usr/local
COPY --from=zoeyvid/curl-quic:425 /usr/local/bin/curl /usr/local/bin/curl

COPY --from=strip-backend /app /app
COPY --from=frontend /app/dist /html/frontend
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ running at home or otherwise, including free TLS, without having to know too muc
<!---
**Note: To fix [this issue](https://github.com/SpiderLabs/ModSecurity/issues/2848), instead of running `nginx -s reload`, this fork stops nginx and starts it again. This can result in a 502 error when you update your hosts. See https://github.com/ZoeyVid/NPMplus/issues/296 and https://github.com/ZoeyVid/NPMplus/issues/283.** <br>
--->
**Note: Reloading the NPMplus UI can cause a 502 error. See https://github.com/ZoeyVid/NPMplus/issues/241.** <br>
**Note: NO armv7, route53 and aws cloudfront ip ranges support.** <br>
**Note: add `net.ipv4.ip_unprivileged_port_start=0` at the end of `/etc/sysctl.conf` to support PUID/PGID in network mode host.** <br>
**Note: If you don't use network mode host, which I don't recommend, don't forget to expose port 443 on tcp AND udp (http3/quic needs udp).** <br>
Expand All @@ -20,6 +19,7 @@ running at home or otherwise, including free TLS, without having to know too muc
**Note: ModSecurity overblocking (403 Error)? Please see `/opt/npm/etc/modsecurity`, if you also use CRS please see [here](https://coreruleset.org/docs/concepts/false_positives_tuning).** <br>
**Note: Other Databases like MariaDB may work, but are unsupported.** <br>
**Note: access.log/stream.log, logrotate and goaccess are NOT enabled by default bceuase of GDPR, you can enable them in the compose.yaml.** <br>
**Note: watchtower does NOT update NPMplus, you need to do it yourself (it will only pull the image, but not update the container itself).** <br>


## Project Goal
Expand Down
10 changes: 5 additions & 5 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
"gravatar": "1.8.2",
"jsonwebtoken": "9.0.2",
"knex": "3.1.0",
"liquidjs": "10.18.0",
"liquidjs": "10.19.0",
"lodash": "4.17.21",
"moment": "2.30.1",
"mysql2": "3.11.3",
"mysql2": "3.11.4",
"node-rsa": "1.1.1",
"objection": "3.1.5",
"path": "0.12.7",
Expand All @@ -31,11 +31,11 @@
"license": "MIT",
"devDependencies": {
"@apidevtools/swagger-parser": "10.1.0",
"@eslint/js": "9.14.0",
"eslint": "9.14.0",
"@eslint/js": "9.15.0",
"eslint": "9.15.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.2.1",
"globals": "15.11.0",
"globals": "15.12.0",
"prettier": "3.3.3"
},
"scripts": {
Expand Down
55 changes: 11 additions & 44 deletions backend/schema/paths/nginx/streams/streamID/put.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,56 +29,23 @@
"additionalProperties": false,
"minProperties": 1,
"properties": {
"domain_names": {
"$ref": "../../../../components/proxy-host-object.json#/properties/domain_names"
"incoming_port": {
"$ref": "../../../../components/stream-object.json#/properties/incoming_port"
},
"forward_scheme": {
"$ref": "../../../../components/proxy-host-object.json#/properties/forward_scheme"
"forwarding_host": {
"$ref": "../../../../components/stream-object.json#/properties/forwarding_host"
},
"forward_host": {
"$ref": "../../../../components/proxy-host-object.json#/properties/forward_host"
"forwarding_port": {
"$ref": "../../../../components/stream-object.json#/properties/forwarding_port"
},
"forward_port": {
"$ref": "../../../../components/proxy-host-object.json#/properties/forward_port"
"tcp_forwarding": {
"$ref": "../../../../components/stream-object.json#/properties/tcp_forwarding"
},
"certificate_id": {
"$ref": "../../../../components/proxy-host-object.json#/properties/certificate_id"
},
"ssl_forced": {
"$ref": "../../../../components/proxy-host-object.json#/properties/ssl_forced"
},
"hsts_enabled": {
"$ref": "../../../../components/proxy-host-object.json#/properties/hsts_enabled"
},
"hsts_subdomains": {
"$ref": "../../../../components/proxy-host-object.json#/properties/hsts_subdomains"
},
"http2_support": {
"$ref": "../../../../components/proxy-host-object.json#/properties/http2_support"
},
"block_exploits": {
"$ref": "../../../../components/proxy-host-object.json#/properties/block_exploits"
},
"caching_enabled": {
"$ref": "../../../../components/proxy-host-object.json#/properties/caching_enabled"
},
"allow_websocket_upgrade": {
"$ref": "../../../../components/proxy-host-object.json#/properties/allow_websocket_upgrade"
},
"access_list_id": {
"$ref": "../../../../components/proxy-host-object.json#/properties/access_list_id"
},
"advanced_config": {
"$ref": "../../../../components/proxy-host-object.json#/properties/advanced_config"
},
"enabled": {
"$ref": "../../../../components/proxy-host-object.json#/properties/enabled"
"udp_forwarding": {
"$ref": "../../../../components/stream-object.json#/properties/udp_forwarding"
},
"meta": {
"$ref": "../../../../components/proxy-host-object.json#/properties/meta"
},
"locations": {
"$ref": "../../../../components/proxy-host-object.json#/properties/locations"
"$ref": "../../../../components/stream-object.json#/properties/meta"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/js/app/nginx/access/list/item.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<td class="text-center">
<div class="avatar d-block" style="background-image: url(<%- owner.avatar || '/images/default-avatar.jpg' %>)" title="Owned by <%- owner.name %>">
<span class="avatar-status <%- owner.is_disabled ? 'bg-red' : 'bg-green' %>"></span>
<div class="avatar d-block" style="background-image: url(<%- (owner && owner.avatar) || '/images/default-avatar.jpg' %>)" title="<%- owner && !owner.is_disabled ? i18n('users', 'owned-by', {name: owner.name}) : i18n('users', 'owned-by-deleted') %>">
<span class="avatar-status <%- owner && !owner.is_disabled ? 'bg-green' : 'bg-red' %>"></span>
</div>
</td>
<td>
Expand Down
4 changes: 2 additions & 2 deletions frontend/js/app/nginx/certificates/list/item.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<td class="text-center">
<div class="avatar d-block" style="background-image: url(<%- owner.avatar || '/images/default-avatar.jpg' %>)" title="Owned by <%- owner.name %>">
<span class="avatar-status <%- owner.is_disabled ? 'bg-red' : 'bg-green' %>"></span>
<div class="avatar d-block" style="background-image: url(<%- (owner && owner.avatar) || '/images/default-avatar.jpg' %>)" title="<%- owner && !owner.is_disabled ? i18n('users', 'owned-by', {name: owner.name}) : i18n('users', 'owned-by-deleted') %>">
<span class="avatar-status <%- owner && !owner.is_disabled ? 'bg-green' : 'bg-red' %>"></span>
</div>
</td>
<td>
Expand Down
4 changes: 2 additions & 2 deletions frontend/js/app/nginx/dead/list/item.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<td class="text-center">
<div class="avatar d-block" style="background-image: url(<%- owner.avatar || '/images/default-avatar.jpg' %>)" title="Owned by <%- owner.name %>">
<span class="avatar-status <%- owner.is_disabled ? 'bg-red' : 'bg-green' %>"></span>
<div class="avatar d-block" style="background-image: url(<%- (owner && owner.avatar) || '/images/default-avatar.jpg' %>)" title="<%- owner && !owner.is_disabled ? i18n('users', 'owned-by', {name: owner.name}) : i18n('users', 'owned-by-deleted') %>">
<span class="avatar-status <%- owner && !owner.is_disabled ? 'bg-green' : 'bg-red' %>"></span>
</div>
</td>
<td>
Expand Down
4 changes: 2 additions & 2 deletions frontend/js/app/nginx/proxy/list/item.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<td class="text-center">
<div class="avatar d-block" style="background-image: url(<%- owner.avatar || '/images/default-avatar.jpg' %>)" title="Owned by <%- owner.name %>">
<span class="avatar-status <%- owner.is_disabled ? 'bg-red' : 'bg-green' %>"></span>
<div class="avatar d-block" style="background-image: url(<%- (owner && owner.avatar) || '/images/default-avatar.jpg' %>)" title="<%- owner && !owner.is_disabled ? i18n('users', 'owned-by', {name: owner.name}) : i18n('users', 'owned-by-deleted') %>">
<span class="avatar-status <%- owner && !owner.is_disabled ? 'bg-green' : 'bg-red' %>"></span>
</div>
</td>
<td>
Expand Down
4 changes: 2 additions & 2 deletions frontend/js/app/nginx/redirection/list/item.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<td class="text-center">
<div class="avatar d-block" style="background-image: url(<%- owner.avatar || '/images/default-avatar.jpg' %>)" title="Owned by <%- owner.name %>">
<span class="avatar-status <%- owner.is_disabled ? 'bg-red' : 'bg-green' %>"></span>
<div class="avatar d-block" style="background-image: url(<%- (owner && owner.avatar) || '/images/default-avatar.jpg' %>)" title="<%- owner && !owner.is_disabled ? i18n('users', 'owned-by', {name: owner.name}) : i18n('users', 'owned-by-deleted') %>">
<span class="avatar-status <%- owner && !owner.is_disabled ? 'bg-green' : 'bg-red' %>"></span>
</div>
</td>
<td>
Expand Down
4 changes: 2 additions & 2 deletions frontend/js/app/nginx/stream/list/item.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<td class="text-center">
<div class="avatar d-block" style="background-image: url(<%- owner.avatar || '/images/default-avatar.jpg' %>)" title="Owned by <%- owner.name %>">
<span class="avatar-status <%- owner.is_disabled ? 'bg-red' : 'bg-green' %>"></span>
<div class="avatar d-block" style="background-image: url(<%- (owner && owner.avatar) || '/images/default-avatar.jpg' %>)" title="<%- owner && !owner.is_disabled ? i18n('users', 'owned-by', {name: owner.name}) : i18n('users', 'owned-by-deleted') %>">
<span class="avatar-status <%- owner && !owner.is_disabled ? 'bg-green' : 'bg-red' %>"></span>
</div>
</td>
<td>
Expand Down
Loading

0 comments on commit 8fa829b

Please sign in to comment.