diff --git a/go.mod b/go.mod index bad65288..aa021b4b 100644 --- a/go.mod +++ b/go.mod @@ -55,7 +55,7 @@ require ( github.com/sagernet/sing-shadowsocks2 v0.2.2-0.20260929152114-a69d1086332b github.com/sagernet/sing-shadowtls v0.2.2-0.20260928201441-a9c0127d5c99 github.com/sagernet/sing-snell v0.0.0-20261109120040-72a9d48fcda7 - github.com/sagernet/sing-tun v0.9.7-0.20261109102115-27e188fc90f4 + github.com/sagernet/sing-tun v0.9.7-0.20261109145621-cb941cc824bf github.com/sagernet/sing-usbip v0.0.0-20260817040617-28bd42667eca github.com/sagernet/sing-vmess v0.2.9-0.20261108133243-b01463cef941 github.com/sagernet/smux v1.5.50-sing-box-mod.1 diff --git a/go.sum b/go.sum index 162708be..9a20304a 100644 --- a/go.sum +++ b/go.sum @@ -338,8 +338,8 @@ github.com/sagernet/sing-shadowtls v0.2.2-0.20260928201441-a9c0127d5c99 h1:l/tdZ github.com/sagernet/sing-shadowtls v0.2.2-0.20260928201441-a9c0127d5c99/go.mod h1:sWqKnGlMipCHaGsw1sTTlimyUpgzP4WP3pjhCsYt9oA= github.com/sagernet/sing-snell v0.0.0-20261109120040-72a9d48fcda7 h1:nMJkYrwTWM5Cor1kBxGEUBoRNM2JMlLZ+nsAEOPkekE= github.com/sagernet/sing-snell v0.0.0-20261109120040-72a9d48fcda7/go.mod h1:et8Lws4f5QbOrY65DmjevHGup3mijJkhswkto6cwciM= -github.com/sagernet/sing-tun v0.9.7-0.20261109102115-27e188fc90f4 h1:Bq+ROKWqroxToGY7GczLpgjTUZAcHTwDRJ6JlkSMPR4= -github.com/sagernet/sing-tun v0.9.7-0.20261109102115-27e188fc90f4/go.mod h1:3EgPst7agntRO7D6GOsiZ1l9FoqdLeuWmKT5TnWkmf0= +github.com/sagernet/sing-tun v0.9.7-0.20261109145621-cb941cc824bf h1:pdEaH7rHVxZzB15rEEFTkoFs2bcu2Z91VrPlpl6jBKQ= +github.com/sagernet/sing-tun v0.9.7-0.20261109145621-cb941cc824bf/go.mod h1:3EgPst7agntRO7D6GOsiZ1l9FoqdLeuWmKT5TnWkmf0= github.com/sagernet/sing-usbip v0.0.0-20260817040617-28bd42667eca h1:5wA+IE0Fq1CGVLOgSpm0gKKZ03HzugcJ2JyhmDqeX6A= github.com/sagernet/sing-usbip v0.0.0-20260817040617-28bd42667eca/go.mod h1:ADAZZU85MnM91XNhd2TdZRTaIbA7RjTZuQ1KCHcUbNg= github.com/sagernet/sing-vmess v0.2.9-0.20261108133243-b01463cef941 h1:QiLfQ/yZwOV0Guu/Yxeqf8QTwlPi2gVQyirU5BqJjOM= diff --git a/protocol/bridge/backend_linux.go b/protocol/bridge/backend_linux.go index 8bc6a4e3..b3c4ff42 100644 --- a/protocol/bridge/backend_linux.go +++ b/protocol/bridge/backend_linux.go @@ -347,7 +347,7 @@ func (b *backendLinux) batchReadLoop() { if !tun.IsRecoverableReadError(err) { return } - readRetry.Wait(err) + readRetry.Wait() } else { readRetry.Reset() } diff --git a/protocol/tailscale/tun_device_unix.go b/protocol/tailscale/tun_device_unix.go index d4bc7ced..6281da0b 100644 --- a/protocol/tailscale/tun_device_unix.go +++ b/protocol/tailscale/tun_device_unix.go @@ -4,7 +4,6 @@ package tailscale import ( "encoding/hex" - "errors" "io" "os" "sync" @@ -75,9 +74,6 @@ func (a *tunDeviceAdapter) Read(bufs [][]byte, sizes []int, offset int) (count i a.debugPacket("read", readBuf[singTun.PacketOffset:n]) return 1, nil } - if errors.Is(err, singTun.ErrTooManySegments) { - err = wgTun.ErrTooManySegments - } return 0, err } diff --git a/transport/wireguard/device_system.go b/transport/wireguard/device_system.go index 5f709d65..7ce992a0 100644 --- a/transport/wireguard/device_system.go +++ b/transport/wireguard/device_system.go @@ -2,7 +2,6 @@ package wireguard import ( "context" - "errors" "net" "net/netip" "os" @@ -137,8 +136,6 @@ func (w *systemDevice) Read(bufs [][]byte, sizes []int, offset int) (count int, if err == nil { sizes[0] -= tun.PacketOffset count = 1 - } else if errors.Is(err, tun.ErrTooManySegments) { - err = wgTun.ErrTooManySegments } } return