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

This commit is contained in:
lrh2000
2022-06-25 19:34:32 +01:00
committed by Shelikhoo
parent 17d85263e2
commit 396ee770b7
6 changed files with 16 additions and 13 deletions
+4
View File
@@ -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().