-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
proxy/http: Avoid getting stuck when using server-first protocols #1517
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
firstPayload = make([]byte, 0)
is not needed, because you already had a nil slice with var firstPayload []byte
.
Codecov Report
@@ Coverage Diff @@
## master #1517 +/- ##
==========================================
+ Coverage 39.27% 39.37% +0.10%
==========================================
Files 604 616 +12
Lines 35510 37097 +1587
==========================================
+ Hits 13946 14608 +662
- Misses 20026 20868 +842
- Partials 1538 1621 +83
Continue to review full report at Codecov.
|
Also, #1292 uses 100ms for shadowsocks outbound. Maybe we should define a constant and use the same wait time for all types of outbound? |
Thanks for your review. Actually I'm not familiar with go... and also the codebase... Any suggestions on where should I put the constant? |
You did a great job already! Feel free to ask if you have any questions.
|
Thanks @database64128 , for your nice words and kind help! I've made the constant and you may have a look at it again. |
I do not think this problem has been solved. Why did this PR get closed? It seems that I cannot even reopen it. |
I will have a look at this pr and try to merge it before next release. |
@xiaokangwang Thanks! I need this feature and now I have to manually apply the patch, which is really annoying. If any changes are needed, feel free to comment. |
PR v2fly#99 reduces an extra RTT when setting up the CONNECT tunnel via http proxy, however, server-first protocols (such as MySQL) will be unusable as v2ray keeps to wait for the client request. This commit solves the problem by limiting the maximum waiting time to 50 ms.
PR #99 reduces an extra RTT when setting up the CONNECT tunnel
via http proxy, however, server-first protocols (such as MySQL)
will be unusable as v2ray keeps to wait for the client request.
This commit solves the problem by limiting the maximum waiting
time to 50 ms.