mirror of
https://github.com/XrayR-project/XrayR.git
synced 2025-06-08 05:19:54 +00:00
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.
This commit is contained in:
parent
dbed635aae
commit
0010a876f3
@ -398,14 +398,6 @@ func (c *APIClient) ParseSSNodeResponse(nodeInfoResponse *simplejson.Json) (*api
|
|||||||
// Shadowsocks 2022
|
// Shadowsocks 2022
|
||||||
if C.Contains(shadowaead_2022.List, method) {
|
if C.Contains(shadowaead_2022.List, method) {
|
||||||
serverPsk = inboundInfo.Get("settings").Get("password").MustString()
|
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
|
// Create GeneralNodeInfo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user