Feat: sniffer exclude domain & ip

This commit is contained in:
JimhHan 2021-03-26 16:56:43 +08:00
parent 14189eba07
commit 06fc82bad1
No known key found for this signature in database
GPG key ID: 48D5D7CF95157AC5
31 changed files with 653 additions and 411 deletions

View file

@ -3,6 +3,8 @@ package session // import "github.com/xtls/xray-core/common/session"
import (
"context"
"github.com/xtls/xray-core/common/matcher/domain"
"github.com/xtls/xray-core/common/matcher/geoip"
"math/rand"
"github.com/xtls/xray-core/common/errors"
@ -60,7 +62,8 @@ type Outbound struct {
// SniffingRequest controls the behavior of content sniffing.
type SniffingRequest struct {
ExcludeForDomain []string
ExcludedDomainMatcher *domain.DomainMatcher
ExcludedIPMatcher *geoip.MultiGeoIPMatcher
OverrideDestinationForProtocol []string
Enabled bool
MetadataOnly bool