Skip to content

Commit

Permalink
Remove unnecessary user retrieval in v2raysocks (XrayR-project#617)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Septrum101 authored Mar 18, 2024
1 parent dbed635 commit 0010a87
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions api/v2raysocks/v2raysocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0010a87

Please sign in to comment.