mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-06 11:14:56 +03:00
Add trojan inbound/outbound
This commit is contained in:
@@ -100,8 +100,8 @@ func NewTLS(dialer N.Dialer, serverAddress string, options option.OutboundTLSOpt
|
||||
}
|
||||
if len(certificate) > 0 {
|
||||
certPool := x509.NewCertPool()
|
||||
if !certPool.AppendCertsFromPEM([]byte(options.Certificate)) {
|
||||
return nil, E.New("failed to parse certificate:\n\n", options.Certificate)
|
||||
if !certPool.AppendCertsFromPEM(certificate) {
|
||||
return nil, E.New("failed to parse certificate:\n\n", certificate)
|
||||
}
|
||||
tlsConfig.RootCAs = certPool
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user