rename vtun to tungo
This commit is contained in:
@@ -39,6 +39,8 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
DefaultReadTimeout = 30 * time.Second
|
||||
|
||||
// DefaultBodySize is the default HTTP body or websocket frame size to record.
|
||||
DefaultBodySize = 64 * 1024 // 64KB
|
||||
// MaxBodySize is the maximum HTTP body or websocket frame size to record.
|
||||
@@ -115,6 +117,10 @@ func (h *Sniffer) HandleHTTP(ctx context.Context, conn net.Conn, opts ...HandleO
|
||||
opt(&ho)
|
||||
}
|
||||
|
||||
if h.ReadTimeout <= 0 {
|
||||
h.ReadTimeout = DefaultReadTimeout
|
||||
}
|
||||
|
||||
pStats := xstats.Stats{}
|
||||
conn = stats_wrapper.WrapConn(conn, &pStats)
|
||||
|
||||
@@ -570,6 +576,10 @@ func (h *Sniffer) HandleTLS(ctx context.Context, conn net.Conn, opts ...HandleOp
|
||||
opt(&ho)
|
||||
}
|
||||
|
||||
if h.ReadTimeout <= 0 {
|
||||
h.ReadTimeout = DefaultReadTimeout
|
||||
}
|
||||
|
||||
buf := new(bytes.Buffer)
|
||||
clientHello, err := dissector.ParseClientHello(io.TeeReader(conn, buf))
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user