Modify the way v2raysocks obtains methods and audits (#616)

Co-authored-by: thank243 <thank243@gmail.com>
This commit is contained in:
thh1451 2024-03-19 00:01:19 +08:00 committed by GitHub
parent 0010a876f3
commit b3f31bf06b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -292,11 +292,7 @@ func (c *APIClient) ReportUserTraffic(userTraffic *[]api.UserTraffic) error {
// GetNodeRule implements the API interface // GetNodeRule implements the API interface
func (c *APIClient) GetNodeRule() (*[]api.DetectRule, error) { func (c *APIClient) GetNodeRule() (*[]api.DetectRule, error) {
ruleList := c.LocalRuleList ruleList := c.LocalRuleList
if c.NodeType != "V2ray" {
return &ruleList, nil
}
// Only support the rule for v2ray
// fix: reuse config response // fix: reuse config response
c.access.Lock() c.access.Lock()
defer c.access.Unlock() defer c.access.Unlock()