[GH-ISSUE #4452] HTTPS证书文件读取不到 #3519

Closed
opened 2026-05-05 14:15:32 -06:00 by gitea-mirror · 32 comments
Owner

Originally created by @Gabriel-six on GitHub (Sep 20, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4452

Bug Description

客户端配置https服务的证书,日志显示:Start error: gen TLS config error: open ./ssl/server.crt: no such file or directory。但在相应目录下确实有这个文件存在,而且key文件的读取是没有报错的。

frpc Version

0.6

frps Version

0.6

System Architecture

debian/arm

Configurations

frpc为1panel管理面板安装的docker应用

Logs

start error: gen TLS config error: open ./ssl/server.crt: no such file or directory。

Steps to reproduce

...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @Gabriel-six on GitHub (Sep 20, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4452 ### Bug Description 客户端配置https服务的证书,日志显示:Start error: gen TLS config error: open ./ssl/server.crt: no such file or directory。但在相应目录下确实有这个文件存在,而且key文件的读取是没有报错的。 ### frpc Version 0.6 ### frps Version 0.6 ### System Architecture debian/arm ### Configurations frpc为1panel管理面板安装的docker应用 ### Logs start error: gen TLS config error: open ./ssl/server.crt: no such file or directory。 ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [X] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@superzjg commented on GitHub (Sep 21, 2024):

这不就是找不到文件吗,确认文件存在且是正确的,然后使用绝对路径试试。

<!-- gh-comment-id:2364866122 --> @superzjg commented on GitHub (Sep 21, 2024): 这不就是找不到文件吗,确认文件存在且是正确的,然后使用绝对路径试试。
Author
Owner

@Gabriel-six commented on GitHub (Sep 21, 2024):

这不就是找不到文件吗,确认文件存在且是正确的,然后使用绝对路径试试。

您好,已经确认文件存在且正确,是从cloudflare申请的证书,复制证书和密钥文本到txt文件后改后缀为.crt和.key,且这两个文件在其它服务上传后都识别正常,所以确定证书文件没有问题。

以下为配置代码段:

proxies
name = "blog_https"
type = "https"
customDomains = ["www.domain.com"]

[proxies.plugin]
type = "https2http"
localAddr = "127.0.0.1:8090"

keyPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.key"
crtPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.crt"

hostHeaderRewrite = "127.0.0.1"
requestHeaders.set.x-from-where = "frp"

关于证书与密钥的路径,相对路径与绝对路径都已经尝试,报错都为Start error:gen TLS config error,open xxxxxxx, no such file or directory

实在是找不到什么原因,在网上查找也没有找到其他人有遇到这种情况

<!-- gh-comment-id:2365033509 --> @Gabriel-six commented on GitHub (Sep 21, 2024): > 这不就是找不到文件吗,确认文件存在且是正确的,然后使用绝对路径试试。 您好,已经确认文件存在且正确,是从cloudflare申请的证书,复制证书和密钥文本到txt文件后改后缀为.crt和.key,且这两个文件在其它服务上传后都识别正常,所以确定证书文件没有问题。 以下为配置代码段: [[proxies]] name = "blog_https" type = "https" customDomains = ["www.domain.com"] [proxies.plugin] type = "https2http" localAddr = "127.0.0.1:8090" keyPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.key" crtPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.crt" hostHeaderRewrite = "127.0.0.1" requestHeaders.set.x-from-where = "frp" 关于证书与密钥的路径,相对路径与绝对路径都已经尝试,报错都为Start error:gen TLS config error,open xxxxxxx, no such file or directory 实在是找不到什么原因,在网上查找也没有找到其他人有遇到这种情况
Author
Owner

@H14467 commented on GitHub (Sep 21, 2024):

我一模一样的问题,ssh都配置好了,就是一直读取不到ssl文件,你解决了吗

<!-- gh-comment-id:2365050038 --> @H14467 commented on GitHub (Sep 21, 2024): 我一模一样的问题,ssh都配置好了,就是一直读取不到ssl文件,你解决了吗
Author
Owner

@Gabriel-six commented on GitHub (Sep 21, 2024):

我一模一样的问题,ssh都配置好了,就是一直读取不到ssl文件,你解决了吗

还没有解决,昨天搞到凌晨,翻遍全网无果,无奈来提交issue了哈哈。我也是tcp和http都穿透正常了,就是配置这个证书的时候出现了错误,无法读取证书文件。

请问你的证书和密钥是从哪个服务商处获得的?

<!-- gh-comment-id:2365050836 --> @Gabriel-six commented on GitHub (Sep 21, 2024): > 我一模一样的问题,ssh都配置好了,就是一直读取不到ssl文件,你解决了吗 还没有解决,昨天搞到凌晨,翻遍全网无果,无奈来提交issue了哈哈。我也是tcp和http都穿透正常了,就是配置这个证书的时候出现了错误,无法读取证书文件。 请问你的证书和密钥是从哪个服务商处获得的?
Author
Owner

@H14467 commented on GitHub (Sep 21, 2024):

我是直接阿里里面申请的,也是昨天晚上翻遍全网无果,打算来这碰碰运气,一进来就看到你提了这个问题

<!-- gh-comment-id:2365052215 --> @H14467 commented on GitHub (Sep 21, 2024): 我是直接阿里里面申请的,也是昨天晚上翻遍全网无果,打算来这碰碰运气,一进来就看到你提了这个问题
Author
Owner

@H14467 commented on GitHub (Sep 21, 2024):

我觉得应该不是证书问题吧,最关键的是我看全网都没有这个问题,还有就是要么都是用的低版本的,没有参考价值,好多都是21年20年的了

<!-- gh-comment-id:2365052682 --> @H14467 commented on GitHub (Sep 21, 2024): 我觉得应该不是证书问题吧,最关键的是我看全网都没有这个问题,还有就是要么都是用的低版本的,没有参考价值,好多都是21年20年的了
Author
Owner

@Gabriel-six commented on GitHub (Sep 21, 2024):

我觉得应该不是证书问题吧,最关键的是我看全网都没有这个问题,还有就是要么都是用的低版本的,没有参考价值,好多都是21年20年的了

版本或许确实是个问题,我没有尝试更低版本,因为我这边frpc是通过1panel面板的应用商店安装的,商店最低只提供0.59版本。

http2https这个功能好像用到的人并不多,或许该功能缺少维护。

蹲一波大佬来解答一下哈哈

<!-- gh-comment-id:2365054678 --> @Gabriel-six commented on GitHub (Sep 21, 2024): > 我觉得应该不是证书问题吧,最关键的是我看全网都没有这个问题,还有就是要么都是用的低版本的,没有参考价值,好多都是21年20年的了 版本或许确实是个问题,我没有尝试更低版本,因为我这边frpc是通过1panel面板的应用商店安装的,商店最低只提供0.59版本。 http2https这个功能好像用到的人并不多,或许该功能缺少维护。 蹲一波大佬来解答一下哈哈
Author
Owner

@H14467 commented on GitHub (Sep 21, 2024):

的确是,我用的宝塔的docker来配置的,他提供了58和59版本,不过我没有去试,我看网上的教程全是http,估计和使用人群少也有关系
蹲一波吧

<!-- gh-comment-id:2365055622 --> @H14467 commented on GitHub (Sep 21, 2024): 的确是,我用的宝塔的docker来配置的,他提供了58和59版本,不过我没有去试,我看网上的教程全是http,估计和使用人群少也有关系 蹲一波吧
Author
Owner

@H14467 commented on GitHub (Sep 21, 2024):

我都加群里,去问一下群里面大佬们咋说吧

<!-- gh-comment-id:2365058335 --> @H14467 commented on GitHub (Sep 21, 2024): 我都加群里,去问一下群里面大佬们咋说吧
Author
Owner

@Gabriel-six commented on GitHub (Sep 21, 2024):

我都加群里,去问一下群里面大佬们咋说吧

好的,等你好消息。我也再查找一下

<!-- gh-comment-id:2365059340 --> @Gabriel-six commented on GitHub (Sep 21, 2024): > 我都加群里,去问一下群里面大佬们咋说吧 好的,等你好消息。我也再查找一下
Author
Owner

@H14467 commented on GitHub (Sep 21, 2024):

我看群里大佬说的docker部署,可能是没有映射的原因

<!-- gh-comment-id:2365060635 --> @H14467 commented on GitHub (Sep 21, 2024): 我看群里大佬说的docker部署,可能是没有映射的原因
Author
Owner

@H14467 commented on GitHub (Sep 21, 2024):

frp容器要映射证书文件

<!-- gh-comment-id:2365060722 --> @H14467 commented on GitHub (Sep 21, 2024): frp容器要映射证书文件
Author
Owner

@H14467 commented on GitHub (Sep 21, 2024):

你证书文件做了映射没啊

<!-- gh-comment-id:2365061246 --> @H14467 commented on GitHub (Sep 21, 2024): 你证书文件做了映射没啊
Author
Owner

@Gabriel-six commented on GitHub (Sep 21, 2024):

你证书文件做了映射没啊

我的证书文件就是放在与frpc.toml同级的目录下,这应该不需要再映射了呀。

<!-- gh-comment-id:2365061991 --> @Gabriel-six commented on GitHub (Sep 21, 2024): > 你证书文件做了映射没啊 我的证书文件就是放在与frpc.toml同级的目录下,这应该不需要再映射了呀。
Author
Owner

@H14467 commented on GitHub (Sep 21, 2024):

额,不知道额,我现在还在外面,还没去试,你要不也去群里问问,哈哈哈哈

<!-- gh-comment-id:2365063491 --> @H14467 commented on GitHub (Sep 21, 2024): 额,不知道额,我现在还在外面,还没去试,你要不也去群里问问,哈哈哈哈
Author
Owner

@Gabriel-six commented on GitHub (Sep 21, 2024):

额,不知道额,我现在还在外面,还没去试,你要不也去群里问问,哈哈哈哈

可以哈哈,麻烦分享一下群号

<!-- gh-comment-id:2365063836 --> @Gabriel-six commented on GitHub (Sep 21, 2024): > 额,不知道额,我现在还在外面,还没去试,你要不也去群里问问,哈哈哈哈 可以哈哈,麻烦分享一下群号
Author
Owner

@H14467 commented on GitHub (Sep 21, 2024):

949022145

<!-- gh-comment-id:2365065821 --> @H14467 commented on GitHub (Sep 21, 2024): 949022145
Author
Owner

@superzjg commented on GitHub (Sep 21, 2024):

这不就是找不到文件吗,确认文件存在且是正确的,然后使用绝对路径试试。

您好,已经确认文件存在且正确,是从cloudflare申请的证书,复制证书和密钥文本到txt文件后改后缀为.crt和.key,且这两个文件在其它服务上传后都识别正常,所以确定证书文件没有问题。

以下为配置代码段:

proxies name = "blog_https" type = "https" customDomains = ["www.domain.com"]

[proxies.plugin] type = "https2http" localAddr = "127.0.0.1:8090"

keyPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.key" crtPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.crt"

hostHeaderRewrite = "127.0.0.1" requestHeaders.set.x-from-where = "frp"

关于证书与密钥的路径,相对路径与绝对路径都已经尝试,报错都为Start error:gen TLS config error,open xxxxxxx, no such file or directory

实在是找不到什么原因,在网上查找也没有找到其他人有遇到这种情况

测试一波 OpenSSL 自签名证书试试,若自签名证书可以,那可能是frp与证书不兼容?参考:
https://gofrp.org/zh-cn/docs/features/common/network/network-tls/

<!-- gh-comment-id:2365145591 --> @superzjg commented on GitHub (Sep 21, 2024): > > 这不就是找不到文件吗,确认文件存在且是正确的,然后使用绝对路径试试。 > > 您好,已经确认文件存在且正确,是从cloudflare申请的证书,复制证书和密钥文本到txt文件后改后缀为.crt和.key,且这两个文件在其它服务上传后都识别正常,所以确定证书文件没有问题。 > > 以下为配置代码段: > > [[proxies]] name = "blog_https" type = "https" customDomains = ["www.domain.com"] > > [proxies.plugin] type = "https2http" localAddr = "127.0.0.1:8090" > > keyPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.key" crtPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.crt" > > hostHeaderRewrite = "127.0.0.1" requestHeaders.set.x-from-where = "frp" > > 关于证书与密钥的路径,相对路径与绝对路径都已经尝试,报错都为Start error:gen TLS config error,open xxxxxxx, no such file or directory > > 实在是找不到什么原因,在网上查找也没有找到其他人有遇到这种情况 测试一波 OpenSSL 自签名证书试试,若自签名证书可以,那可能是frp与证书不兼容?参考: https://gofrp.org/zh-cn/docs/features/common/network/network-tls/
Author
Owner

@Gabriel-six commented on GitHub (Sep 21, 2024):

这不就是找不到文件吗,确认文件存在且是正确的,然后使用绝对路径试试。

您好,已经确认文件存在且正确,是从cloudflare申请的证书,复制证书和密钥文本到txt文件后改后缀为.crt和.key,且这两个文件在其它服务上传后都识别正常,所以确定证书文件没有问题。
以下为配置代码段:
proxies name = "blog_https" type = "https" customDomains = ["www.domain.com"]
[proxies.plugin] type = "https2http" localAddr = "127.0.0.1:8090"
keyPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.key" crtPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.crt"
hostHeaderRewrite = "127.0.0.1" requestHeaders.set.x-from-where = "frp"
关于证书与密钥的路径,相对路径与绝对路径都已经尝试,报错都为Start error:gen TLS config error,open xxxxxxx, no such file or directory
实在是找不到什么原因,在网上查找也没有找到其他人有遇到这种情况

测试一波 OpenSSL 自签名证书试试,若自签名证书可以,那可能是frp与证书不兼容?参考: https://gofrp.org/zh-cn/docs/features/common/network/network-tls/

好的我了解一下啊这个,对openssl不是很懂,谢谢

<!-- gh-comment-id:2365189971 --> @Gabriel-six commented on GitHub (Sep 21, 2024): > > > 这不就是找不到文件吗,确认文件存在且是正确的,然后使用绝对路径试试。 > > > > > > 您好,已经确认文件存在且正确,是从cloudflare申请的证书,复制证书和密钥文本到txt文件后改后缀为.crt和.key,且这两个文件在其它服务上传后都识别正常,所以确定证书文件没有问题。 > > 以下为配置代码段: > > [[proxies]] name = "blog_https" type = "https" customDomains = ["www.domain.com"] > > [proxies.plugin] type = "https2http" localAddr = "127.0.0.1:8090" > > keyPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.key" crtPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.crt" > > hostHeaderRewrite = "127.0.0.1" requestHeaders.set.x-from-where = "frp" > > 关于证书与密钥的路径,相对路径与绝对路径都已经尝试,报错都为Start error:gen TLS config error,open xxxxxxx, no such file or directory > > 实在是找不到什么原因,在网上查找也没有找到其他人有遇到这种情况 > > 测试一波 OpenSSL 自签名证书试试,若自签名证书可以,那可能是frp与证书不兼容?参考: https://gofrp.org/zh-cn/docs/features/common/network/network-tls/ 好的我了解一下啊这个,对openssl不是很懂,谢谢
Author
Owner

@xqzr commented on GitHub (Sep 21, 2024):

apps/frpc/frpc/data

出现两次 frpc,确定?

<!-- gh-comment-id:2365223583 --> @xqzr commented on GitHub (Sep 21, 2024): > apps/**frpc/frpc**/data 出现两次 **frpc**,确定?
Author
Owner

@Gabriel-six commented on GitHub (Sep 21, 2024):

apps/frpc/frpc/data

出现两次 frpc,确定?

是的,文件路径就是如此。而且之前用相对路径也是同样报错。

<!-- gh-comment-id:2365224598 --> @Gabriel-six commented on GitHub (Sep 21, 2024): > > apps/**frpc/frpc**/data > > 出现两次 **frpc**,确定? 是的,文件路径就是如此。而且之前用相对路径也是同样报错。
Author
Owner

@Gabriel-six commented on GitHub (Sep 21, 2024):

这不就是找不到文件吗,确认文件存在且是正确的,然后使用绝对路径试试。

您好,已经确认文件存在且正确,是从cloudflare申请的证书,复制证书和密钥文本到txt文件后改后缀为.crt和.key,且这两个文件在其它服务上传后都识别正常,所以确定证书文件没有问题。
以下为配置代码段:
proxies name = "blog_https" type = "https" customDomains = ["www.domain.com"]
[proxies.plugin] type = "https2http" localAddr = "127.0.0.1:8090"
keyPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.key" crtPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.crt"
hostHeaderRewrite = "127.0.0.1" requestHeaders.set.x-from-where = "frp"
关于证书与密钥的路径,相对路径与绝对路径都已经尝试,报错都为Start error:gen TLS config error,open xxxxxxx, no such file or directory
实在是找不到什么原因,在网上查找也没有找到其他人有遇到这种情况

测试一波 OpenSSL 自签名证书试试,若自签名证书可以,那可能是frp与证书不兼容?参考: https://gofrp.org/zh-cn/docs/features/common/network/network-tls/

您好,我已经使用openssl对我的域名自签发了证书,但是依然出现找不到文件的报错。或许只是frp程序中关于证书读取的代码有些问题。

另外想请教一下,自签名证书是对所用的域名来签发吗,而不是为客户端的本地ip签发?

<!-- gh-comment-id:2365261734 --> @Gabriel-six commented on GitHub (Sep 21, 2024): > > > 这不就是找不到文件吗,确认文件存在且是正确的,然后使用绝对路径试试。 > > > > > > 您好,已经确认文件存在且正确,是从cloudflare申请的证书,复制证书和密钥文本到txt文件后改后缀为.crt和.key,且这两个文件在其它服务上传后都识别正常,所以确定证书文件没有问题。 > > 以下为配置代码段: > > [[proxies]] name = "blog_https" type = "https" customDomains = ["www.domain.com"] > > [proxies.plugin] type = "https2http" localAddr = "127.0.0.1:8090" > > keyPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.key" crtPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.crt" > > hostHeaderRewrite = "127.0.0.1" requestHeaders.set.x-from-where = "frp" > > 关于证书与密钥的路径,相对路径与绝对路径都已经尝试,报错都为Start error:gen TLS config error,open xxxxxxx, no such file or directory > > 实在是找不到什么原因,在网上查找也没有找到其他人有遇到这种情况 > > 测试一波 OpenSSL 自签名证书试试,若自签名证书可以,那可能是frp与证书不兼容?参考: https://gofrp.org/zh-cn/docs/features/common/network/network-tls/ 您好,我已经使用openssl对我的域名自签发了证书,但是依然出现找不到文件的报错。或许只是frp程序中关于证书读取的代码有些问题。 另外想请教一下,自签名证书是对所用的域名来签发吗,而不是为客户端的本地ip签发?
Author
Owner

@superzjg commented on GitHub (Sep 22, 2024):

我刚刚用路由器测试了,自签名证书,v0.60.0版,读取证书没问题啊,不过浏览器告警(因为没有根证书),忽略后可以浏览网站。配置文件故意配置成与你差不多,不过不是docker环境,如下:

serverAddr = "superzjg.xxxx.xx"
serverPort = 53413
loginFailExit = false
auth.token = "xxxxxx"
log.to = "/var/log/frpc.log"
transport.tls.disableCustomTLSFirstByte = false

proxies
name = "test"
type = "https"
customDomains = ["superzjg.xxxx.xx"]
[proxies.plugin]
type = "https2http"
localAddr = "127.0.0.1:53422"
crtPath = "/etc/sky/skyself.crt"
keyPath = "/etc/sky/skyself.key"
hostHeaderRewrite = "127.0.0.1"
requestHeaders.set.x-from-where = "frp"

<!-- gh-comment-id:2365482887 --> @superzjg commented on GitHub (Sep 22, 2024): 我刚刚用路由器测试了,自签名证书,v0.60.0版,读取证书没问题啊,不过浏览器告警(因为没有根证书),忽略后可以浏览网站。配置文件故意配置成与你差不多,不过不是docker环境,如下: serverAddr = "superzjg.xxxx.xx" serverPort = 53413 loginFailExit = false auth.token = "xxxxxx" log.to = "/var/log/frpc.log" transport.tls.disableCustomTLSFirstByte = false [[proxies]] name = "test" type = "https" customDomains = ["superzjg.xxxx.xx"] [proxies.plugin] type = "https2http" localAddr = "127.0.0.1:53422" crtPath = "/etc/sky/skyself.crt" keyPath = "/etc/sky/skyself.key" hostHeaderRewrite = "127.0.0.1" requestHeaders.set.x-from-where = "frp"
Author
Owner

@Gabriel-six commented on GitHub (Sep 22, 2024):

我刚刚用路由器测试了,自签名证书,v0.60.0版,读取证书没问题啊,不过浏览器告警(因为没有根证书),忽略后可以浏览网站。配置文件故意配置成与你差不多,不过不是docker环境,如下:

serverAddr = "superzjg.xxxx.xx" serverPort = 53413 loginFailExit = false auth.token = "xxxxxx" log.to = "/var/log/frpc.log" transport.tls.disableCustomTLSFirstByte = false

proxies name = "test" type = "https" customDomains = ["superzjg.xxxx.xx"] [proxies.plugin] type = "https2http" localAddr = "127.0.0.1:53422" crtPath = "/etc/sky/skyself.crt" keyPath = "/etc/sky/skyself.key" hostHeaderRewrite = "127.0.0.1" requestHeaders.set.x-from-where = "frp"

感谢您的测试,那现在看来我这里唯一与您不一样的就是docker环境了,可能我要不通过docker直接运行frpc试一下

<!-- gh-comment-id:2365566296 --> @Gabriel-six commented on GitHub (Sep 22, 2024): > 我刚刚用路由器测试了,自签名证书,v0.60.0版,读取证书没问题啊,不过浏览器告警(因为没有根证书),忽略后可以浏览网站。配置文件故意配置成与你差不多,不过不是docker环境,如下: > > serverAddr = "superzjg.xxxx.xx" serverPort = 53413 loginFailExit = false auth.token = "xxxxxx" log.to = "/var/log/frpc.log" transport.tls.disableCustomTLSFirstByte = false > > [[proxies]] name = "test" type = "https" customDomains = ["superzjg.xxxx.xx"] [proxies.plugin] type = "https2http" localAddr = "127.0.0.1:53422" crtPath = "/etc/sky/skyself.crt" keyPath = "/etc/sky/skyself.key" hostHeaderRewrite = "127.0.0.1" requestHeaders.set.x-from-where = "frp" 感谢您的测试,那现在看来我这里唯一与您不一样的就是docker环境了,可能我要不通过docker直接运行frpc试一下
Author
Owner

@wuai1024 commented on GitHub (Sep 23, 2024):

文件路径没错的情况下,检查下是否映射目录到docker里了。可以直接进入容器里面,查看一下证书文件是否存在。

<!-- gh-comment-id:2367166053 --> @wuai1024 commented on GitHub (Sep 23, 2024): 文件路径没错的情况下,检查下是否映射目录到docker里了。可以直接进入容器里面,查看一下证书文件是否存在。
Author
Owner

@xqzr commented on GitHub (Sep 23, 2024):

可能是 SELinux

<!-- gh-comment-id:2369317835 --> @xqzr commented on GitHub (Sep 23, 2024): 可能是 SELinux
Author
Owner

@soonxf commented on GitHub (Sep 29, 2024):

keyPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.key"
crtPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.crt"

这两个配置项看着是宿主机的目录,你应该改为 docker 的内部目录 默认的应该是 /etc/frp 这个路径,找到对应的证书路径

<!-- gh-comment-id:2381123472 --> @soonxf commented on GitHub (Sep 29, 2024): keyPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.key" crtPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.crt" 这两个配置项看着是宿主机的目录,你应该改为 docker 的内部目录 默认的应该是 /etc/frp 这个路径,找到对应的证书路径
Author
Owner

@Gabriel-six commented on GitHub (Sep 30, 2024):

keyPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.key" crtPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.crt"

这两个配置项看着是宿主机的目录,你应该改为 docker 的内部目录 默认的应该是 /etc/frp 这个路径,找到对应的证书路径

好的,谢谢指出

<!-- gh-comment-id:2383442133 --> @Gabriel-six commented on GitHub (Sep 30, 2024): > keyPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.key" crtPath = "/opt/1panel/apps/frpc/frpc/data/ssl/server.crt" > > 这两个配置项看着是宿主机的目录,你应该改为 docker 的内部目录 默认的应该是 /etc/frp 这个路径,找到对应的证书路径 好的,谢谢指出
Author
Owner

@linefish1 commented on GitHub (May 7, 2025):

我们遇到的问题一模一样,问了人工智能,就是说宿主机映射等问题。不知道你解决了没有

<!-- gh-comment-id:2857279503 --> @linefish1 commented on GitHub (May 7, 2025): 我们遇到的问题一模一样,问了人工智能,就是说宿主机映射等问题。不知道你解决了没有
Author
Owner

@yjhdlut commented on GitHub (Jun 22, 2025):

像映射frpc.toml,文件一样,把证书的外部储存地址,映射进入docker里面。然后frpc.toml,里面填docker 容器里面的地址如:/etc/frp/server.key和 /etc/frp/server.crt

<!-- gh-comment-id:2994277536 --> @yjhdlut commented on GitHub (Jun 22, 2025): 像映射frpc.toml,文件一样,把证书的外部储存地址,映射进入docker里面。然后frpc.toml,里面填docker 容器里面的地址如:/etc/frp/server.key和 /etc/frp/server.crt
Author
Owner

@Gabriel-six commented on GitHub (Jun 22, 2025):

像映射frpc.toml,文件一样,把证书的外部储存地址,映射进入docker里面。然后frpc.toml,里面填docker 容器里面的地址如:/etc/frp/server.key和 /etc/frp/server.crt

感谢解答,当时刚接触docker,可能对宿主机和容器的地址映射这块不熟悉,很多配置都有问题

<!-- gh-comment-id:2994279321 --> @Gabriel-six commented on GitHub (Jun 22, 2025): > 像映射frpc.toml,文件一样,把证书的外部储存地址,映射进入docker里面。然后frpc.toml,里面填docker 容器里面的地址如:/etc/frp/server.key和 /etc/frp/server.crt 感谢解答,当时刚接触docker,可能对宿主机和容器的地址映射这块不熟悉,很多配置都有问题
Author
Owner

@yjhdlut commented on GitHub (Jun 22, 2025):

客气

<!-- gh-comment-id:2994295754 --> @yjhdlut commented on GitHub (Jun 22, 2025): 客气
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#3519
No description provided.