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}
|
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)
|
cert, err := CN.ParseCert(config.Certificate, config.PrivateKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
@ -43,6 +43,10 @@ func New(config LC.TuicServer, tunnel C.Tunnel, additions ...inbound.Addition) (
|
||||||
Type: C.TUIC,
|
Type: C.TUIC,
|
||||||
Additions: additions,
|
Additions: additions,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
config.Certificate = C.Path.Resolve(config.Certificate)
|
||||||
|
config.PrivateKey = C.Path.Resolve(config.PrivateKey)
|
||||||
|
|
||||||
cert, err := CN.ParseCert(config.Certificate, config.PrivateKey)
|
cert, err := CN.ParseCert(config.Certificate, config.PrivateKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in a new issue