-
Notifications
You must be signed in to change notification settings - Fork 3.6k
feat: add splithttp transport support #2390
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
base: Alpha
Are you sure you want to change the base?
Conversation
wwqgtxx
left a comment
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.
As we mentioned in #2383, if the PR could include a server-side implementation (i.e., the code for listener and listener\inbound_test), it might prompt us to merge the code as soon as possible.
| tlsConfig.NextProtos = []string{"h2", "http/1.1"} | ||
| } | ||
|
|
||
| // Handle ECH and Reality if needed (skipped for now or requires more adaptation) |
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.
Actually, you can pass mihomoVMess.TLSConfig just like the transport layers in h2, which would simplify the handling of reality and ech.
| } | ||
|
|
||
| var ( | ||
| globalDialerMap map[dialerConf]*XmuxManager |
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.
Do we really need a package-level globalDialerMap instead of a *Client object that directly stores these values when creating *Vless and *Vmess?
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.
Do we really need a package-level
globalDialerMapinstead of a*Clientobject that directly stores these values when creating*Vlessand*Vmess?
obviously (ai) copied from *ray because they have no struct for a transport to hold cross-session information(
|
|
||
| c, err = vmess.StreamH2Conn(ctx, c, h2Opts) | ||
| case "splithttp", "xhttp": | ||
| c.Close() |
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.
Why not implement this in DialContext or DialContextWithDialer (like the gRPC transport layer)? Creating a new conn and then immediately closing it would result in confusing traffic patterns.
53b7462 to
edbfebe
Compare
No description provided.