Add a separate HTTP listener for observability, configured through metricsServer in both frps and frpc. It serves /healthz and, when pprofEnable is set, the pprof handlers except /debug/pprof/cmdline. It never serves the dashboard, static assets or the admin API, and it does not touch the global assets filesystem. frps also serves /metrics on this listener with both runtime and business metrics, enabled by metricsServer.port alone. The in-memory collector still starts only with the dashboard, and the Prometheus collector starts either with metricsServer or with enablePrometheus plus webServer, so a configuration that collected nothing before still collects nothing. The /healthz, /metrics and pprof endpoints on webServer, and enablePrometheus, keep working but are deprecated and log a hint at startup. frpc does not serve /metrics yet.
1.1 KiB
Features
-
frpc can verify server certificates using system CAs, optionally combined with CAs from
trustedCaFile. -
frpc reloadnow refreshes certificate files for unchangedhttps2httpandhttps2httpsproxies without interrupting existing connections. Failed refreshes keep the previous certificate and report the error in proxy status and logs while reload still succeeds. -
Added
metricsServerto both frps and frpc, a separate listener for health checks and optional profiling that does not expose the dashboard or the admin API. It is disabled unlessmetricsServer.portis set, defaults to127.0.0.1, and has its own credentials and TLS. In frps, setting the port also serves/metricswith both runtime and business metrics, soenablePrometheusis not needed there.The
/healthz,/metricsand pprof endpoints onwebServer, andenablePrometheus, still work but are deprecated: configuremetricsServerinstead. They will be removed in a later release.
Fixes
- Fixed proxy and visitor configuration changes being lost when reloading frpc during reconnection.