Feature: support PROCESS-NAME on macOS

This commit is contained in:
Dreamacro
2020-07-19 13:17:05 +08:00
parent cf9e1545a4
commit ae1e1dc9f6
6 changed files with 194 additions and 2 deletions

View File

@ -382,6 +382,10 @@ func parseRules(cfg *RawConfig, proxies map[string]C.Proxy) ([]C.Rule, error) {
parsed, parseErr := R.ParseRule(rule[0], payload, target, params)
if parseErr != nil {
if parseErr == R.ErrPlatformNotSupport {
log.Warnln("Rules[%d] [%s] don't support current OS, skip", idx, line)
continue
}
return nil, fmt.Errorf("Rules[%d] [%s] error: %s", idx, line, parseErr.Error())
}