chore: support relative path for hy2/tuic inbound cert
This commit is contained in:
parent
a526bb70ea
commit
fedad26c13
2 changed files with 7 additions and 0 deletions
|
@ -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 a new issue