Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENHANCEMENT] Ability to change the max packet size #64

Closed
maxomatic458 opened this issue Jun 3, 2024 · 6 comments
Closed

[ENHANCEMENT] Ability to change the max packet size #64

maxomatic458 opened this issue Jun 3, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@maxomatic458
Copy link

maxomatic458 commented Jun 3, 2024

Is your feature request related to a problem? Please describe.
If your network/vpn does not support IP fragmentation, packet loss can occur

Describe the solution you'd like
Either lower the default packet size, or let the user choose it from within the plugins menu

Describe alternatives you've considered
Dont add it as its a pretty uncommon edge case

Additional context
i was trying to use https://playit.gg/ (a reverse proxy that only needs to be installed on the host side) with Fika, but since they dont support IP fragmentation packets got lost. Building the Plugin from source with a lower packet size fixed that problem

@maxomatic458 maxomatic458 added the enhancement New feature or request label Jun 3, 2024
@Lacyway
Copy link
Member

Lacyway commented Jun 11, 2024

Could you tell me exactly which option you want changed?

@Lacyway Lacyway self-assigned this Jun 11, 2024
@maxomatic458
Copy link
Author

My idea was to have a ingame dropdown (in the f12 menu)
To select different Mtu sizes (as they are already implemented in the code, but just not configurable)

@Lacyway
Copy link
Member

Lacyway commented Jun 11, 2024

My idea was to have a ingame dropdown (in the f12 menu) To select different Mtu sizes (as they are already implemented in the code, but just not configurable)

I realized I was not very elaborate in my response, sorry.
That sounds like a good idea, rather than a free text field.

Which part of the NetManager would you like this to affect?

@maxomatic458
Copy link
Author

maxomatic458 commented Jun 11, 2024

i think this could be implemented here
but im actually not sure if that covers all the packets

internal static readonly int[] PossibleMtu =
{
576 - MaxUdpHeaderSize, //minimal (RFC 1191)
1024, //most games standard
1232 - MaxUdpHeaderSize,
1460 - MaxUdpHeaderSize, //google cloud
1472 - MaxUdpHeaderSize, //VPN
1492 - MaxUdpHeaderSize, //Ethernet with LLC and SNAP, PPPoE (RFC 1042)
1500 - MaxUdpHeaderSize //Ethernet II (RFC 1191)
};
//Max possible single packet size
public static readonly int MaxPacketSize = PossibleMtu[PossibleMtu.Length - 1];
public static readonly int MaxUnreliableDataSize = MaxPacketSize - HeaderSize;

@Lacyway
Copy link
Member

Lacyway commented Jun 11, 2024

Thanks, I will look into it when I have the time.

@ArchangelWTF
Copy link
Member

Without making significant changes to LiteNetLib this wont be possible, then there's even the question of if we'd want to support such configurations as they would make it harder to deal with issues in the Discord. Closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants