🐛[BUG] 选择host代理方式时报错
请认真检查以下清单中的每一项
- [ √] 已经搜索过,没有发现类似的 issue
- [ √] 已经搜索过文档,没有发现相关内容
- [ √] 已经尝试使用过最新版,问题依旧存在
- [ √] 使用的是官方版本(未替换及修改过安装目录程序文件)
🐛 描述
watt toolkit以管理员方式运行,在网络加速功能里加速模式选择hosts模式,并且配置好代理DNS,但在点击一键加速后,右下角出现OnStartedShowToastReturnProxyStatus Error | System.NotSupportedException: Serialization and deserialization of 'System.Reflection.MethodBase' instances is not supported. Path: $.Exception.TargetSite.错误。
📷 复现步骤
- 以管理员模式打开watt toolkit windows版本
- 加速模式为hosts模式,点击一键加速
- 弹出报错信息
📄 日志信息
2026-10-30 10:23:20.5140|Error|StartOrStopProxyService|System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.CancellationToken.ThrowIfCancellationRequested()
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Net.Sockets.SocketReceiveFromResult>.GetResult(Int16 token)
at System.Net.Sockets.UdpClient.1 task) at BD.WTTS.Services.Implementation.NetworkTestService.TestDNSAsync(String testDomain, String dnsServerIp, Int32 dnsServerPort, DnsRecordType dnsRecordType, CancellationToken cancellationToken) at BD.WTTS.Services.ProxyService.GetValidDNSAsync(String dns, CancellationToken cancellationToken) | 2026-10-30 10:23:21.1110|Error|ProxyService|OnStartedShowToastReturnProxyStatus Error | System.NotSupportedException: Serialization and deserialization of 'System.Reflection.MethodBase' instances is not supported. Path: $.Exception.TargetSite. at System.Text.Json.ThrowHelper.ThrowNotSupportedException(WriteStack& state, Exception innerException) at System.Text.Json.Serialization.JsonConverter1.WriteCore(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.Metadata.JsonTypeInfo1.Serialize(Utf8JsonWriter writer, T& rootValue, Object rootValueBoxed) at System.Text.Json.Serialization.Metadata.JsonTypeInfo1.SerializeAsObject(Utf8JsonWriter writer, Object rootValue)
at System.Text.Json.Serialization.Metadata.JsonTypeInfo1.Serialize(Utf8JsonWriter writer, T& rootValue, Object rootValueBoxed) at System.Text.Json.JsonSerializer.WriteElement[TValue](TValue& value, JsonTypeInfo1 jsonTypeInfo)
at System.Text.Json.JsonSerializer.SerializeToElement[TValue](TValue value, JsonSerializerOptions options)
at dotnetCampus.Ipc.Serialization.SystemTextJsonIpcObjectSerializer.SerializeToElement(Object value)
at dotnetCampus.Ipc.CompilerServices.GeneratedProxies.Models.IpcJsonElement.Serialize(Object value, IIpcObjectSerializer serializer)
at dotnetCampus.Ipc.CompilerServices.GeneratedProxies.PublicIpcJointManager.CreateReturnModelFromReturnObject(IGarmObject returnModel)
at dotnetCampus.Ipc.CompilerServices.GeneratedProxies.PublicIpcJointManager.InvokeAndReturn(GeneratedIpcJoint joint, GeneratedProxyMemberInvokeModel requestModel, IPeerProxy peer)
--- End of stack trace from previous location ---
at dotnetCampus.Ipc.CompilerServices.GeneratedProxies.Models.GeneratedProxyExceptionModel.Throw()
at dotnetCampus.Ipc.CompilerServices.GeneratedProxies.Utils.IpcProxyInvokingHelper.IpcInvokeAsync[T](MemberInvokingType callType, UInt64 memberId, String memberName, IGarmObject[] args)
at dotnetCampus.Ipc.CompilerServices.GeneratedProxies.GeneratedIpcProxy`1.IpcInvokeAsync[T](MemberInvokingType callType, UInt64 memberId, String memberName, IGarmObject[] args, IpcMemberInfo info)
at BD.WTTS.Services.ProxyService.StartProxyServiceCoreAsync()
at BD.WTTS.Services.ProxyService.StartProxyServiceAsync()
🖼 截图
🚑 其他信息
- 处理器体系结构:x64
- 系统版本号:Windows 11 26H2 26300.9818
- 下载渠道:Github
- 程序版本:3.1.0 for windows (x64)
- 是否包含独立运行时:是
遇到相同问题,系统版本号同为Windows 11 26H2 26300.9818,但经测试使用管理员身份启动,可以使用Hosts模式启动加速,而普通运行会出现报错 OnStartedShowToastReturnProxyStatus Error Serialization and deserialization of 'System.Reflection.MethodBase' instances is not supported. Path: $.Exception.TargetSite.
补充:非管理员运行时,Hosts和DNSIntercept模式均无法使用,报错信息如上
刚开机更新的Win11 26H2 26300.9818,遇到同样报错,使用管理员运行仍旧
+1,刚更新完 26300.9818就这样,得暂时用PAC模式
补充,3.1.0的报错内容同上,像是出现bug没有序列化
上个版本(3.0.0-rc16)提示框报错:
System.Exception:以一种访问权限不允许的方式做了一个访问
套接字的尝试。
at
System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAn
dThrowException(SocketError error, Boolean
disconnectOnFailure, String callerName)
at System.Net.Sockets.Socket.DoBind(EndPoint
endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Socke
tTransportOptions.CreateDefaultBoundListenSocket(EndPoin
t endpoint)
at
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Socke
tConnectionListener.Bind()
at
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Socke
tTransportFactory.BindAsync(EndPoint endpoint,
CancellationToken cancellationToken)
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastruct
ure.TransportManager.BindAsync(EndPoint endPoint,
ConnectionDelegate connectionDelegate, EndpointConfig
endpointConfig, CancellationToken cancellationToken)
at
Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.
<>c_DisplayClass28_0*1 .<< StartAsync>g_OnBind|
0>d.MoveNext()
--- End of stack trace from previous location ---
at
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBi
nder.BindEndpointAsync(ListenOptions endpoint,
AddressBindContext context, CancellationToken
cancellationToken)
at
Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.Bin
dAsync(AddressBindContext context, CancellationToken
cancellationToken)
at
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBi
nder.EndpointsStrategy.BindAsync(AddressBindContext
context, CancellationToken cancellationToken)
at
Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.
BindAsync(CancellationToken cancellationToken)
at
Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.
StartAsync[TContext](IHttpApplication'1 application,
CancellationToken cancellationToken)
at
Microsoft.AspNetCore.Hosting.GenericWebHostService.Start
Async(CancellationToken cancellationToken)
Microsoft.Extensions.Hosting.Internal.Host .< StartAsync>b_
14_1(IHostedService service, CancellationToken token)
at
Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T
](IEnumerable'1 services, CancellationToken token, Boolean
concurrent, Boolean abortOnFirstException, List'1
exceptions, Func'3 operation)
at
Microsoft.Extensions.Hosting.Internal.Host.StartAsync(Canc
ellationToken cancellationToken)
at
Microsoft.Extensions.Hosting.HostingAbstractionsHostExten
sions.RunAsync(IHost host, CancellationToken token)
at
Microsoft.Extensions.Hosting.HostingAbstractionsHostExten
sions.RunAsync(IHost host, CancellationToken token)
at
Microsoft.Extensions.Hosting.HostingAbstractionsHostExten
sions.Run(IHost host)
at
BD.WTTS.Services.Implementation.YarpReverseProxyServicel
mpl .< >c_DisplayClass19_0 .< StartProxyCore>b_30)
我怀疑是新问题,已经上报 #4151,并且我翻出来更多日志:
Accelerator/nlog-all-2026-10-31-3.1.0.log Accelerator/nlog-all-2026-10-31.log
加速设置中关掉启用http监听可暂时解决,推测是最新windows更新改了80端口权限问题