v2 icon indicating copy to clipboard operation
v2 copied to clipboard

[Feature]: Listen on multiple addresses

Open IngmarStein opened this issue 7 months ago • 3 comments

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:

  1. allow multiple addresses in the LISTEN_ADDR variable, separated by a delimiter
  2. a new LISTEN_SOCKET variable to bind to a socket independently of LISTEN_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.

IngmarStein avatar May 10 '25 17:05 IngmarStein

What's wrong with accessing miniflux via the reverse-proxy from the LAN? I don't think the performance impact/gains are noticeable/measurable.

jvoisin avatar Jun 09 '25 21:06 jvoisin

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.

IngmarStein avatar Jun 10 '25 06:06 IngmarStein

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.

jtagcat avatar Jun 11 '25 17:06 jtagcat

@IngmarStein will this code update fix random bad gateway errors when using Cloudflared?

Enes3078 avatar Jun 20 '25 00:06 Enes3078

@Enes3078 I‘m not aware of that issue and listening on multiple interfaces is unlikely to make a difference there.

IngmarStein avatar Jun 20 '25 04:06 IngmarStein