Fix process rule check

This commit is contained in:
世界 2024-12-20 19:35:37 +08:00
parent 2babf07f9a
commit 3c00099ed4
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4

View File

@ -71,15 +71,15 @@ func isGeositeDNSRule(rule option.DefaultDNSRule) bool {
} }
func isProcessRule(rule option.DefaultRule) bool { func isProcessRule(rule option.DefaultRule) bool {
return len(rule.ProcessName) > 0 || len(rule.ProcessPath) > 0 || len(rule.PackageName) > 0 || len(rule.User) > 0 || len(rule.UserID) > 0 return len(rule.ProcessName) > 0 || len(rule.ProcessPath) > 0 || len(rule.ProcessPathRegex) > 0 || len(rule.PackageName) > 0 || len(rule.User) > 0 || len(rule.UserID) > 0
} }
func isProcessDNSRule(rule option.DefaultDNSRule) bool { func isProcessDNSRule(rule option.DefaultDNSRule) bool {
return len(rule.ProcessName) > 0 || len(rule.ProcessPath) > 0 || len(rule.PackageName) > 0 || len(rule.User) > 0 || len(rule.UserID) > 0 return len(rule.ProcessName) > 0 || len(rule.ProcessPath) > 0 || len(rule.ProcessPathRegex) > 0 || len(rule.PackageName) > 0 || len(rule.User) > 0 || len(rule.UserID) > 0
} }
func isProcessHeadlessRule(rule option.DefaultHeadlessRule) bool { func isProcessHeadlessRule(rule option.DefaultHeadlessRule) bool {
return len(rule.ProcessName) > 0 || len(rule.ProcessPath) > 0 || len(rule.PackageName) > 0 return len(rule.ProcessName) > 0 || len(rule.ProcessPath) > 0 || len(rule.ProcessPathRegex) > 0 || len(rule.PackageName) > 0
} }
func notPrivateNode(code string) bool { func notPrivateNode(code string) bool {