1
0
Fork 0
mirror of https://github.com/SagerNet/sing-box.git synced 2025-04-06 13:27:37 +03:00

Add rule-set match command

This commit is contained in:
世界 2024-03-24 19:23:11 +08:00
parent 8a9a77a438
commit d612620c5d
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
3 changed files with 97 additions and 7 deletions

View file

@ -129,14 +129,18 @@ func NewDefaultHeadlessRule(router adapter.Router, options option.DefaultHeadles
rule.allItems = append(rule.allItems, item)
}
if len(options.WIFISSID) > 0 {
item := NewWIFISSIDItem(router, options.WIFISSID)
rule.items = append(rule.items, item)
rule.allItems = append(rule.allItems, item)
if router != nil {
item := NewWIFISSIDItem(router, options.WIFISSID)
rule.items = append(rule.items, item)
rule.allItems = append(rule.allItems, item)
}
}
if len(options.WIFIBSSID) > 0 {
item := NewWIFIBSSIDItem(router, options.WIFIBSSID)
rule.items = append(rule.items, item)
rule.allItems = append(rule.allItems, item)
if router != nil {
item := NewWIFIBSSIDItem(router, options.WIFIBSSID)
rule.items = append(rule.items, item)
rule.allItems = append(rule.allItems, item)
}
}
return rule, nil
}