mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-07-22 22:14:09 +08:00
Increase default mtu under network extension to 4064
This commit is contained in:
parent
96df69bcdc
commit
811ff93549
@ -134,7 +134,8 @@ func NewInbound(ctx context.Context, router adapter.Router, logger log.ContextLo
|
||||
tunMTU := options.MTU
|
||||
if tunMTU == 0 {
|
||||
if platformInterface != nil && platformInterface.UnderNetworkExtension() {
|
||||
tunMTU = 4000
|
||||
// In Network Extension, when MTU exceeds 4064 (4096-UTUN_IF_HEADROOM_SIZE), the performance of tun will drop significantly, which may be a system bug.
|
||||
tunMTU = 4064
|
||||
} else {
|
||||
tunMTU = 9000
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user