chore: 调整uid系统判断位置

This commit is contained in:
Skyxim
2022-05-29 18:12:43 +08:00
parent 067c02aba1
commit c7355510a2
4 changed files with 8 additions and 18 deletions

View File

@ -7,7 +7,6 @@ import (
C "github.com/Dreamacro/clash/constant"
P "github.com/Dreamacro/clash/constant/provider"
RC "github.com/Dreamacro/clash/rule/common"
"runtime"
"time"
)
@ -86,11 +85,7 @@ func parseRule(tp, payload, target string, params []string) (C.Rule, error) {
case "NETWORK":
parsed, parseErr = RC.NewNetworkType(payload, target)
case "UID":
if runtime.GOOS == "linux" || runtime.GOOS == "android" {
parsed, parseErr = RC.NewUid(payload, target)
} else {
parseErr = fmt.Errorf("uid rule not support this platform")
}
parsed, parseErr = RC.NewUid(payload, target)
case "IN-TYPE":
parsed, parseErr = RC.NewInType(payload, target)
default: