Conversation
Contributor
Greptile SummaryThis release adds bulk user management endpoints ( Key changes:
Critical Issue Found: Confidence Score: 2/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant Controller as HandlerController
participant Service as HandlerService
participant Internal as InternalService
participant XTLS as XtlsApi
rect rgb(240, 248, 255)
note right of Client: Bulk Add Users Flow
Client->>Controller: POST /handler/add-users
Controller->>Service: addUsers(data)
loop For each affectedInboundTag
Service->>Internal: addXtlsConfigInbound(tag)
end
loop For each user
loop For each existing inbound
Service->>XTLS: removeUser(tag, userId)
Service->>Internal: removeUserFromInbound(tag, hashUuid)
end
loop For each inboundData item
alt trojan type
Service->>XTLS: addTrojanUser(...)
XTLS-->>Service: response
Service->>Internal: addUserToInbound(tag, vlessUuid)
else vless type
Service->>XTLS: addVlessUser(...)
XTLS-->>Service: response
Service->>Internal: addUserToInbound(tag, vlessUuid)
else shadowsocks type
Service->>XTLS: addShadowsocksUser(...)
XTLS-->>Service: response
Service->>Internal: addUserToInbound(tag, vlessUuid)
end
end
end
Service-->>Controller: AddUserResponseModel
Controller-->>Client: response
end
rect rgb(255, 248, 240)
note right of Client: Bulk Remove Users Flow
Client->>Controller: POST /handler/remove-users
Controller->>Service: removeUsers(data)
Service->>Internal: getXtlsConfigInbounds()
Internal-->>Service: inboundTags
loop For each user
loop For each inbound tag
Service->>XTLS: removeUser(tag, userId)
XTLS-->>Service: response
Service->>Internal: removeUserFromInbound(tag, hashUuid)
end
end
Service-->>Controller: RemoveUserResponseModel
Controller-->>Client: response
end
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.