Skip to content

Commit 030e553

Browse files
authored
Merge pull request #351 from jc21/develop
v2.2.2 Release
2 parents 2993a08 + 8b0ca8e commit 030e553

File tree

15 files changed

+1110
-628
lines changed

15 files changed

+1110
-628
lines changed

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.2.1
1+
2.2.2

README.md

Lines changed: 1 addition & 1 deletion
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.2.1-green.svg?style=for-the-badge">
4+
<img src="https://img.shields.io/badge/version-2.2.2-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>

backend/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ yarn-error.log
44
tmp
55
certbot.log
66
node_modules
7+
core.*
8+

backend/internal/nginx.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ const internalNginx = {
224224
locationsPromise = Promise.resolve();
225225
}
226226

227+
// Set the IPv6 setting for the host
228+
host.ipv6 = internalNginx.ipv6Enabled();
229+
227230
locationsPromise.then(() => {
228231
renderEngine
229232
.parseAndRender(template, host)
@@ -396,6 +399,18 @@ const internalNginx = {
396399
*/
397400
advancedConfigHasDefaultLocation: function (config) {
398401
return !!config.match(/^(?:.*;)?\s*?location\s*?\/\s*?{/im);
402+
},
403+
404+
/**
405+
* @returns {boolean}
406+
*/
407+
ipv6Enabled: function () {
408+
if (typeof process.env.DISABLE_IPV6 !== 'undefined') {
409+
const disabled = process.env.DISABLE_IPV6.toLowerCase();
410+
return !(disabled === 'on' || disabled === 'true' || disabled === '1' || disabled === 'yes');
411+
}
412+
413+
return true;
399414
}
400415
};
401416

backend/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@
44
"description": "A beautiful interface for creating Nginx endpoints",
55
"main": "js/index.js",
66
"dependencies": {
7-
"ajv": "^6.11.0",
7+
"ajv": "^6.12.0",
88
"batchflow": "^0.4.0",
9-
"bcrypt": "^3.0.8",
9+
"bcrypt": "^4.0.1",
1010
"body-parser": "^1.19.0",
1111
"compression": "^1.7.4",
12-
"config": "^3.2.5",
12+
"config": "^3.3.1",
1313
"diskdb": "^0.1.17",
1414
"express": "^4.17.1",
1515
"express-fileupload": "^1.1.6",
1616
"gravatar": "^1.8.0",
1717
"html-entities": "^1.2.1",
18-
"json-schema-ref-parser": "^7.1.3",
18+
"json-schema-ref-parser": "^8.0.0",
1919
"jsonwebtoken": "^8.5.1",
20-
"knex": "^0.20.10",
21-
"liquidjs": "^9.7.1",
20+
"knex": "^0.20.13",
21+
"liquidjs": "^9.11.10",
2222
"lodash": "^4.17.15",
2323
"moment": "^2.24.0",
2424
"mysql": "^2.18.1",
25-
"node-rsa": "^1.0.7",
25+
"node-rsa": "^1.0.8",
2626
"nodemon": "^2.0.2",
2727
"objection": "^2.1.3",
2828
"path": "^0.12.7",
@@ -40,6 +40,6 @@
4040
"devDependencies": {
4141
"eslint": "^6.8.0",
4242
"eslint-plugin-align-assignments": "^1.1.2",
43-
"prettier": "^1.19.1"
43+
"prettier": "^2.0.4"
4444
}
4545
}

backend/templates/_listen.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
listen 80;
2+
{% if ipv6 -%}
3+
listen [::]:80;
4+
{% else -%}
5+
#listen [::]:80;
6+
{% endif %}
27
{% if certificate -%}
38
listen 443 ssl{% if http2_support %} http2{% endif %};
9+
{% if ipv6 -%}
10+
listen [::]:443;
11+
{% else -%}
12+
#listen [::]:443;
13+
{% endif %}
414
{% endif %}
515
server_name {{ domain_names | join: " " }};

backend/templates/stream.conf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
{% if tcp_forwarding == 1 or tcp_forwarding == true -%}
77
server {
88
listen {{ incoming_port }};
9+
{% if ipv6 -%}
10+
listen [::]:{{ incoming_port }};
11+
{% else -%}
12+
#listen [::]:{{ incoming_port }};
13+
{% endif %}
14+
915
proxy_pass {{ forward_ip }}:{{ forwarding_port }};
1016

1117
# Custom
@@ -16,6 +22,11 @@ server {
1622
{% if udp_forwarding == 1 or udp_forwarding == true %}
1723
server {
1824
listen {{ incoming_port }} udp;
25+
{% if ipv6 -%}
26+
listen [::]:{{ incoming_port }} udp;
27+
{% else -%}
28+
#listen [::]:{{ incoming_port }} udp;
29+
{% endif %}
1930
proxy_pass {{ forward_ip }}:{{ forwarding_port }};
2031

2132
# Custom

0 commit comments

Comments
 (0)