[Fixed] rule-set of classical allow adding GEOIP

This commit is contained in:
gVisor bot 2022-03-14 21:47:21 +08:00
parent 1945664bf5
commit 337316ba53

View file

@ -82,6 +82,9 @@ func parseRule(tp, payload, target string, params []string) (C.Rule, error) {
parsed, parseErr = RC.NewPort(payload, target, false, ruleExtra) parsed, parseErr = RC.NewPort(payload, target, false, ruleExtra)
case "PROCESS-NAME": case "PROCESS-NAME":
parsed, parseErr = RC.NewProcess(payload, target, ruleExtra) parsed, parseErr = RC.NewProcess(payload, target, ruleExtra)
case "GEOIP":
noResolve := RC.HasNoResolve(params)
parsed, parseErr = RC.NewGEOIP(payload, target, noResolve, ruleExtra)
default: default:
parseErr = fmt.Errorf("unsupported rule type %s", tp) parseErr = fmt.Errorf("unsupported rule type %s", tp)
} }