-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
Is your feature request related to a problem? Please describe.
As of NGINX version 1.15.10, the listen directive accepts port ranges, but NPM only allow adding a stream host listening on a single port.
I wanted to setup a stream for FTP server with passive mode. In order to support passive mode, many ports are needed and it's PITA to add all of them one by one.
Ultimately, I created a custom config under data/nginx/custom/stream.conf to workaround NPM's limitation.
Describe the solution you'd like
Add start and end listening ports when creating stream host
Add start and end forwarding ports
Validate input (same port, same number of ports as forwarding ports)
Describe alternatives you've considered
Currently working using custom config
data/nginx/custom/stream.conf:
`
server {
listen 20-21;
listen [::]:20-21;
listen 32500-32599;
listen [::]:32500-32599;
proxy_pass <INTERNAL_SERVER_IP>:$server_port;
}
`
Additional context
Obviously, I could continue to use custom configs, but this feature will make lives easier. Additionally, servers added through custom configs do not show up in the dashboard.