p4gefau1t / trojan-go

Go实现的Trojan代理,支持多路复用/路由功能/CDN中转/Shadowsocks混淆插件,多平台,无依赖。A Trojan proxy written in Go. An unidentifiable mechanism that helps you bypass GFW. https://p4gefau1t.github.io/trojan-go/
GNU General Public License v3.0
7.54k stars 1.64k forks source link

[BUG]使用自签名证书启动服务端失败 #513

Open fstonezst opened 11 months ago

fstonezst commented 11 months ago

Trojan Version v0.10.6

Describe the bug 使用自签名证书启动服务端失败

To Reproduce Steps to reproduce the behavior: Step1 使用自签名证书(生成方法如下) openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365

Step2 设置秘钥文件权限 777

-rwxrwxrwx 1 root root 2061 Jul  8 23:19 cert.pem                                                                           
-rwxrwxrwx 1 root root 3394 Jul  8 23:19 key.pem

Step3 配置config

    "ssl": {
        "cert": "**/cert.pem",
        "key": "**/key.pem",
        "key_pssword": "生成秘钥时用的密码",
        "fallback_port": 10086
    }

Step4 启动 ./trojan-go -config ../config/config.json

Step5 执行结果 : 服务启动失败 [FATAL] 2023/07/08 23:23:48 github.com/p4gefau1t/trojan-go/proxy.(*Node).BuildNext:stack.go:29 tls failed to load key pair

Expected behavior 正常启动

Logs [FATAL] 2023/07/08 23:23:48 github.com/p4gefau1t/trojan-go/proxy.(*Node).BuildNext:stack.go:29 tls failed to load key pair Environment centos7

Additional context none

Deoncn commented 11 months ago

因为 版本来老了,没更新,在线地址 上的配置文件全失效了。

fstonezst commented 10 months ago

因为 版本来老了,没更新,在线地址 上的配置文件全失效了。

@Deoncn 老版本不支持自签证书?