mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 19:56:51 +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}
|
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 New Issue
Block a user