Clear and concise description of the problem
As a developer I want to access different proxied paths and/or subdomains without having to add different ports for each.
Right now @stacksjs/rpx creates different listeners on different ports
import startProxies, { MultiProxyConfig } from "@stacksjs/rpx";
const config: MultiProxyConfig = {
https: true,
cleanup: {
hosts: true,
certs: true,
},
cleanUrls: false,
vitePluginUsage: false,
proxies: [
{
from: "localhost:3000",
to: "foo.myservice.local",
cleanUrls: true,
},
{
from: "localhost:3001",
to: "myservice.local/bar",
cleanUrls: false,
},
{
from: "localhost:3003",
to: "*.myservice.local",
cleanUrls: true,
},
],
verbose: false,
};
startProxies(config);
Output:
rpx v0.10.0
➜ localhost:3000 ➜ https://foo.myservice.local
➜ SSL enabled with:
- TLS 1.2/1.3
- Modern cipher suite
- HTTP/2 enabled
- HSTS enabled
WARN Port 80 is in use, HTTP to HTTPS redirect will not be available 10:25:39 PM
WARN Port 443 is in use. Using port 8443 instead. 10:25:39 PM
ℹ You can use 'sudo lsof -i :443' (Unix) or 'netstat -ano | findstr :443' (Windows) to check what's using the port. 10:25:39 PM
rpx v0.10.0
➜ localhost:3001 ➜ https://myservice.local
➜ Listening on port 8443
➜ SSL enabled with:
- TLS 1.2/1.3
- Modern cipher suite
- HTTP/2 enabled
- HSTS enabled
WARN Port 80 is in use, HTTP to HTTPS redirect will not be available 10:25:39 PM
WARN Port 443 is in use. Using port 8444 instead. 10:25:39 PM
ℹ You can use 'sudo lsof -i :443' (Unix) or 'netstat -ano | findstr :443' (Windows) to check what's using the port. 10:25:39 PM
rpx v0.10.0
➜ localhost:3003 ➜ *.myservice.local"
➜ Listening on port 8444
➜ SSL enabled with:
- TLS 1.2/1.3
- Modern cipher suite
- HTTP/2 enabled
- HSTS enabled
It created 3 different servers listening on ports 80, 443, 8443 and 8444.
Suggested solution
Add a singlePortMode parameter that starts only one server in a configurable port (default to 80 and 443) and proxies all traffic based on the from parameter patterns.
Alternative
No response
Additional context
No response
Validations
Clear and concise description of the problem
As a developer I want to access different proxied paths and/or subdomains without having to add different ports for each.
Right now @stacksjs/rpx creates different listeners on different ports
Output:
It created 3 different servers listening on ports 80, 443, 8443 and 8444.
Suggested solution
Add a
singlePortModeparameter that starts only one server in a configurable port (default to 80 and 443) and proxies all traffic based on thefromparameter patterns.Alternative
No response
Additional context
No response
Validations