Right before a VPN client is connected, the Node.js script bandwidth/index.js runs to ask the Helper Server whether or not to throttle that client, and if so, throttles the client using tc. Throttling occurs when a user does not have an active subscription, or uses excessive bandwidth.
This script is deployed to every VPN server. It is triggered by the Updown StrongSwan plugin, which allows a custom script to run every time a connection is established or disconnected.
-
VPN Client Connects
Updowntriggersbandwidth/index.jsand passes inclient_idenvironment variable. -
bandwidth/index.jsdoes a GET on the private network to Helper to check for throttling
http://helper.[environment]-private/bandwidth-restriction?client_id=[clientId]
- Response from Helper
{
ratelimitkbps: 10000
}
-
If
ratelimitkbpsis undefined or null, don't throttle. Otherwise, usetcto throttle theclient_id. -
VPN Client Disconnects
Updowntriggersbandwidth/index.js, which removes any throttle of theclient_id.
If you have any questions, concerns, or other feedback, please let us know any feedback in Github issues or by e-mail.
We also have a bug bounty program -- please email engineering@confirmedvpn.com for details.
This project is licensed under the GPL License - see the LICENSE.md file for details