mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-07-29 10:11:52 +03:00
Update sing-box core, refactor MASQUE, update XHTTP
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package rule
|
||||
|
||||
import (
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/sagernet/sing-box/adapter"
|
||||
@@ -16,15 +17,11 @@ type DomainItem struct {
|
||||
}
|
||||
|
||||
func NewDomainItem(domains []string, domainSuffixes []string) (*DomainItem, error) {
|
||||
for _, domainItem := range domains {
|
||||
if domainItem == "" {
|
||||
return nil, E.New("domain: empty item is not allowed")
|
||||
}
|
||||
if slices.Contains(domains, "") {
|
||||
return nil, E.New("domain: empty item is not allowed")
|
||||
}
|
||||
for _, domainSuffixItem := range domainSuffixes {
|
||||
if domainSuffixItem == "" {
|
||||
return nil, E.New("domain_suffix: empty item is not allowed")
|
||||
}
|
||||
if slices.Contains(domainSuffixes, "") {
|
||||
return nil, E.New("domain_suffix: empty item is not allowed")
|
||||
}
|
||||
var description string
|
||||
if dLen := len(domains); dLen > 0 {
|
||||
|
||||
Reference in New Issue
Block a user