SaeedDev94 / Xray

Xray GUI Client For Android
MIT License
194 stars 23 forks source link

Recommended default MTU #25

Closed heiher closed 6 months ago

heiher commented 6 months ago

For better transmission performance, I recommended setting the default MTU value to 8500.

SaeedDev94 commented 6 months ago

@heiher Thanks for your suggestion
I set default MTU value to 1500 because it's the default value for most of modems and routers
Also user can customize MTU value in advanced settings
Isn't lower MTU value better for slow internet speed connections ?
Personally my internet speed is really slow, sometimes it's less than 800 K bit per second (less than 100 K byte per second) !!! ☹️
BTW I don't know much about MTU, If you still think 8500 is better even for really slow connections I'll do it ❤️

heiher commented 6 months ago

@heiher Thanks for your suggestion I set default MTU value to 1500 because it's the default value for most of modems and routers Also user can customize MTU value in advanced settings Isn't lower MTU value better for slow internet speed connections ? Personally my internet speed is really slow, sometimes it's less than 800 K bit per second (less than 100 K byte per second) !!! ☹️ BTW I don't know much about MTU, If you still think 8500 is better even for really slow connections I'll do it ❤️

In tun2socks mode, the MTU is only used for the IP stack of the virtual network card and the operating system, and has nothing to do with the modem and router in the upstream link.

SaeedDev94 commented 6 months ago

In tun2socks mode, the MTU is only used for the IP stack of the virtual network card and the operating system, and has nothing to do with the modem and router in the upstream link.

And what about slow connections ? (higher or lower value for MTU)

heiher commented 6 months ago

In tun2socks mode, the MTU is only used for the IP stack of the virtual network card and the operating system, and has nothing to do with the modem and router in the upstream link.

And what about slow connections ? (higher or lower value for MTU)

Higher MTU is also good for slow networks.

SaeedDev94 commented 6 months ago

Higher MTU is also good for slow networks.

So I'll do it (next update) for sure, thanks again ❤️

SaeedDev94 commented 6 months ago

https://github.com/SaeedDev94/Xray/commit/0576831627e9a576a01fd11a142718286299d610