mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 01:08:33 +00:00
XHTTP client: Refactor "packet-up" mode, chasing "stream-up" (#4150)
* Add wroteRequest (waiting for new quic-go) * Use XTLS/quic-go instead * Client doesn't need `scMaxConcurrentPosts` anymore * GotConn is available in H3 * `scMaxConcurrentPosts` -> `scMaxBufferedPosts` (server only, 30 by default) Fixes https://github.com/XTLS/Xray-core/issues/4100
This commit is contained in:
parent
6be3c35db8
commit
8cd9a74376
10 changed files with 235 additions and 250 deletions
|
@ -47,7 +47,7 @@ func (c *Config) GetNormalizedQuery() string {
|
|||
|
||||
func (c *Config) GetRequestHeader() http.Header {
|
||||
header := http.Header{}
|
||||
for k, v := range c.Header {
|
||||
for k, v := range c.Headers {
|
||||
header.Add(k, v)
|
||||
}
|
||||
|
||||
|
@ -64,15 +64,12 @@ func (c *Config) WriteResponseHeader(writer http.ResponseWriter) {
|
|||
}
|
||||
}
|
||||
|
||||
func (c *Config) GetNormalizedScMaxConcurrentPosts() RandRangeConfig {
|
||||
if c.ScMaxConcurrentPosts == nil || c.ScMaxConcurrentPosts.To == 0 {
|
||||
return RandRangeConfig{
|
||||
From: 100,
|
||||
To: 100,
|
||||
}
|
||||
func (c *Config) GetNormalizedScMaxBufferedPosts() int {
|
||||
if c.ScMaxBufferedPosts == 0 {
|
||||
return 30
|
||||
}
|
||||
|
||||
return *c.ScMaxConcurrentPosts
|
||||
return int(c.ScMaxBufferedPosts)
|
||||
}
|
||||
|
||||
func (c *Config) GetNormalizedScMaxEachPostBytes() RandRangeConfig {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue