mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 03:32:33 +08:00
chore: support relative path for hy2/tuic inbound cert
This commit is contained in:
parent
a526bb70ea
commit
fedad26c13
|
@ -50,6 +50,9 @@ func New(config LC.Hysteria2Server, tunnel C.Tunnel, additions ...inbound.Additi
|
|||
|
||||
sl = &Listener{false, config, nil, nil}
|
||||
|
||||
config.Certificate = C.Path.Resolve(config.Certificate)
|
||||
config.PrivateKey = C.Path.Resolve(config.PrivateKey)
|
||||
|
||||
cert, err := CN.ParseCert(config.Certificate, config.PrivateKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
@ -43,6 +43,10 @@ func New(config LC.TuicServer, tunnel C.Tunnel, additions ...inbound.Addition) (
|
|||
Type: C.TUIC,
|
||||
Additions: additions,
|
||||
}
|
||||
|
||||
config.Certificate = C.Path.Resolve(config.Certificate)
|
||||
config.PrivateKey = C.Path.Resolve(config.PrivateKey)
|
||||
|
||||
cert, err := CN.ParseCert(config.Certificate, config.PrivateKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in New Issue
Block a user