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

Configuration option to allow IP fragmentation on outbound UDP sockets in ssserver #1780

Closed
tom-ryan opened this issue Nov 25, 2024 · 6 comments · Fixed by #1790
Closed

Configuration option to allow IP fragmentation on outbound UDP sockets in ssserver #1780

tom-ryan opened this issue Nov 25, 2024 · 6 comments · Fixed by #1790

Comments

@tom-ryan
Copy link
Contributor

Hello! I have a use case where outbound UDP traffic from ssserver sometimes needs to traverse a network with a smaller MTU. Unfortunately I don't have control over the network or the application sending the traffic.

I saw that per previous issues on this project, IP fragmentation was disabled to improve performance. For my use case, it's preferable to allow IP fragmentation / accept the performance overhead.

I tested that by commenting out the following lines, UDP traffic was fragmented as expected:

if let Err(err) = set_disable_ip_fragmentation(af, &socket) {
warn!("failed to disable IP fragmentation, error: {}", err);
}

What do you think about adding a new configuration option in ssserver like allow_outbound_udp_fragmentation ? The default will be false, keeping the current behavior. When allow_outbound_udp_fragmentation = true, set_disable_ip_fragmentation will be skipped. If that sounds OK, I'll be happy to submit a patch.

@zonyitoo
Copy link
Collaborator

It is Ok. I would prefer outbound_udp_allow_fragmentation. Just put it in ConnectOpts and supported it both globally and per-servers.

@tom-ryan
Copy link
Contributor Author

Sounds good, thanks. I should be able to submit something end of this week / start of next week.

@Venkatesh1505
Copy link

Hey @zonyitoo !
When is the related PR planned to be released? I see here that it was planned in early december. Any tentative dates planned for the same? TIA

@zonyitoo
Copy link
Collaborator

zonyitoo commented Dec 16, 2024

Waiting for hickory-dns' new release. They said it could be released in early December, but obviously no..

@venkateshravichandran01

Thanks @zonyitoo ! I could see that there is a release by hickory-dns recently - https://crates.io/crates/hickory-resolver
v0.24.2. Am I looking at the wrong place?
Asking since we are waiting for next release of shadowsocks-rust incorporating the changes to allow IP fragmentation.

@zonyitoo
Copy link
Collaborator

We are waiting for its v0.25 release.

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

Successfully merging a pull request may close this issue.

4 participants