boxdd: Add insecure mode

This commit is contained in:
世界
2026-07-15 19:31:11 +08:00
parent 52f372c536
commit e34b57c3b0
61 changed files with 1058 additions and 288 deletions
+2 -2
View File
@@ -3,7 +3,6 @@ package tls
import (
"context"
"crypto/x509"
"os"
"strings"
"time"
@@ -11,6 +10,7 @@ import (
"github.com/sagernet/sing-box/option"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/service"
"github.com/sagernet/sing/service/filemanager"
)
type SystemTLSValidated struct {
@@ -89,7 +89,7 @@ func resolveSystemAnchors(ctx context.Context, options option.OutboundTLSOptions
return []byte(strings.Join(options.Certificate, "\n")), true, nil, nil
}
if options.CertificatePath != "" {
content, err := os.ReadFile(options.CertificatePath)
content, err := filemanager.ReadFile(ctx, options.CertificatePath)
if err != nil {
return nil, false, nil, E.Cause(err, "read certificate")
}