Page 1 of 1

Enlisting users and IP addresses in external program

Posted: Thu Apr 30, 2015 12:04 pm
by adalal
Hi,

I was wondering if there is a way (or an API) to get a list of the currently logged in users and their connected IP addresses.

This is because I would like to dynamically assign push routes for them (users will only be allowed to log in once at a time).

Thanks.

Re: Enlisting users and IP addresses in external program

Posted: Thu May 14, 2015 6:56 am
by thisjun

Re: Enlisting users and IP addresses in external program

Posted: Thu May 14, 2015 12:21 pm
by adalal
Thanks for that!
I can't understand how I'd get an external program (such as a nodejs script) be able to access vpncmd, as it seems interactive.

Are there any parameters to automate the login?

Thanks,

Re: Enlisting users and IP addresses in external program

Posted: Thu May 28, 2015 6:19 am
by thisjun

Re: Enlisting users and IP addresses in external program

Posted: Sat May 30, 2015 4:19 pm
by Petrol
You can automate the login, give vpncmd an input file that contains the commands you want to execute. vpncmd can also write the output to a file allowing an external program to process the data.