0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-18 22:29:49 +03:00

Feat: sniffer exclude domain & ip

This commit is contained in:
JimhHan
2021-03-26 16:56:43 +08:00
parent 14189eba07
commit 06fc82bad1
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