mirror of
https://github.com/wyx2685/V2bX.git
synced 2025-02-02 06:48:14 -05:00
尝试修复节点删除后仍可使用的BUG
This commit is contained in:
parent
c1f36bb2ae
commit
330f3b1449
@ -128,7 +128,7 @@ func (c *Client) GetNodeInfo() (node *NodeInfo, err error) {
|
|||||||
SetHeader("If-None-Match", c.nodeEtag).
|
SetHeader("If-None-Match", c.nodeEtag).
|
||||||
Get(path)
|
Get(path)
|
||||||
if err = c.checkResponse(r, path, err); err != nil {
|
if err = c.checkResponse(r, path, err); err != nil {
|
||||||
return
|
return nil, err
|
||||||
}
|
}
|
||||||
if r.StatusCode() == 304 {
|
if r.StatusCode() == 304 {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
@ -238,9 +238,7 @@ func (c *Client) GetNodeInfo() (node *NodeInfo, err error) {
|
|||||||
}
|
}
|
||||||
case "dns":
|
case "dns":
|
||||||
var domains []string
|
var domains []string
|
||||||
for _, v := range matchs {
|
domains = append(domains, matchs...)
|
||||||
domains = append(domains, v)
|
|
||||||
}
|
|
||||||
if matchs[0] != "main" {
|
if matchs[0] != "main" {
|
||||||
node.RawDNS.DNSMap[strconv.Itoa(i)] = map[string]interface{}{
|
node.RawDNS.DNSMap[strconv.Itoa(i)] = map[string]interface{}{
|
||||||
"address": cm.Routes[i].ActionValue,
|
"address": cm.Routes[i].ActionValue,
|
||||||
@ -249,7 +247,6 @@ func (c *Client) GetNodeInfo() (node *NodeInfo, err error) {
|
|||||||
} else {
|
} else {
|
||||||
dns := []byte(strings.Join(matchs[1:], ""))
|
dns := []byte(strings.Join(matchs[1:], ""))
|
||||||
node.RawDNS.DNSJson = dns
|
node.RawDNS.DNSJson = dns
|
||||||
break
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user