mirror of
https://github.com/fatedier/frp.git
synced 2026-10-18 20:23:27 +08:00
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
This commit is contained in:
@@ -131,9 +131,11 @@ transport.tls.enable = true
|
||||
# transport.tls.trustedCaFile = "ca.crt"
|
||||
# transport.tls.serverName = "example.com"
|
||||
|
||||
# If useSystemRoots is true and trustedCaFile is not set, frpc verifies the server certificate
|
||||
# against the host's root store.
|
||||
# transport.tls.useSystemRoots = false
|
||||
# If useSystemCa is true, frpc verifies the server certificate using system CAs.
|
||||
# If trustedCaFile is also set, its CA certificates are added to the system CA pool.
|
||||
# Only supported in frpc transport.tls; requires tls.enable = true unless protocol is wss.
|
||||
# CA loading or certificate verification failures cause the connection to fail.
|
||||
# transport.tls.useSystemCa = false
|
||||
|
||||
# If the disableCustomTLSFirstByte is set to false, frpc will establish a connection with frps using the
|
||||
# first custom byte when tls is enabled.
|
||||
|
||||
Reference in New Issue
Block a user