Caddy: Add Gui options for advanced reverse_proxy settings (low-latency mode / Buffer settings)
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- [x] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
- [x] I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue
Caddy for the most part is a well designed software that comes preconfigured to work 99,5% of the time how it is intended to work.
However for these rare instances that issues arise, the Opsensense Gui does not allow to modify advanced parameters to be configured without editing the Caddyfile in /usr/local/etc/caddy with a BIG Warning that this file should not be modified.
Any change via the Gui, will revert custom changes to the Caddyfile and disable these Options.
Describe the solution you like
I propose to add the Caddy Streaming parameters as a Gui Option in Opensense: https://caddyserver.com/docs/caddyfile/directives/reverse_proxy#streaming
Add the following Gui options to Services > Caddy > Reverse Proxy >Domain XYZ > Advanced Options
- Enable low latency mode -> flush_interval -1 (Either as a checkbox or configurable with a number)
- Request Buffer Size
- Response Buffer Size
- Stream Timeout
- Stream Close Delay
Describe alternatives you considered
If you do not want to implement only some of the advanced Options , Caddy offers way more options then just the Streaming related ones, It would be great to see some way to set advanced options in opensense. Currently we are able to view the Caddyfile under the Caddy > Diagnostics Tab, but there is no way to edit it or alter the configuration.
Additional context
I stumbled upon this configuration settings after trying to host an openspeedtest container and the upload shows wrong values when deployed behind the Reverse Proxy. Enabling "low latency mode" fixes this