Disconnect VPN after X sec/min if no connection established?

Can you set this up for Wireguard or Open vpn? What happens is we have clients connecting to our server but sometimes we want to turn off the server vpn but whats happening is the client wireguard connection still stays active even though the tunnel is offline. Is there a setting you can enable to disconnect the client VPN if it hasn’t been connected for awhile?

You cannot do it because most of the time people do want their data leaked when using vpn. So there is kill switch.

If you want to do this you need to write script by yourself.

Used mv1000w,set this up for Wireguard or Openvpn is very quickly,but the Internet is different,so I install ssr-plus to instead of.