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

Add support for "optimize tcp buffers" option per profile. #3137

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

notsure2
Copy link

  • It tunes down the local sslocal listener socket buffers which is the right thing to do in 99.999% of cases of mobile app.

  • It additionally also tunes down the remote socket buffers of sslocal when a plugin is used. This is needed to ensure there's no bufferbloat between sslocal and the plugin itself.

  • Ideally the plugin on its side should also choke its local listening socket buffers and leave only its remote side socket buffers unrestricted.

  • An additional follow up fix is needed which is to use a version of shadowsocks-rust which implements the buffer controls on the listening socket side. I have opened a PR there: Set the incoming socket buffer sizes properly on the listen socket. shadowsocks-rust#1381

  • Given that ss-android is using an older release of ss-rust. The PR will probably need to be backported to 1.5.x branch, or ss-android needs to upgrade to latest ss-rust after my PR is merged and a release is made.

  • This fixes the following issue which happens when using shadowsocks with or without a plugin:

  • Large file uploads immediately jump to 80-90% and hang because the unrestricted local socket of ss, copies most or the file inside it giving a premature acknowledgement to the app, then the app hangs while the actual proxy uploads the file bit by bit (this issue is highly apparent on slow upload internet condition). Most apps will consider this hang as a timeout and fail to upload.

  • This issue affects for example Whatsapp Google Drive backup which fails to upload while shadowsocks is working when the backup size becomes big enough. It also causes failures to google drive sync.

  • I added translation for all languages by carefully finessing google bard and translating back and forth multiple times until both sides give the same result, feel free to improve them.

 - It tunes down the local sslocal listener socket buffers which is the right thing to do in 99.999% of cases of mobile app.
 - It additionally also tunes down the remote socket buffers of sslocal when a plugin is used. This is needed to ensure there's no bufferbloat between sslocal and the plugin itself.
 - Ideally the plugin on its side should also choke its local listening socket buffers and leave only its remote side socket buffers unrestricted.
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 this pull request may close these issues.

None yet

1 participant