-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
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:
shadowsocks-rust/crates/shadowsocks/src/net/sys/unix/linux/mod.rs
Lines 313 to 315 in e791f23
| 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.