You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
v2ray-core/app/router/chinasites_json.go

22 lines
396 B

// +build json
package router
import (
"encoding/json"
"v2ray.com/core/common/log"
)
func parseChinaSitesRule(data []byte) (*RoutingRule, error) {
rawRule := new(JsonRule)
err := json.Unmarshal(data, rawRule)
if err != nil {
log.Error("Router: Invalid router rule: ", err)
return nil, err
}
return &RoutingRule{
Tag: rawRule.OutboundTag,
Domain: chinaSitesDomains,
}, nil
}