Skip to content

Commit 84fb272

Browse files
authored
Merge pull request #5318 from NginxProxyManager/develop
v2.14.0
2 parents 47b367d + c7437dd commit 84fb272

Some content is hidden

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

45 files changed

+1452
-443
lines changed

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.13.7
1+
2.14.0

README.md

Lines changed: 10 additions & 7 deletions
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.13.7-green.svg?style=for-the-badge">
4+
<img src="https://img.shields.io/badge/version-2.14.0-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>
@@ -36,23 +36,26 @@ so that the barrier for entry here is low.
3636
- Advanced Nginx configuration available for super users
3737
- User management, permissions and audit log
3838

39+
::: warning
40+
`armv7` is no longer supported in version 2.14+. This is due to Nodejs dropping support for armhf. Please
41+
use the `2.13.7` image tag if this applies to you.
42+
:::
3943

4044
## Hosting your home network
4145

4246
I won't go in to too much detail here but here are the basics for someone new to this self-hosted world.
4347

4448
1. Your home router will have a Port Forwarding section somewhere. Log in and find it
4549
2. Add port forwarding for port 80 and 443 to the server hosting this project
46-
3. Configure your domain name details to point to your home, either with a static ip or a service like DuckDNS or [Amazon Route53](https://github.com/jc21/route53-ddns)
50+
3. Configure your domain name details to point to your home, either with a static ip or a service like
51+
- DuckDNS
52+
- [Amazon Route53](https://github.com/jc21/route53-ddns)
53+
- [Cloudflare](https://github.com/jc21/cloudflare-ddns)
4754
4. Use the Nginx Proxy Manager as your gateway to forward to your other web based services
4855

4956
## Quick Setup
5057

51-
1. Install Docker and Docker-Compose
52-
53-
- [Docker Install documentation](https://docs.docker.com/install/)
54-
- [Docker-Compose Install documentation](https://docs.docker.com/compose/install/)
55-
58+
1. [Install Docker](https://docs.docker.com/install/)
5659
2. Create a docker-compose.yml file similar to this:
5760

5861
```yml

backend/certbot/dns-plugins.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@
2323
"credentials": "dns_aliyun_access_key = 12345678\ndns_aliyun_access_key_secret = 1234567890abcdef1234567890abcdef",
2424
"full_plugin_name": "dns-aliyun"
2525
},
26+
"arvan": {
27+
"name": "ArvanCloud",
28+
"package_name": "certbot-dns-arvan",
29+
"version": ">=0.1.0",
30+
"dependencies": "",
31+
"credentials": "dns_arvan_key = Apikey xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
32+
"full_plugin_name": "dns-arvan"
33+
},
2634
"azure": {
2735
"name": "Azure",
2836
"package_name": "certbot-dns-azure",

backend/config/sqlite-test-db.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"database": {
33
"engine": "knex-native",
44
"knex": {
5-
"client": "sqlite3",
5+
"client": "better-sqlite3",
66
"connection": {
77
"filename": "/app/config/mydb.sqlite"
88
},

backend/internal/2fa.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,12 @@ const internal2fa = {
161161
}
162162

163163
const result = await verify({
164-
token: code,
165-
secret: auth.meta.totp_secret,
166-
});
164+
token: code,
165+
secret: auth.meta.totp_secret,
166+
guardrails: createGuardrails({
167+
MIN_SECRET_BYTES: 10,
168+
}),
169+
});
167170

168171
if (!result.valid) {
169172
throw new errs.AuthError("Invalid verification code");

backend/internal/certificate.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ const internalCertificate = {
630630
* @param {String} privateKey This is the entire key contents as a string
631631
*/
632632
checkPrivateKey: async (privateKey) => {
633-
const filepath = await tempWrite(privateKey, "/tmp");
633+
const filepath = await tempWrite(privateKey);
634634
const failTimeout = setTimeout(() => {
635635
throw new error.ValidationError(
636636
"Result Validation Error: Validation timed out. This could be due to the key being passphrase-protected.",
@@ -660,8 +660,8 @@ const internalCertificate = {
660660
* @param {Boolean} [throwExpired] Throw when the certificate is out of date
661661
*/
662662
getCertificateInfo: async (certificate, throwExpired) => {
663+
const filepath = await tempWrite(certificate);
663664
try {
664-
const filepath = await tempWrite(certificate, "/tmp");
665665
const certData = await internalCertificate.getCertificateInfoFromFile(filepath, throwExpired);
666666
fs.unlinkSync(filepath);
667667
return certData;
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import { migrate as logger } from "../logger.js";
2+
3+
const migrateName = "trust_forwarded_proto";
4+
5+
/**
6+
* Migrate
7+
*
8+
* @see http://knexjs.org/#Schema
9+
*
10+
* @param {Object} knex
11+
* @returns {Promise}
12+
*/
13+
const up = function (knex) {
14+
logger.info(`[${migrateName}] Migrating Up...`);
15+
16+
return knex.schema
17+
.alterTable('proxy_host', (table) => {
18+
table.tinyint('trust_forwarded_proto').notNullable().defaultTo(0);
19+
})
20+
.then(() => {
21+
logger.info(`[${migrateName}] proxy_host Table altered`);
22+
});
23+
};
24+
25+
/**
26+
* Undo Migrate
27+
*
28+
* @param {Object} knex
29+
* @returns {Promise}
30+
*/
31+
const down = function (knex) {
32+
logger.info(`[${migrateName}] Migrating Down...`);
33+
34+
return knex.schema
35+
.alterTable('proxy_host', (table) => {
36+
table.dropColumn('trust_forwarded_proto');
37+
})
38+
.then(() => {
39+
logger.info(`[${migrateName}] proxy_host Table altered`);
40+
});
41+
};
42+
43+
export { up, down };

backend/models/proxy_host.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const boolFields = [
2121
"enabled",
2222
"hsts_enabled",
2323
"hsts_subdomains",
24+
"trust_forwarded_proto",
2425
];
2526

2627
class ProxyHost extends Model {

backend/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"dependencies": {
1515
"@apidevtools/json-schema-ref-parser": "^14.1.1",
16-
"ajv": "^8.17.1",
16+
"ajv": "^8.18.0",
1717
"archiver": "^7.0.1",
1818
"batchflow": "^0.4.0",
1919
"bcrypt": "^6.0.0",
@@ -28,10 +28,10 @@
2828
"liquidjs": "10.24.0",
2929
"lodash": "^4.17.23",
3030
"moment": "^2.30.1",
31-
"mysql2": "^3.16.3",
31+
"mysql2": "^3.17.1",
3232
"node-rsa": "^1.1.1",
3333
"objection": "3.1.5",
34-
"otplib": "^13.2.1",
34+
"otplib": "^13.3.0",
3535
"path": "^0.12.7",
3636
"pg": "^8.18.0",
3737
"proxy-agent": "^6.5.0",

backend/schema/components/proxy-host-object.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"enabled",
2323
"locations",
2424
"hsts_enabled",
25-
"hsts_subdomains"
25+
"hsts_subdomains",
26+
"trust_forwarded_proto"
2627
],
2728
"properties": {
2829
"id": {
@@ -141,6 +142,11 @@
141142
"hsts_subdomains": {
142143
"$ref": "../common.json#/properties/hsts_subdomains"
143144
},
145+
"trust_forwarded_proto":{
146+
"type": "boolean",
147+
"description": "Trust the forwarded headers",
148+
"example": false
149+
},
144150
"certificate": {
145151
"oneOf": [
146152
{

0 commit comments

Comments
 (0)