feat: not inline proxy-provider can also set payload as fallback proxies when file/http parsing fails

This commit is contained in:
wwqgtxx
2025-04-30 16:03:02 +08:00
parent 5c40a6340c
commit f328203bc1
3 changed files with 18 additions and 3 deletions

View File

@@ -63,5 +63,7 @@ func ParseRuleProvider(name string, mapping map[string]any, parse common.ParseRu
return nil, fmt.Errorf("unsupported vehicle type: %s", schema.Type)
}
return NewRuleSetProvider(name, behavior, format, time.Duration(uint(schema.Interval))*time.Second, vehicle, schema.Payload, parse), nil
interval := time.Duration(uint(schema.Interval)) * time.Second
return NewRuleSetProvider(name, behavior, format, interval, vehicle, schema.Payload, parse), nil
}