[Feature]: Listen on multiple addresses
Feature Summary
Listen on multiple addresses, e.g. to serve over TCP and Unix sockets at the same time
What problem does this feature solve?
Currently, Miniflux only supports binding to either TCP or a Unix socket by setting LISTEN_ADDR.
I'd like to bind to a socket in addition to serving over TCP, so that I can use the former to efficiently provide external access through a reverse proxy running on the same machine and the latter to allow direct access from the LAN.
Proposed Solution
I could imagine two options:
- allow multiple addresses in the
LISTEN_ADDRvariable, separated by a delimiter - a new
LISTEN_SOCKETvariable to bind to a socket independently ofLISTEN_ADDR
Alternatives Considered
No response
Additional Context
No response
Checklist
- [x] I have searched existing issues to ensure this feature hasn't been requested before.
- [x] I understand that feature requests are not guaranteed to be implemented.
What's wrong with accessing miniflux via the reverse-proxy from the LAN? I don't think the performance impact/gains are noticeable/measurable.
My reverse proxy is a cloudflared tunnel. If I were to use that in the LAN, the traffic would be sent to the WAN, through Cloudflare‘s CDN to the tunnel endpoint, and eventually to miniflux. This adds noticeable latency and also renders miniflux unavailable if the tunnel is down.
You can use multiple reverse proxies, for example nginx, to listen on your local network, and forward traffic to Miniflux, the same way Cloudflare does. That's what the operating system interfaces exist for - giving pluggable features without having to reinvent the wheel in every application.
If you want to only use one brand-name proxie, there is Tailscale Funnel, which automatically localizes the traffic.
@IngmarStein will this code update fix random bad gateway errors when using Cloudflared?
@Enes3078 I‘m not aware of that issue and listening on multiple interfaces is unlikely to make a difference there.