boxdd: Add insecure mode

This commit is contained in:
世界
2026-08-30 17:41:43 +08:00
parent b4600dd4f7
commit 0a4e4c8061
60 changed files with 1055 additions and 285 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")
}