WgServerforWindows icon indicating copy to clipboard operation
WgServerforWindows copied to clipboard

Add a button to temporarily disable the account

Open parsman opened this issue 3 years ago • 3 comments

Hi dear First of all, thank you for sharing this source Is it possible to add a button to deactivate the account ? And the part that displays the date of the user's first connection

parsman avatar Oct 13 '22 14:10 parsman

Hi @parsman, thanks for the suggestions. I hope I have interpreted them correctly.

I am assuming that "deactivate the account" means disabling the client such that the server stops accepting connections from it. I have added that functionality to the latest version (2.0.8).

I am assuming that "the part that displays the date of the user's first connection" is referring to the status line that starts with latest handshake. That would be the most recent connection, not the first, so maybe you're referring to something else. Either way, the latest version (2.0.8) now displays that information in the client configuration page.

Let me know what you think.

micahmo avatar Feb 14 '23 14:02 micahmo

Hi dear @micahmo Thanks for your consideration I meant in the second suggestion , adding an option to know the start time or the first handshake of client, Or an option to set duration for a client to be auto disconnected after a given date or numbers of days.

parsman avatar Feb 20 '23 16:02 parsman

adding an option to know the start time or the first handshake of client

Do you mean the first handshake ever (since the creation of the server), or just the starting time of the current session? If it's the former, I don't think that information is available from WireGuard. If the latter, that has been added in the latest version.

an option to set duration for a client to be auto disconnected after a given date or numbers of days

Unfortunately this is not possible through WireGuard. There is not really a notion of a "connection", just routing of packets on demand. Therefore, there's no session to terminate. The best you could do is remove the client's config from the server (or make some other change such that subsequent connections are impossible). Since I intend WS4W to be a lightweight wrapper around WireGuard (and not something that has to be running all the time), I don't think this app is the right place for a service that periodically checks and disables clients. I'm not really intending on adding any functionality that wouldn't come standard with WireGuard on Linux.

Here's a Reddit post that explains more.

micahmo avatar Feb 20 '23 18:02 micahmo

Hey @parsman, if you are satisfied with the answer here, can I close this issue?

micahmo avatar Jan 19 '25 03:01 micahmo