Client up/down events

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
mohdis
Posts: 5
Joined: Fri Jan 27, 2023 5:08 pm

Client up/down events

Post by mohdis » Fri Jan 27, 2023 5:12 pm

hi,
is there anyway to notify my web api when client connect/disconnect to server ? I'm using linux edition .

thanks

shakibamoshiri
Posts: 285
Joined: Wed Dec 28, 2022 9:10 pm

Re: Client up/down events

Post by shakibamoshiri » Fri Jan 27, 2023 5:54 pm

mohdis wrote:
Fri Jan 27, 2023 5:12 pm
hi,
is there anyway to notify my web api when client connect/disconnect to server ? I'm using linux edition .

thanks
No if you are looking for a kind of Web Hooks or built-in Hooks in SE sever.

Yes if you can go to the trouble of working for RPC-JSON API of SE server and implementing your own poll method.
In this regard you will EnumSession every one minute and will compare it with last minute user-list you have already saved.
Thus you can determine who has come to and who has gone.
I have done near 80% to 90% of this method just the diff part has remained to finish the script.
Last edited by shakibamoshiri on Fri Jan 27, 2023 7:05 pm, edited 1 time in total.

mohdis
Posts: 5
Joined: Fri Jan 27, 2023 5:08 pm

Re: Client up/down events

Post by mohdis » Fri Jan 27, 2023 6:50 pm

Ok, how to read connected users ?

shakibamoshiri
Posts: 285
Joined: Wed Dec 28, 2022 9:10 pm

Re: Client up/down events

Post by shakibamoshiri » Fri Jan 27, 2023 7:02 pm

mohdis wrote:
Fri Jan 27, 2023 6:50 pm
Ok, how to read connected users ?
fixed: EnumSession not EnumUser

"EnumSession" RPC API - Get List of Connected VPN Sessions
https://github.com/SoftEtherVPN/SoftEth ... n-sessions

mohdis
Posts: 5
Joined: Fri Jan 27, 2023 5:08 pm

Re: Client up/down events

Post by mohdis » Fri Jan 27, 2023 7:12 pm

Thank you very much.

Post Reply