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

Reduce extra RTT when setting up CONNECT tunnel in http outbound (not vmess through http) #99

Merged
merged 1 commit into from
Aug 17, 2020
Merged

Conversation

darhwa
Copy link
Contributor

@darhwa darhwa commented Aug 15, 2020

Previous http outbound has 1 extra round-trip time to set up a CONNECT method tunnel. The client sends a CONNECT method request, waits for 200 OK response from server, then sends tunnelled payload.

This commit eliminates the extra RTT by sending first client payload (probably the ClientHello of tunnelled connection) immediately after the CONNECT method request, without waiting for 200 OK from server. This mechanism has been implemented in NaiveProxy and proves to work.

BTW, the Proxy-Connection header only takes effect for http/1.x, so I deleted it for h2.

@darhwa darhwa changed the title Reduce 1 RTT in http outbound Reduce extra RTT when setting up CONNECT tunnel in http outbound (not vmess through http) Aug 17, 2020
@kslr kslr merged commit ea5d1ee into v2fly:master Aug 17, 2020
@darhwa darhwa deleted the http-outbound branch August 17, 2020 18:11
lrh2000 added a commit to lrh2000/v2ray-core that referenced this pull request Jan 3, 2022
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.
lrh2000 added a commit to lrh2000/v2ray-core that referenced this pull request Jan 3, 2022
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.
xiaokangwang pushed a commit to lrh2000/v2ray-core that referenced this pull request Jun 25, 2022
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.
nekohasekai pushed a commit to SagerNet/v2ray-core that referenced this pull request Jun 27, 2022
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.
maskedeken pushed a commit to maskedeken/v2ray-core that referenced this pull request Mar 10, 2023
Fixes: a0eb84d

Feat: add bytes support to v5 configuration

Feat: add JSONC support to v5 configuration

Fix: build routing condition for geo domain

Fix: Support both dokodemo inbound config types

Fix: correct a type assertion of dokodemo simplified config

Fixes tproxy not working with jsonv5 config

Fix TestUserValidator

Refactor strmatcher.ACAutomatonMatcherGroup

proxy: Unify timeouts of different protocols for reading the first payload

proxy/http: Avoid getting stuck when using server-first protocols

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.
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.

2 participants