Turn off VPN
Closed this issue · 1 comments
scotthaleen commented
Now that ovpn doesn't start with the container. We should also have a stop vpn endpoint to optionally shutdown the vpn when something is finished using it
scotthaleen commented
Similar to
https://github.com/jataware/vpnrotate/blob/master/vpnrotate/src/vpnrotate/svchandler.py#L92
async def restartVPN():
async with OVPN_LOCK:
process = await asyncio.create_subprocess_exec("sv", "restart", "ovpn")
rc = await process.wait()
return rc == 0, rc
except sv stop ovpn
And then add the route + swagger to expose it