mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #2170] tls相关,是BUG吗? #1728
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#1728
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Yusoo on GitHub (Dec 28, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/2170
1、服务端启用tls_only,客户端不设置tls,也能连上。
2、按照 https://gofrp.org/docs/features/common/network/network-tls/#openssl-%E7%94%9F%E6%88%90%E8%AF%81%E4%B9%A6%E7%A4%BA%E4%BE%8B 新生成的证书,客户端启动后一直报证书错误,我把客户端的tls_trusted_ca_file注释掉才能用
[REQUIRED] hat version of frp are you using
Version: docker版v0.34.3
confile
frps.ini
[common]
bind_port = 7000
tls_only = true
tls_cert_file = /app/server.crt
tls_key_file = /app/server.key
tls_trusted_ca_file = /app/ca.crt
frpc.ini
server_addr = ****
server_port = 7000
tls_enable = true
tls_cert_file = /app/client.crt
tls_key_file = /app/client.key
tls_trusted_ca_file = /app/ca.crt
log file
frpc的错误信息
[W] [service.go:102] login to server failed: x509: certificate has expired or is not yet valid: current time 2020-12-27T23:53:10+08:00 is after 0001-01-01T00:00:00Z
@yuyulei commented on GitHub (Dec 29, 2020):
是不是你的证书有问题(看样子跟过期时间相关)?你可以参照文档里的先生成一份证书或者找一份保证有效的证书,再试一下,如果 ok 的话就排除 frp 的问题。
@Yusoo commented on GitHub (Dec 29, 2020):
应该是bug,我又完全按照文档生成了一次,还是同样的问题,我用下面的命令测试是OK的。
openssl verify -CAfile ca.crt server.crt
openssl verify -CAfile ca.crt client.crt
这是生成的证书
1.zip
@yuyulei commented on GitHub (Dec 30, 2020):
但是我拿了你给的证书,成功跑起来了。。。所以是不是你环境的问题,比如说是 docker 挂载?你能不能在本地裸跑下 frps 和 frpc, 就照你一开始的配置即可?
@Yusoo commented on GitHub (Jan 8, 2021):
发现是配置文件没生效,关闭了。
@zed76r commented on GitHub (Mar 24, 2021):
我也是相同的状况,我是用
frpc -c ./frpc.ini测试的,想问问您最后说的配置文件没生效是什么意思。我现在也是暂时注释了ca的配置