mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-23 19:03:11 +03:00
Add resolver for outbound dialer
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
package domain
|
||||
package domain_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/sagernet/sing-box/common/domain"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestMatch(t *testing.T) {
|
||||
r := require.New(t)
|
||||
matcher := NewMatcher([]string{"domain.com"}, []string{"suffix.com", ".suffix.org"})
|
||||
matcher := domain.NewMatcher([]string{"domain.com"}, []string{"suffix.com", ".suffix.org"})
|
||||
r.True(matcher.Match("domain.com"))
|
||||
r.False(matcher.Match("my.domain.com"))
|
||||
r.True(matcher.Match("suffix.com"))
|
||||
|
||||
Reference in New Issue
Block a user