diff --git a/cmd/internal/build_libbox/main.go b/cmd/internal/build_libbox/main.go index f6540c85..3bfe862c 100644 --- a/cmd/internal/build_libbox/main.go +++ b/cmd/internal/build_libbox/main.go @@ -54,7 +54,7 @@ func init() { sharedFlags = append(sharedFlags, "-X github.com/sagernet/sing-box/constant.Version="+currentTag+" -s -w -buildid=") debugFlags = append(debugFlags, "-X github.com/sagernet/sing-box/constant.Version="+currentTag) - sharedTags = append(sharedTags, "with_gvisor", "with_quic", "with_wireguard", "with_utls", "with_clash_api") + sharedTags = append(sharedTags, "with_gvisor", "with_quic", "with_wireguard", "with_ech", "with_utls", "with_clash_api") iosTags = append(iosTags, "with_dhcp", "with_low_memory", "with_conntrack") debugTags = append(debugTags, "debug") } diff --git a/cmd/internal/update_apple_version/main.go b/cmd/internal/update_apple_version/main.go index dba81f83..864b788e 100644 --- a/cmd/internal/update_apple_version/main.go +++ b/cmd/internal/update_apple_version/main.go @@ -29,8 +29,7 @@ func main() { newContent, updated0 := findAndReplace(objectsMap, projectContent, []string{"io.nekohasekai.sfa"}, newVersion.VersionString()) newContent, updated1 := findAndReplace(objectsMap, newContent, []string{"io.nekohasekai.sfa.independent", "io.nekohasekai.sfa.system"}, newVersion.String()) if updated0 || updated1 { - log.Info("updated version to ", newVersion.VersionString()) - common.Must(os.WriteFile("sing-box.xcodeproj/project.pbxproj.bak", []byte(projectContent), 0o644)) + log.Info("updated version to ", newVersion.VersionString(), " (", newVersion.String(), ")") common.Must(os.WriteFile("sing-box.xcodeproj/project.pbxproj", []byte(newContent), 0o644)) } else { log.Info("version not changed") diff --git a/common/tls/ech_client.go b/common/tls/ech_client.go index 930dfaaf..60560387 100644 --- a/common/tls/ech_client.go +++ b/common/tls/ech_client.go @@ -178,7 +178,7 @@ func NewECHClient(ctx context.Context, serverAddress string, options option.Outb } else if options.ECH.ConfigPath != "" { content, err := os.ReadFile(options.ECH.ConfigPath) if err != nil { - return nil, E.Cause(err, "read key") + return nil, E.Cause(err, "read ECH config") } echConfig = content } diff --git a/common/tls/ech_server.go b/common/tls/ech_server.go index b6b6f7d0..43ddd820 100644 --- a/common/tls/ech_server.go +++ b/common/tls/ech_server.go @@ -159,7 +159,7 @@ func (c *echServerConfig) startECHWatcher() error { if err != nil { return err } - c.watcher = watcher + c.echWatcher = watcher go c.loopECHUpdate() return nil } @@ -178,7 +178,7 @@ func (c *echServerConfig) loopECHUpdate() { if err != nil { c.logger.Error(E.Cause(err, "reload ECH key")) } - case err, ok := <-c.watcher.Errors: + case err, ok := <-c.echWatcher.Errors: if !ok { return } @@ -304,7 +304,7 @@ func NewECHServer(ctx context.Context, logger log.Logger, options option.Inbound } else if options.KeyPath != "" { content, err := os.ReadFile(options.ECH.KeyPath) if err != nil { - return nil, E.Cause(err, "read key") + return nil, E.Cause(err, "read ECH key") } echKey = content } else {