mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-25 18:11:27 +00:00
allow empty route type
default field
This commit is contained in:
parent
f51bf98714
commit
9becf02316
|
@ -636,7 +636,7 @@ func ParseRule(msg json.RawMessage) (*router.RoutingRule, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, newError("invalid router rule").Base(err)
|
return nil, newError("invalid router rule").Base(err)
|
||||||
}
|
}
|
||||||
if strings.EqualFold(rawRule.Type, "field") {
|
if rawRule.Type == "" || strings.EqualFold(rawRule.Type, "field") {
|
||||||
fieldrule, err := parseFieldRule(msg)
|
fieldrule, err := parseFieldRule(msg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, newError("invalid field rule").Base(err)
|
return nil, newError("invalid field rule").Base(err)
|
||||||
|
|
Loading…
Reference in a new issue