From 0010a876f393d3dd2aa9f13f914dd20fb7ee65f2 Mon Sep 17 00:00:00 2001 From: thank243 Date: Mon, 18 Mar 2024 23:50:18 +0800 Subject: [PATCH] Remove unnecessary user retrieval in v2raysocks (#617) The updated code eliminates a redundant user retrieval operation in the v2raysocks module. This operation was not needed because the desired information (method) can be inferred elsewhere in the application. This change simplifies the code, improves efficiency, and may reduce potential errors related to user data retrieval. --- api/v2raysocks/v2raysocks.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/api/v2raysocks/v2raysocks.go b/api/v2raysocks/v2raysocks.go index a2a5ca0..39dc35d 100644 --- a/api/v2raysocks/v2raysocks.go +++ b/api/v2raysocks/v2raysocks.go @@ -398,14 +398,6 @@ func (c *APIClient) ParseSSNodeResponse(nodeInfoResponse *simplejson.Json) (*api // Shadowsocks 2022 if C.Contains(shadowaead_2022.List, method) { serverPsk = inboundInfo.Get("settings").Get("password").MustString() - } else { - userInfo, err := c.GetUserList() - if err != nil { - return nil, err - } - if len(*userInfo) > 0 { - method = (*userInfo)[0].Method - } } // Create GeneralNodeInfo