Skip to content

Commit fee87a4

Browse files
authored
Merge pull request #1348 from jc21/develop
v2.9.8
2 parents c47f6fd + 5c67908 commit fee87a4

File tree

23 files changed

+155
-55
lines changed

23 files changed

+155
-55
lines changed

.version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.9.7
1+
2.9.8

README.md

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<p align="center">
22
<img src="https://nginxproxymanager.com/github.png">
33
<br><br>
4-
<img src="https://img.shields.io/badge/version-2.9.7-green.svg?style=for-the-badge">
4+
<img src="https://img.shields.io/badge/version-2.9.8-green.svg?style=for-the-badge">
55
<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager">
66
<img src="https://img.shields.io/docker/stars/jc21/nginx-proxy-manager.svg?style=for-the-badge">
77
</a>
@@ -17,7 +17,6 @@
1717
<a href="https://reddit.com/r/nginxproxymanager">
1818
<img alt="Reddit" src="https://img.shields.io/reddit/subreddit-subscribers/nginxproxymanager?label=Reddit%20Community&style=for-the-badge">
1919
</a>
20-
2120
</p>
2221

2322
This project comes as a pre-built docker image that enables you to easily forward to your websites
@@ -470,6 +469,20 @@ Special thanks to the following contributors:
470469
<br /><sub><b>gabbe</b></sub>
471470
</a>
472471
</td>
472+
<td align="center">
473+
<a href="https://github.com/bmbvenom">
474+
<img src="https://avatars.githubusercontent.com/u/20530371?v=4" width="80" alt=""/>
475+
<br /><sub><b>bmbvenom</b></sub>
476+
</a>
477+
</td>
478+
</tr>
479+
<tr>
480+
<td align="center">
481+
<a href="https://github.com/FMeinicke">
482+
<img src="https://avatars.githubusercontent.com/u/42121639?v=4" width="80" alt=""/>
483+
<br /><sub><b>Florian Meinicke</b></sub>
484+
</a>
485+
</td>
473486
</tr>
474487
</table>
475488
<!-- markdownlint-enable -->

