mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-27 11:01:27 +00:00
Fix: tests
This commit is contained in:
parent
06fc82bad1
commit
fc8b580017
|
@ -53,6 +53,10 @@ type SniffingMatcher struct {
|
||||||
func NewSniffingMatcher(sc *SniffingConfig) (*SniffingMatcher, error) {
|
func NewSniffingMatcher(sc *SniffingConfig) (*SniffingMatcher, error) {
|
||||||
m := new(SniffingMatcher)
|
m := new(SniffingMatcher)
|
||||||
|
|
||||||
|
if sc == nil {
|
||||||
|
return m, nil
|
||||||
|
}
|
||||||
|
|
||||||
if sc.DomainsExcluded != nil {
|
if sc.DomainsExcluded != nil {
|
||||||
exDomain, err := domain.NewDomainMatcher(sc.DomainsExcluded)
|
exDomain, err := domain.NewDomainMatcher(sc.DomainsExcluded)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -359,7 +359,7 @@ func TestChinaSites(t *testing.T) {
|
||||||
domains, err := loadGeoSite("CN")
|
domains, err := loadGeoSite("CN")
|
||||||
common.Must(err)
|
common.Must(err)
|
||||||
|
|
||||||
matcher, err := NewDomainMatcher(domains)
|
matcher, err := domain.NewDomainMatcher(domains)
|
||||||
common.Must(err)
|
common.Must(err)
|
||||||
|
|
||||||
type TestCase struct {
|
type TestCase struct {
|
||||||
|
|
Loading…
Reference in a new issue