forked from Mxmilu666/frp
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.
This commit is contained in:
@@ -712,6 +712,8 @@ transport.tls.keyFile = "certificate.key"
|
||||
transport.tls.trustedCaFile = "ca.crt"
|
||||
```
|
||||
|
||||
By default, when neither `transport.tls.trustedCaFile` nor `transport.tls.useSystemRoots` is set, `frpc` does not verify the server certificate. Set `transport.tls.useSystemRoots = true` to verify it against the host's root store instead. With `wss`, verification applies to the TLS endpoint, which may be a reverse proxy. `useSystemRoots` is ignored when `transport.tls.trustedCaFile` is set.
|
||||
|
||||
**`frps` TLS settings:**
|
||||
|
||||
```toml
|
||||
|
||||
Reference in New Issue
Block a user