Skip to content

Commit

Permalink
Merge pull request #351 from jc21/develop
Browse files Browse the repository at this point in the history
v2.2.2 Release
  • Loading branch information
jc21 authored Apr 7, 2020
2 parents 2993a08 + 8b0ca8e commit 030e553
Show file tree
Hide file tree
Showing 15 changed files with 1,110 additions and 628 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.1
2.2.2
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<p align="center">
<img src="https://nginxproxymanager.com/github.png">
<br><br>
<img src="https://img.shields.io/badge/version-2.2.1-green.svg?style=for-the-badge">
<img src="https://img.shields.io/badge/version-2.2.2-green.svg?style=for-the-badge">
<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager">
<img src="https://img.shields.io/docker/stars/jc21/nginx-proxy-manager.svg?style=for-the-badge">
</a>
Expand Down
2 changes: 2 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ yarn-error.log
tmp
certbot.log
node_modules
core.*

15 changes: 15 additions & 0 deletions backend/internal/nginx.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ const internalNginx = {
locationsPromise = Promise.resolve();
}

// Set the IPv6 setting for the host
host.ipv6 = internalNginx.ipv6Enabled();

locationsPromise.then(() => {
renderEngine
.parseAndRender(template, host)
Expand Down Expand Up @@ -396,6 +399,18 @@ const internalNginx = {
*/
advancedConfigHasDefaultLocation: function (config) {
return !!config.match(/^(?:.*;)?\s*?location\s*?\/\s*?{/im);
},

/**
* @returns {boolean}
*/
ipv6Enabled: function () {
if (typeof process.env.DISABLE_IPV6 !== 'undefined') {
const disabled = process.env.DISABLE_IPV6.toLowerCase();
return !(disabled === 'on' || disabled === 'true' || disabled === '1' || disabled === 'yes');
}

return true;
}
};

Expand Down
16 changes: 8 additions & 8 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@
"description": "A beautiful interface for creating Nginx endpoints",
"main": "js/index.js",
"dependencies": {
"ajv": "^6.11.0",
"ajv": "^6.12.0",
"batchflow": "^0.4.0",
"bcrypt": "^3.0.8",
"bcrypt": "^4.0.1",
"body-parser": "^1.19.0",
"compression": "^1.7.4",
"config": "^3.2.5",
"config": "^3.3.1",
"diskdb": "^0.1.17",
"express": "^4.17.1",
"express-fileupload": "^1.1.6",
"gravatar": "^1.8.0",
"html-entities": "^1.2.1",
"json-schema-ref-parser": "^7.1.3",
"json-schema-ref-parser": "^8.0.0",
"jsonwebtoken": "^8.5.1",
"knex": "^0.20.10",
"liquidjs": "^9.7.1",
"knex": "^0.20.13",
"liquidjs": "^9.11.10",
"lodash": "^4.17.15",
"moment": "^2.24.0",
"mysql": "^2.18.1",
"node-rsa": "^1.0.7",
"node-rsa": "^1.0.8",
"nodemon": "^2.0.2",
"objection": "^2.1.3",
"path": "^0.12.7",
Expand All @@ -40,6 +40,6 @@
"devDependencies": {
"eslint": "^6.8.0",
"eslint-plugin-align-assignments": "^1.1.2",
"prettier": "^1.19.1"
"prettier": "^2.0.4"
}
}
10 changes: 10 additions & 0 deletions backend/templates/_listen.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
listen 80;
{% if ipv6 -%}
listen [::]:80;
{% else -%}
#listen [::]:80;
{% endif %}
{% if certificate -%}
listen 443 ssl{% if http2_support %} http2{% endif %};
{% if ipv6 -%}
listen [::]:443;
{% else -%}
#listen [::]:443;
{% endif %}
{% endif %}
server_name {{ domain_names | join: " " }};
11 changes: 11 additions & 0 deletions backend/templates/stream.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
{% if tcp_forwarding == 1 or tcp_forwarding == true -%}
server {
listen {{ incoming_port }};
{% if ipv6 -%}
listen [::]:{{ incoming_port }};
{% else -%}
#listen [::]:{{ incoming_port }};
{% endif %}

proxy_pass {{ forward_ip }}:{{ forwarding_port }};

# Custom
Expand All @@ -16,6 +22,11 @@ server {
{% if udp_forwarding == 1 or udp_forwarding == true %}
server {
listen {{ incoming_port }} udp;
{% if ipv6 -%}
listen [::]:{{ incoming_port }} udp;
{% else -%}
#listen [::]:{{ incoming_port }} udp;
{% endif %}
proxy_pass {{ forward_ip }}:{{ forwarding_port }};

# Custom
Expand Down
Loading

0 comments on commit 030e553

Please sign in to comment.