Fix tun gso check

This commit is contained in:
世界
2026-07-14 13:08:48 +08:00
parent 9f3fb83a55
commit 85cd9456db
+2 -2
View File
@@ -335,7 +335,7 @@ func (t *Inbound) Start(stage adapter.StartStage) error {
outboundManager := service.FromContext[adapter.OutboundManager](t.ctx)
endpointManager := service.FromContext[adapter.EndpointManager](t.ctx)
for _, outbound := range outboundManager.Outbounds() {
if _, isFlowOutbound := outbound.(adapter.FlowOutbound); isFlowOutbound {
if _, isFlowOutbound := outbound.(adapter.FlowOutbound); isFlowOutbound && common.Contains(outbound.Network(), N.NetworkTCP) {
if C.IsLinux {
t.tunOptions.GSO = true
} else {
@@ -345,7 +345,7 @@ func (t *Inbound) Start(stage adapter.StartStage) error {
}
}
for _, endpoint := range endpointManager.Endpoints() {
if _, isFlowOutbound := endpoint.(adapter.FlowOutbound); isFlowOutbound {
if _, isFlowOutbound := endpoint.(adapter.FlowOutbound); isFlowOutbound && common.Contains(endpoint.Network(), N.NetworkTCP) {
if C.IsLinux {
t.tunOptions.GSO = true
} else {