#5545·frp

[Feature Request] Let frpc verify the server certificate against the host root store

Author: fred01Created Sep 21, 2026Updated Sep 21, 2026

Describe the feature request

NewClientTLSConfig in pkg/transport/tls.go either sets transport.tls.trustedCaFile as RootCAs or sets InsecureSkipVerify.

No TLS-enabled transport currently provides an option to use Go's default system-root verification: this includes tcp and websocket, where frps terminates TLS using its own publicly trusted certFile/keyFile, and wss, where a reverse proxy in front of frps may terminate TLS using a publicly trusted certificate.

A CA bundle can be passed through trustedCaFile, commonly /etc/ssl/certs/ca-certificates.crt on Debian-based Linux. A PEM bundle is not a portable substitute for the operating system's trust store and verification policy.

Add an opt-in transport.tls.useSystemRoots. With no trustedCaFile it should leave RootCAs nil, so Go uses the host root store and the native macOS and Windows verifiers. trustedCaFile should take precedence.

Not a request to change the default: NewServerTLSConfig generates a self-signed certificate when no certFile and keyFile are configured, and the host root store will not trust it.

The README should also state that omitting trustedCaFile currently disables server-certificate verification.

I read #5046 and #3515 before filing. Neither produced a way to use the host root store, and the behaviour they describe is unchanged in the current code, so I am raising it again with a concrete proposal.

Describe alternatives you've considered

  • Supply a CA bundle through trustedCaFile; this requires locating or maintaining a suitable bundle and does not use native trust settings.
  • Add transport.tls.insecureSkipVerify; #5046 proposed such an option. useSystemRoots names the requested trust source explicitly.

Affected area

  • Docs
  • Security