mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 04:30:08 +00:00
fix rule not work
This commit is contained in:
@@ -77,7 +77,7 @@ type SSConfig struct {
|
|||||||
type V2rayConfig struct {
|
type V2rayConfig struct {
|
||||||
Inbounds []conf.InboundDetourConfig `json:"inbounds"`
|
Inbounds []conf.InboundDetourConfig `json:"inbounds"`
|
||||||
Routing *struct {
|
Routing *struct {
|
||||||
Rules *json.RawMessage `json:"rules"`
|
Rules []json.RawMessage `json:"rules"`
|
||||||
} `json:"routing"`
|
} `json:"routing"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -222,7 +222,11 @@ func (c *Client) ParseV2rayNodeResponse(body []byte, notParseNode, parseRule boo
|
|||||||
return nil, fmt.Errorf("unmarshal nodeinfo error: %s", err)
|
return nil, fmt.Errorf("unmarshal nodeinfo error: %s", err)
|
||||||
}
|
}
|
||||||
if parseRule {
|
if parseRule {
|
||||||
json.Unmarshal(*node.V2ray.Routing.Rules, c.RemoteRuleCache)
|
c.RemoteRuleCache = &Rule{}
|
||||||
|
err := json.Unmarshal(node.V2ray.Routing.Rules[1], c.RemoteRuleCache)
|
||||||
|
if err != nil {
|
||||||
|
log.Println(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
node.V2ray.Routing = nil
|
node.V2ray.Routing = nil
|
||||||
if notParseNode {
|
if notParseNode {
|
||||||
|
|||||||
Reference in New Issue
Block a user