From b57bba48a9a35fdbea1a620260a7cb5a71a65354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=8C?= Date: Sun, 21 Jan 2024 21:19:27 +0800 Subject: [PATCH] Update README.md for TLS configuration Modified the configuration in the tls configuration to better connect with the context. Added precautions in the certificate configuration below --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4bebb8ab..844e4913 100644 --- a/README.md +++ b/README.md @@ -644,8 +644,8 @@ To **enforce** `frps` to only accept TLS connections - configure `transport.tls. ```toml transport.tls.enable = true -transport.tls.certFile = "certificate.crt" -transport.tls.keyFile = "certificate.key" +transport.tls.certFile = "client.crt" +transport.tls.keyFile = "client.key" transport.tls.trustedCaFile = "ca.crt" ``` @@ -653,8 +653,8 @@ transport.tls.trustedCaFile = "ca.crt" ```toml transport.tls.force = true -transport.tls.certFile = "certificate.crt" -transport.tls.keyFile = "certificate.key" +transport.tls.certFile = "server.crt" +transport.tls.keyFile = "server.key" transport.tls.trustedCaFile = "ca.crt" ``` @@ -714,6 +714,11 @@ openssl x509 -req -days 365 -sha256 \ -extfile <(printf "subjectAltName=DNS:localhost,IP:127.0.0.1,DNS:example.server.com") \ -out server.crt ``` +**Note: The above IP must be changed to your server IP, otherwise an error message will be displayed:** + +``` +tls: failed to verify certificate: x509: certificate is valid for 127.0.0.1, not your_ IP +``` * build frpc certificates: ```