Add sniff timeoit

This commit is contained in:
风扇滑翔翼 2025-02-21 10:44:33 +00:00 committed by GitHub
parent be43f66b63
commit 95c2113250
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 117 additions and 83 deletions

View file

@ -5,6 +5,7 @@ import (
"context"
"math/rand"
"sync"
"time"
c "github.com/xtls/xray-core/common/ctx"
"github.com/xtls/xray-core/common/errors"
@ -80,6 +81,7 @@ type SniffingRequest struct {
Enabled bool
MetadataOnly bool
RouteOnly bool
Timeout time.Duration
}
// Content is the metadata of the connection content.