Surge 测试更新说明 macOS TCP 迁移至 Network.framework 及内存显示变化
Blankwonder 的官方频道在 Beta Updates 中说明,macOS 15 及以上的出站 TCP 连接,包括直连和连接代理服务器,改用 Network.framework。频道称,待转发数据不再占用内核共享网络缓冲区,以避免网关测速等大量并发流量耗尽这些缓冲区而导致系统强制停止 Surge。TCP 缓冲区转入 Surge 进程后,活动监视器显示的 Surge 内存可能上升;说明称系统总内存用量不变,只是从内核改计入进程。本条属于测试更新范围。
频道原文@SurgeTestFlightFeedBeta Updates
Surge Engine
• The ecn parameter now also applies to TCP proxies on macOS 15 and later and iOS 18 and later: ecn=true or ecn=false turns ECN on or off for the connection to the server, and Auto leaves it to the system.
• Fixed connections that closed normally being listed as failed with "Reset by client" or "Reset by remote" since 6.12.0.
• Fixed MITM HTTP/2 requests to a host waiting forever with "Wait previous connection setup completed" after a server accepted a connection but never answered the TLS handshake; the setup now times out.
• Fixed installing a profile from a URL failing with a parse error when the profile uses #!include.
• Fixed a runaway script on the WebView engine leaving later scripts stuck; timed-out scripts are now fully stopped.
• Fixed exceptions in WebView scripts, including syntax errors and exceptions in timer and $httpClient callbacks, not stopping the script as on JavaScriptCore; the reported line numbers now refer to your script.
• Fixed $httpClient sending a TypedArray request body as JSON instead of bytes on JavaScriptCore.
• Fixed console.log printing arrays and errors poorly.
• Fixed setTimeout without a delay or with extra arguments.
• $persistentStore now stores non-string values as JSON on both script engines.
• WebView scripts now stop when more than 64 timers are pending, as on JavaScriptCore.
• WebView scripts that handle large $httpClient bodies, $persistentStore data or $utils.ungzip use much less memory.
• Fixed license activation timing out on some networks.Surge Mac
User-space TCP networking stack
• On macOS 15 or later, outgoing TCP connections, both DIRECT and to proxy servers, now use Network.framework, Apple's modern user-space networking stack, instead of BSD sockets. Data waiting to be relayed no longer sits in the kernel's shared network buffers, so heavy multi-connection traffic, such as a speed test from a device using Surge as its gateway, can no longer exhaust them and cause macOS to forcibly stop Surge.
• Because the TCP buffers of these connections now live in Surge's own process rather than in the kernel, Activity Monitor attributes that memory to Surge. Surge's memory usage may therefore appear higher than before, but the system's total memory usage has not changed; the same memory is simply counted under Surge instead of the kernel.
• The ECN option in the proxy editor is now an Auto / On / Off choice and is available for TCP proxies on macOS 15 and later. Fixed Auto showing as on and any click writing an explicit ecn.
• Fixed updates failing to install with a timeout, for example while a macOS update was pending.