176 Commits

Author SHA1 Message Date
fatedier f13fdd58d4 feat: add metricsServer for health checks, metrics and pprof (#5578)
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.
2026-10-19 20:08:39 +08:00
fatedier 00e4fc4dd3 feat(client): reload plugin certificates on frpc reload (#5576)
The https2http and https2https plugins read their certificate and key
once when the proxy starts, so a certificate that an external tool renews
on disk is only picked up after the proxy itself is recreated. frpc
reload rebuilt proxies only when their configuration changed, and a
rebuild closes the work connections that are already in use.

Let the plugin own the refresh. The HTTPS plugin server keeps the active
keypair and the last refresh error in one immutable snapshot published
through an atomic pointer, so a TLS handshake only loads that pointer and
never touches the disk. Reload rereads both files, and when their bytes
match the published pair it returns without parsing or replacing
anything; otherwise it parses the pair and swaps the snapshot in. A read
or parse failure keeps the previous certificate serving and records the
error next to it.

frpc reload collects the reloadable plugins of the live proxies and
applies the new configuration inside the same reload transaction that
also serializes control handoff, so a reload that races a reconnect
still refreshes the plugins of the published control. The certificate
files are read only after that transaction has been released. The config
store API keeps applying configuration without refreshing certificates,
because only an explicit reload may reread files. Proxy status reports a
refresh failure next to the still running proxy instead of dropping its
remote address.

No configuration field is added, and frps and the wire protocol are
unchanged. Without a reload nothing changes: certificates are still read
once at startup, generated self-signed certificates still never reload,
and a proxy whose configuration changed still goes through the existing
rebuild path.
2026-10-19 17:16:55 +08:00
fatedier 26742060b1 feat(client): add useSystemCa and combine it with trustedCaFile (#5572)
Move the frpc-only TLS option into the shared TLSConfig as
transport.tls.useSystemCa, replacing the unpublished useSystemRoots.
When set, frpc verifies the server with the system CAs; when
trustedCaFile is also set, its CAs are appended to the system pool so
both are trusted. Failures to load either source abort the connection
instead of falling back. Enabling the option without effective TLS is a
configuration error, and the field is rejected in frps transport.tls
and in both webServer.tls sections.

Fixes #5545
2026-10-18 16:00:02 +08:00
Alexey Sviridov 7441443134 feat(client): verify server certificates against the system root store (#5546)
transport.tls.trustedCaFile is installed as RootCAs, and omitting it sets
InsecureSkipVerify, so system-root verification cannot be selected directly.
Add an opt-in transport.tls.useSystemRoots that enables certificate
verification with RootCAs nil when no trusted CA file is set, allowing Go to
use system roots and native verification on macOS and Windows. Defaults are
unchanged.
2026-10-18 14:08:05 +08:00
fatedier 954f918d0c docs: clear release notes (#5570) 2026-10-15 23:25:45 +08:00
fatedier c5508627c4 docs: add rapidproxy as gold sponsor (#5529) 2026-09-10 00:02:51 +08:00
fatedier ebb4773c2c docs: update release notes (#5521) 2026-08-29 14:41:43 +08:00
fatedier 290017cb53 update version to 0.71.0 (#5464) 2026-08-03 23:37:36 +08:00
fatedier 5396947c7c remove retired Go Report Card badge (#5409) 2026-07-11 15:59:51 +08:00
fatedier a3b3b35b69 feat(ui): default proxies view to all tab (#5384) 2026-06-29 22:49:08 +08:00
fatedier 8666e3643f protocol: add AEAD encryption negotiation to v2 wire control channel (#5304) 2026-05-06 10:43:47 +08:00
fatedier d667be7a0a update architecture pic (#5270) 2026-03-30 03:22:35 +08:00
fatedier 061c141756 update README.md (#5267) 2026-03-29 23:53:17 +08:00
fatedier 01997deb98 add persistent proxy/visitor store with CRUD API and web UI (#5188) 2026-03-02 01:09:59 +08:00
fatedier fb2c98e87b rotate gold sponsor 2026-01-27 02:45:57 +08:00
fatedier ed13141c56 refactor: separate API handlers into dedicated packages with improved HTTP utilities (#5127) 2026-01-14 19:50:55 +08:00
fatedier bc378bcbec rotate gold sponsor order periodically (#5114) 2026-01-08 19:54:13 +08:00
fatedier 2bdf25bae6 rotate gold sponsor order periodically (#5094) 2025-12-11 12:48:08 +08:00
fatedier f736d171ac rotate gold sponsor order periodically (#5067) 2025-11-18 00:09:37 +08:00
fatedier 1cf325bb0c https: add load balancing group support (#5032) 2025-10-28 17:37:18 +08:00
fatedier 2def23bb0b update sponsor (#5030) 2025-10-28 15:44:03 +08:00
fatedier e382676659 update README (#5001) 2025-09-26 12:26:08 +08:00
fatedier b642a6323c update sponsors info (#4997) 2025-09-25 16:50:14 +08:00
fatedier 604700cea5 update README (#4957) 2025-08-27 11:07:18 +08:00
immomo808 14253afe2f remove quotes (#4938) 2025-08-15 16:11:06 +08:00
fatedier dc3bc9182c update sponsor info (#4917) 2025-08-08 22:28:17 +08:00
fatedier f9065a6a78 add tokenSource support for auth configuration (#4865) 2025-07-03 13:17:21 +08:00
fatedier 3fa76b72f3 add proxy protocol support for UDP proxies (#4810) 2025-06-25 11:40:23 +08:00
fatedier 27f66baf54 update feature gates doc (#4755) 2025-04-27 15:46:22 +08:00
fatedier a78814a2e9 virtual-net: initial (#4751) 2025-04-16 16:05:54 +08:00
Andreas Deininger 6542dcd4ed Fix typos (#4615) 2025-01-02 11:33:56 +08:00
fatedier 8593eff752 update sponsor info (#4545) 2024-11-20 15:14:51 +08:00
fatedier 6ba849fc75 readme: update sponsor (#4504) 2024-10-22 10:48:24 +08:00
fatedier ae73ec2fed added a 30s timeout for frpc subcommands to avoid long delays (#4359) 2024-07-30 18:12:22 +08:00
fatedier c6f9d8d403 update sponsors (#4303) 2024-06-26 14:51:34 +08:00
fatedier f390e4a401 add sponsor (#4265) 2024-06-05 16:53:29 +08:00
fatedier e81b36c5ba support responseHeaders.set for proxy type http (#4192) 2024-04-29 15:53:45 +08:00
Weltolk d0d396becb Update README.md (#4190) 2024-04-29 11:50:56 +08:00
fatedier c1893ee1b4 adjust arm compilation configuration (#4181) 2024-04-25 13:08:41 +08:00
fatedier 885278c045 README add releated projects (#4167) 2024-04-17 20:41:14 +08:00
fatedier ba937e9fbf update README (#4139) 2024-04-09 15:03:32 +08:00
fatedier 002831ea82 add doc for port range mapping (#4081) 2024-03-19 13:22:29 +08:00
fatedier 49443cb2c6 update sponsor (#4045)
* update sponsors
2024-03-07 14:45:55 +08:00
fatedier b3946489dd add new badges (#4028) 2024-02-27 17:43:37 +08:00
fatedier dc34a68542 support go1.22 and drop support for go1.20 (#4001) 2024-02-19 16:45:25 +08:00
fatedier 3529158f31 proxy supports configuring annotations, which will be displayed in the frps dashboard (#4000) 2024-02-19 16:28:27 +08:00
Apflkuacha 2af2cf7dbd Updated readme for the HTTP Proxy (#3999)
Improved the http proxy command by using %h and %p to avoid typing the host name twice
2024-02-19 11:43:09 +08:00
Innokenty Ivanov cf025d6320 Update README.md - add note for public purpose (#3971)
Some people set servers in purpose to be accessed though public internet. This line removes some misconfiguration if they want publicly accessed server.
2024-02-04 15:41:09 +08:00
fatedier cc2076970f update doc (#3844) 2023-12-14 20:54:03 +08:00
0x7fff e7652f4ccc feat: ssh doc (#3841)
* feat: add example

* feat: add ssh doc

---------

Co-authored-by: int7 <int7@gmail.com>
2023-12-14 20:32:40 +08:00