mirror of
https://github.com/v2fly/v2ray-core
synced 2024-02-27 03:18:06 +00:00
proxy: Unify timeouts of different protocols for reading the first payload
This commit is contained in:
@@ -7,6 +7,7 @@ package proxy
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/v2fly/v2ray-core/v5/common/net"
|
||||
"github.com/v2fly/v2ray-core/v5/common/protocol"
|
||||
@@ -15,6 +16,9 @@ import (
|
||||
"github.com/v2fly/v2ray-core/v5/transport/internet"
|
||||
)
|
||||
|
||||
// A timeout for reading the first payload from the client, used in 0-RTT optimizations.
|
||||
const FirstPayloadTimeout = 100 * time.Millisecond
|
||||
|
||||
// An Inbound processes inbound connections.
|
||||
type Inbound interface {
|
||||
// Network returns a list of networks that this inbound supports. Connections with not-supported networks will not be passed into Process().
|
||||
|
||||
Reference in New Issue
Block a user