micahmo / WgServerforWindows

Wg Server for Windows (WS4W) is a desktop application that allows running and managing a WireGuard server endpoint on Windows
MIT License
822 stars 79 forks source link

Request to Add User-Specific Data Limit Feature #114

Open parsman opened 1 year ago

parsman commented 1 year ago

Hello @micahmo , as some servers have traffic limitations, it is necessary to set a specific data limit for each user. In case their usage exceeds this limit, they should be disabled. I kindly request that you add this feature. For instance, a user named 'Alex' should only be allowed to have a maximum of 300 gigabytes of upload/download. Please kindly consider adding this feature to the system if possible, as it is very important for me. Thank you

micahmo commented 1 year ago

Hi @parsman, thanks for the suggestion! The goal of WS4W is to be a stateless wrapper around WireGuard and Windows functions. As such it doesn't have any kind of server that could perform monitoring and automatic shutoff. If you wanted a feature like you're suggesting, it would have to be available in WireGuard itself or Windows. It doesn't appear to be possible in the former, and I couldn't find any way to do it with the Windows NAT network feature (it is unfortunately far more limited than Linux's iptables).

If you can find a built-in feature that WS4W could invoke, I'd be happy to add that function!