backend/internal/access-list.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ const internalAccessList = {
118118
// Sanity check that something crazy hasn't happened
119119
throw new error.InternalValidationError('Access List could not be updated, IDs do not match: ' + row.id + ' !== ' + data.id);
120120
}
121-
122121
})
123122
.then(() => {
124123
// patch name if specified
@@ -205,6 +204,7 @@ const internalAccessList = {
205204
});
206205
}
207206
})
207+
.then(internalNginx.reload)
208208
.then(() => {
209209
// Add to audit log
210210
return internalAuditLog.add(access, {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
const migrate_name = 'stream_domain';
2+
const logger = require('../logger').migrate;
3+
4+
/**
5+
* Migrate
6+
*
7+
* @see http://knexjs.org/#Schema
8+
*
9+
* @param {Object} knex
10+
* @param {Promise} Promise
11+
* @returns {Promise}
12+
*/
13+
exports.up = function (knex/*, Promise*/) {
14+
logger.info('[' + migrate_name + '] Migrating Up...');
15+
16+
return knex.schema.table('stream', (table) => {
17+
table.renameColumn('forward_ip', 'forwarding_host');
18+
})
19+
.then(function () {
20+
logger.info('[' + migrate_name + '] stream Table altered');
21+
});
22+
};
23+
24+
/**
25+
* Undo Migrate
26+
*
27+
* @param {Object} knex
28+
* @param {Promise} Promise
29+
* @returns {Promise}
30+
*/
31+
exports.down = function (knex/*, Promise*/) {
32+
logger.info('[' + migrate_name + '] Migrating Down...');
33+
34+
return knex.schema.table('stream', (table) => {
35+
table.renameColumn('forwarding_host', 'forward_ip');
36+
})
37+
.then(function () {
38+
logger.info('[' + migrate_name + '] stream Table altered');
39+
});
40+
};

backend/schema/endpoints/streams.json

+21-10
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,20 @@
2020
"minimum": 1,
2121
"maximum": 65535
2222
},
23-
"forward_ip": {
24-
"type": "string",
25-
"format": "ipv4"
23+
"forwarding_host": {
24+
"oneOf": [
25+
{
26+
"$ref": "../definitions.json#/definitions/domain_name"
27+
},
28+
{
29+
"type": "string",
30+
"format": "ipv4"
31+
},
32+
{
33+
"type": "string",
34+
"format": "ipv6"
35+
}
36+
]
2637
},
2738
"forwarding_port": {
2839
"type": "integer",
@@ -55,8 +66,8 @@
5566
"incoming_port": {
5667
"$ref": "#/definitions/incoming_port"
5768
},
58-
"forward_ip": {
59-
"$ref": "#/definitions/forward_ip"
69+
"forwarding_host": {
70+
"$ref": "#/definitions/forwarding_host"
6071
},
6172
"forwarding_port": {
6273
"$ref": "#/definitions/forwarding_port"
@@ -107,15 +118,15 @@
107118
"additionalProperties": false,
108119
"required": [
109120
"incoming_port",
110-
"forward_ip",
121+
"forwarding_host",
111122
"forwarding_port"
112123
],
113124
"properties": {
114125
"incoming_port": {
115126
"$ref": "#/definitions/incoming_port"
116127
},
117-
"forward_ip": {
118-
"$ref": "#/definitions/forward_ip"
128+
"forwarding_host": {
129+
"$ref": "#/definitions/forwarding_host"
119130
},
120131
"forwarding_port": {
121132
"$ref": "#/definitions/forwarding_port"
@@ -154,8 +165,8 @@
154165
"incoming_port": {
155166
"$ref": "#/definitions/incoming_port"
156167
},
157-
"forward_ip": {
158-
"$ref": "#/definitions/forward_ip"
168+
"forwarding_host": {
169+
"$ref": "#/definitions/forwarding_host"
159170
},
160171
"forwarding_port": {
161172
"$ref": "#/definitions/forwarding_port"

backend/templates/stream.conf

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ server {
1212
#listen [::]:{{ incoming_port }};
1313
{% endif %}
1414

15-
proxy_pass {{ forward_ip }}:{{ forwarding_port }};
15+
proxy_pass {{ forwarding_host }}:{{ forwarding_port }};
1616

1717
# Custom
1818
include /data/nginx/custom/server_stream[.]conf;
@@ -27,7 +27,7 @@ server {
2727
{% else -%}
2828
#listen [::]:{{ incoming_port }} udp;
2929
{% endif %}
30-
proxy_pass {{ forward_ip }}:{{ forwarding_port }};
30+
proxy_pass {{ forwarding_host }}:{{ forwarding_port }};
3131

3232
# Custom
3333
include /data/nginx/custom/server_stream[.]conf;

backend/yarn.lock

+6-6
Original file line numberDiff line numberDiff line change
@@ -2340,9 +2340,9 @@ normalize-path@^3.0.0, normalize-path@~3.0.0:
23402340
integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
23412341

23422342
normalize-url@^4.1.0:
2343-
version "4.5.0"
2344-
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129"
2345-
integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==
2343+
version "4.5.1"
2344+
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a"
2345+
integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==
23462346

23472347
npm-bundled@^1.0.1:
23482348
version "1.1.1"
@@ -2608,9 +2608,9 @@ path-key@^2.0.1:
26082608
integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
26092609

26102610
path-parse@^1.0.6:
2611-
version "1.0.6"
2612-
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
2613-
integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
2611+
version "1.0.7"
2612+
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
2613+
integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
26142614

26152615
path-root-regex@^0.1.0:
26162616
version "0.1.2"

docker/.dive-ci

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
rules:
2+
# If the efficiency is measured below X%, mark as failed.
3+
# Expressed as a ratio between 0-1.
4+
lowestEfficiency: 0.99
5+
6+
# If the amount of wasted space is at least X or larger than X, mark as failed.
7+
# Expressed in B, KB, MB, and GB.
8+
highestWastedBytes: 15MB
9+
10+
# If the amount of wasted space makes up for X% or more of the image, mark as failed.
11+
# Note: the base image layer is NOT included in the total image size.
12+
# Expressed as a ratio between 0-1; fails if the threshold is met or crossed.
13+
highestUserWastedPercent: 0.02
14+

docker/Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# This file assumes that the frontend has been built using ./scripts/frontend-build
55

6-
FROM jc21/nginx-full:node
6+
FROM nginxproxymanager/nginx-full:node
77

88
ARG TARGETPLATFORM
99
ARG BUILD_VERSION
@@ -48,7 +48,6 @@ RUN chmod 644 /etc/logrotate.d/nginx-proxy-manager
4848

4949
VOLUME [ "/data", "/etc/letsencrypt" ]
5050
ENTRYPOINT [ "/init" ]
51-
HEALTHCHECK --interval=5s --timeout=3s CMD /bin/check-health
5251

5352
LABEL org.label-schema.schema-version="1.0" \
5453
org.label-schema.license="MIT" \

docker/dev/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM jc21/nginx-full:node
1+
FROM nginxproxymanager/nginx-full:node
22
LABEL maintainer="Jamie Curnow <jc@jc21.com>"
33

44
ENV S6_LOGGING=0 \
@@ -26,4 +26,4 @@ RUN curl -L -o /tmp/s6-overlay-amd64.tar.gz "https://github.com/just-containers/
2626

2727
EXPOSE 80 81 443
2828
ENTRYPOINT [ "/init" ]
29-
HEALTHCHECK --interval=5s --timeout=3s CMD /bin/check-health
29+

docker/docker-compose.ci.yml

+8
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ services:
2020
- 443
2121
depends_on:
2222
- db
23+
healthcheck:
24+
test: ["CMD", "/bin/check-health"]
25+
interval: 10s
26+
timeout: 3s
2327

2428
fullstack-sqlite:
2529
image: ${IMAGE}:ci-${BUILD_NUMBER}
@@ -33,6 +37,10 @@ services:
3337
- 81
3438
- 80
3539
- 443
40+
healthcheck:
41+
test: ["CMD", "/bin/check-health"]
42+
interval: 10s
43+
timeout: 3s
3644

3745
db:
3846
image: jc21/mariadb-aria

docker/rootfs/etc/services.d/frontend/run

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
if [ "$DEVELOPMENT" == "true" ]; then
66
cd /app/frontend || exit 1
7+
# If yarn install fails: add --verbose --network-concurrency 1
78
yarn install
89
yarn watch
910
else

docker/rootfs/etc/services.d/manager/run

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ cd /app || echo
66

77
if [ "$DEVELOPMENT" == "true" ]; then
88
cd /app || exit 1
9+
# If yarn install fails: add --verbose --network-concurrency 1
910
yarn install
1011
node --max_old_space_size=250 --abort_on_uncaught_exception node_modules/nodemon/bin/nodemon.js
1112
else

docker/rootfs/etc/services.d/nginx/run

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ then
3636
-days 3650 \
3737
-nodes \
3838
-x509 \
39-
-subj '/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost' \
39+
-subj '/O=localhost/OU=localhost/CN=localhost' \
4040
-keyout /data/nginx/dummykey.pem \
4141
-out /data/nginx/dummycert.pem
4242
echo "Complete"

docs/advanced-config/README.md

+12
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ file, it's "exposed" by the portainer docker image for you and not available on
4848
the docker host outside of this docker network. The service name is used as the
4949
hostname, so make sure your service names are unique when using the same network.
5050

51+
## Docker Healthcheck
52+
53+
The `Dockerfile` that builds this project does not include a `HEALTCHECK` but you can opt in to this
54+
feature by adding the following to the service in your `docker-compose.yml` file:
55+
56+
```yml
57+
healthcheck:
58+
test: ["CMD", "/bin/check-health"]
59+
interval: 10s
60+
timeout: 3s
61+
```
62+
5163
## Docker Secrets
5264

5365
This image supports the use of Docker secrets to import from file and keep sensitive usernames or passwords from being passed or preserved in plaintext.

docs/yarn.lock

+10-12
Original file line numberDiff line numberDiff line change
@@ -2560,7 +2560,7 @@ cli-boxes@^2.2.0:
25602560
resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.0.tgz#538ecae8f9c6ca508e3c3c95b453fe93cb4c168d"
25612561
integrity sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w==
25622562

2563-
clipboard@^2.0.0, clipboard@^2.0.6:
2563+
clipboard@^2.0.6:
25642564
version "2.0.6"
25652565
resolved "https://registry.yarnpkg.com/clipboard/-/clipboard-2.0.6.tgz#52921296eec0fdf77ead1749421b21c968647376"
25662566
integrity sha512-g5zbiixBRk/wyKakSwCKd7vQXDjFnAMGHoEyBogG/bw9kTD9GvdAvaoRR1ALcEzt3pVKxZR0pViekPMIS0QyGg==
@@ -7173,9 +7173,9 @@ path-key@^3.0.0, path-key@^3.1.0, path-key@^3.1.1:
71737173
integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
71747174

71757175
path-parse@^1.0.6:
7176-
version "1.0.6"
7177-
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
7178-
integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
7176+
version "1.0.7"
7177+
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
7178+
integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
71797179

71807180
path-to-regexp@0.1.7:
71817181
version "0.1.7"
@@ -7699,11 +7699,9 @@ pretty-time@^1.1.0:
76997699
integrity sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==
77007700

77017701
prismjs@^1.13.0, prismjs@^1.20.0:
7702-
version "1.23.0"
7703-
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.23.0.tgz#d3b3967f7d72440690497652a9d40ff046067f33"
7704-
integrity sha512-c29LVsqOaLbBHuIbsTxaKENh1N2EQBOHaWv7gkHN4dgRbxSREqDnDbtFJYdpPauS4YCplMSNCABQ6Eeor69bAA==
7705-
optionalDependencies:
7706-
clipboard "^2.0.0"
7702+
version "1.24.0"
7703+
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.24.0.tgz#0409c30068a6c52c89ef7f1089b3ca4de56be2ac"
7704+
integrity sha512-SqV5GRsNqnzCL8k5dfAjCNhUrF3pR0A9lTDSCUZeh/LIshheXJEaP0hwLz2t4XHivd2J/v2HR+gRnigzeKe3cQ==
77077705

77087706
private@^0.1.8:
77097707
version "0.1.8"
@@ -9652,9 +9650,9 @@ url-parse-lax@^3.0.0:
96529650
prepend-http "^2.0.0"
96539651

96549652
url-parse@^1.4.3, url-parse@^1.4.7:
9655-
version "1.5.0"
9656-
resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.0.tgz#90aba6c902aeb2d80eac17b91131c27665d5d828"
9657-
integrity sha512-9iT6N4s93SMfzunOyDPe4vo4nLcSu1yq0IQK1gURmjm8tQNlM6loiuCRrKG1hHGXfB2EWd6H4cGi7tGdaygMFw==
9653+
version "1.5.2"
9654+
resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.2.tgz#a4eff6fd5ff9fe6ab98ac1f79641819d13247cda"
9655+
integrity sha512-6bTUPERy1muxxYClbzoRo5qtQuyoGEbzbQvi0SW4/8U8UyVkAQhWFBlnigqJkRm4su4x1zDQfNbEzWkt+vchcg==
96589656
dependencies:
96599657
querystringify "^2.1.1"
96609658
requires-port "^1.0.0"

frontend/js/app/nginx/stream/form.ejs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
</div>
1515
<div class="col-sm-8 col-md-8">
1616
<div class="form-group">
17-
<label class="form-label"><%- i18n('streams', 'forward-ip') %><span class="form-required">*</span></label>
18-
<input type="text" name="forward_ip" class="form-control text-monospace" placeholder="000.000.000.000" value="<%- forward_ip %>" autocomplete="off" maxlength="15" required>
17+
<label class="form-label"><%- i18n('streams', 'forwarding-host') %><span class="form-required">*</span></label>
18+
<input type="text" name="forwarding_host" class="form-control text-monospace" placeholder="example.com or 10.0.0.1 or 2001:db8:3333:4444:5555:6666:7777:8888" value="<%- forwarding_host %>" autocomplete="off" maxlength="255" required>
1919
</div>
2020
</div>
2121
<div class="col-sm-4 col-md-4">

0 commit comments

Comments
 (0)