Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/xray user management #972

Merged
merged 17 commits into from
Dec 10, 2024
Merged

feature/xray user management #972

merged 17 commits into from
Dec 10, 2024

Conversation

CyAn84
Copy link
Collaborator

@CyAn84 CyAn84 commented Aug 13, 2024

This PR adds XRay client id and user id and saves them in clients table

  • for append client:
  1. add id generation when creating a connection config
  2. add the user id to the server config
  3. restart xray on the server
  4. append client info to clients table
  • for revoke client
  1. remove the user id from the server config
  2. restart xray on the server
  3. remove client info from clients table

@CyAn84
Copy link
Collaborator Author

CyAn84 commented Aug 13, 2024

@Nethius "restart xray on the server" means restart xray service inside docker container or restart xray docker container itself?

@CyAn84 CyAn84 force-pushed the feature/xray-user-management branch from d113b45 to 3d7a46d Compare August 13, 2024 17:21
@IvanKhramov
Copy link

Hello.
What is the expected time frame for this fix to be accepted?
There is a huge lack of user experience for the xRay protocol.

@0eale0
Copy link

0eale0 commented Sep 21, 2024

@pokamest

@aiamnezia aiamnezia marked this pull request as ready for review October 26, 2024 04:01
@Nethius Nethius linked an issue Nov 7, 2024 that may be closed by this pull request
@utmaks
Copy link

utmaks commented Nov 7, 2024

I can help with early builds (mac os arm chips) to test this feature.

UPD

Tested latest build from artifacts:

  • Users list showing me only one "Client 0" without real name used when I created it
  • Connect to any VPN: AmneziaWG / Xray was unsuccessful (latest pre-release working normally)

PR requires re-installation VPN on the server?

@aiamnezia
Copy link
Collaborator

aiamnezia commented Nov 7, 2024

@utmaks "Client 0" appears to be the default client that was previously on the server. You can go ahead and delete it in this version. However, this indicates that a new client has not been added yet. The PR is not ready. We are still working on some issues. I will fix them soon.

@utmaks
Copy link

utmaks commented Nov 28, 2024

New manual tests for latest build, test cases:

  • I can view users after create a new one:
    • can view users for original xray format
    • can view users for amnezia xray format
  • I can revoke access both for original and xray format. It's revoke immediately but internet connection on client side goes to full down until pressing "Connect" button again

Thanks!

@aiamnezia
Copy link
Collaborator

New manual tests for latest build, test cases:

  • I can view users after create a new one:

    • can view users for original xray format
    • can view users for amnezia xray format
  • I can revoke access both for original and xray format. It's revoke immediately but internet connection on client side goes to full down until pressing "Connect" button again

Thanks!

Thank you for your feedback!
When you install Xray on the server and connect for the first time, a new user should appear in the client table for the client used during installation. Do you see this user? Did you revoke it?

@utmaks
Copy link

utmaks commented Nov 30, 2024

Do you see this user? Did you revoke it?

Installation on the server was done with stable client before experiments with this PR. So after I installed latest artifact I saw in the user list Client 0 username. I didn't try to revoke it. There were no other users on the list.

All experiments with user revoking was done with new clients created right there.

@Nethius Nethius changed the title add xray client id to the clients table feature/xray user management Dec 8, 2024
@Nethius Nethius merged commit d06924c into dev Dec 10, 2024
7 checks passed
aiamnezia added a commit that referenced this pull request Dec 10, 2024
* feature: implement client management functionality for Xray

---------

Co-authored-by: aiamnezia <[email protected]>
Co-authored-by: vladimir.kuznetsov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants