diff --git a/backend/migrations/20221011000001_stream_proxy_protocol.js b/backend/migrations/20221011000001_stream_proxy_protocol.js index 122ddb17..f62d6f68 100644 --- a/backend/migrations/20221011000001_stream_proxy_protocol.js +++ b/backend/migrations/20221011000001_stream_proxy_protocol.js @@ -43,7 +43,7 @@ exports.up = function (knex/*, Promise*/) { stream.integer('stream_allow_proxy_protocol').notNull().unsigned().defaultTo(0); }) .then(() => { - logger.info('[' + migrate_name + '] stream Table altered - PROXY protocol added'); + logger.info('[' + migrate_name + '] stream Table altered - "stream_allow_proxy_protocol" added'); }).catch((err) => { logger.error('[' + migrate_name + '] stream Table error migrating up: ' + err); }); @@ -51,15 +51,16 @@ exports.up = function (knex/*, Promise*/) { stream.integer('stream_enable_proxy_protocol').notNull().unsigned().defaultTo(0); }) .then(() => { - logger.info('[' + migrate_name + '] stream Table altered - PROXY protocol added'); + logger.info('[' + migrate_name + '] stream Table altered - "stream_enable_proxy_protocol" added'); }).catch((err) => { logger.error('[' + migrate_name + '] stream Table error migrating up: ' + err); }); + knex.schema.table('stream', function (stream) { - stream.integer('stream_load_balancer_ip').notNull().unsigned().defaultTo(''); + stream.string('stream_load_balancer_ip').notNull().defaultTo(''); }) .then(() => { - logger.info('[' + migrate_name + '] stream Table altered - PROXY protocol added'); + logger.info('[' + migrate_name + '] stream Table altered - "stream_load_balancer_ip" added'); }).catch((err) => { logger.error('[' + migrate_name + '] stream Table error migrating up: ' + err); }); diff --git a/backend/schema/endpoints/streams.json b/backend/schema/endpoints/streams.json index f91ef406..1eaf5b2f 100644 --- a/backend/schema/endpoints/streams.json +++ b/backend/schema/endpoints/streams.json @@ -52,12 +52,11 @@ "type": "boolean" }, "stream_allow_proxy_protocol": { - "description": "Enable PROXY Protocol passthrough", + "description": "Enable PROXY Protocol pass through", "example": true, "type": "boolean" }, "stream_load_balancer_ip": { - "description": "Authorized TCP Load Balancer IP / CIDR for setting 'set_real_ip_from'", "type": "string", "minLength": 0, "maxLength": 255 diff --git a/frontend/js/app/nginx/stream/form.js b/frontend/js/app/nginx/stream/form.js index 9dedd6b7..e73335d6 100644 --- a/frontend/js/app/nginx/stream/form.js +++ b/frontend/js/app/nginx/stream/form.js @@ -20,7 +20,6 @@ module.exports = Mn.View.extend({ cancel: 'button.cancel', save: 'button.save', stream_allow_proxy_protocol: 'input[name="stream_allow_proxy_protocol"]', - stream_enable_proxy_protocol: 'input[name="stream_enable_proxy_protocol"]', stream_load_balancer_ip: 'input[name="stream_load_balancer_ip"]' }, diff --git a/frontend/js/i18n/messages.json b/frontend/js/i18n/messages.json index 737938f8..8561c515 100644 --- a/frontend/js/i18n/messages.json +++ b/frontend/js/i18n/messages.json @@ -134,8 +134,8 @@ "ignore-invalid-upstream-ssl": "Ignore Invalid SSL", "custom-forward-host-help": "Add a path for sub-folder forwarding.\nExample: 203.0.113.25/path/", "search": "Search Host…", - "enable-proxy-protocol": "Allow PROXY Protocol (Pass through)", - "load-balancer-ip": "AUTHORIZED Load balancer or TCP proxy IP / CIDR range" + "enable-proxy-protocol": "Allow PROXY Protocol", + "load-balancer-ip": "Load balancer or TCP proxy IP / CIDR range" }, "redirection-hosts": { "title": "Redirection Hosts", @@ -182,9 +182,9 @@ "help-title": "What is a Stream?", "help-content": "A relatively new feature for Nginx, a Stream will serve to forward TCP/UDP traffic directly to another computer on the network.\nIf you're running game servers, FTP or SSH servers this can come in handy.", "search": "Search Incoming Port…", - "allow-proxy-protocol": "Allow PROXY Protocol (Pass through)", - "enable-proxy-protocol": "Enable PROXY Protocol (Create and override PROXY protocol instead of passing through)", - "load-balancer-ip": "AUTHORIZED Load balancer or TCP proxy IP / CIDR range" + "allow-proxy-protocol": "Allow PROXY Protocol", + "enable-proxy-protocol": "Create PROXY Headers", + "load-balancer-ip": "Load balancer or TCP proxy IP / CIDR range" }, "certificates": { "title": "SSL Certificates", diff --git a/scripts/npm_db_fix b/scripts/npm_db_fix index fc80f8d1..b29750e1 100755 --- a/scripts/npm_db_fix +++ b/scripts/npm_db_fix @@ -8,3 +8,4 @@ log() { mysql -u root -p"${MYSQL_ROOT_PASSWORD}" -D "${MYSQL_DATABASE}" -e "DELETE from migrations where name = '22021010135303_stream_proxy_protocol.js';" mysql -u root -p"${MYSQL_ROOT_PASSWORD}" -D "${MYSQL_DATABASE}" -e "DELETE from migrations where name = '22021010135304_stream_proxy_protocol.js';" mysql -u root -p"${MYSQL_ROOT_PASSWORD}" -D "${MYSQL_DATABASE}" -e "DELETE from migrations where name = '20221010135304_stream_proxy_protocol.js';" + mysql -u root -p"${MYSQL_ROOT_PASSWORD}" -D "${MYSQL_DATABASE}" -e "DELETE from migrations where name = '20221011000001_stream_proxy_protocol.js';"