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
+3 -3
View File
@@ -8,7 +8,6 @@ import (
"encoding/base64"
"encoding/pem"
"net"
"os"
"strings"
"sync"
"time"
@@ -19,6 +18,7 @@ import (
E "github.com/sagernet/sing/common/exceptions"
aTLS "github.com/sagernet/sing/common/tls"
"github.com/sagernet/sing/service"
"github.com/sagernet/sing/service/filemanager"
mDNS "github.com/miekg/dns"
"golang.org/x/crypto/cryptobyte"
@@ -29,7 +29,7 @@ func parseECHClientConfig(ctx context.Context, clientConfig ECHCapableConfig, op
if len(options.ECH.Config) > 0 {
echConfig = []byte(strings.Join(options.ECH.Config, "\n"))
} else if options.ECH.ConfigPath != "" {
content, err := os.ReadFile(options.ECH.ConfigPath)
content, err := filemanager.ReadFile(ctx, options.ECH.ConfigPath)
if err != nil {
return nil, E.Cause(err, "read ECH config")
}
@@ -60,7 +60,7 @@ func parseECHServerConfig(ctx context.Context, options option.InboundTLSOptions,
if len(options.ECH.Key) > 0 {
echKey = []byte(strings.Join(options.ECH.Key, "\n"))
} else if options.ECH.KeyPath != "" {
content, err := os.ReadFile(options.ECH.KeyPath)
content, err := filemanager.ReadFile(ctx, options.ECH.KeyPath)
if err != nil {
return E.Cause(err, "read ECH keys")
}