vpn_disconnect
Disconnect from a VPN tunnel. Supports WireGuard and OpenVPN, with automatic detection of connection type.
Instructions
Disconnect from a VPN tunnel.
Brings down the specified interface (WireGuard) or kills the OpenVPN daemon process.
Args: interface: Interface to disconnect (default wg0). vpn_type: 'wireguard', 'openvpn', or 'auto'. Auto checks whether the interface is a WireGuard tunnel.
Returns: Disconnection result with success flag.
Example: vpn_disconnect() vpn_disconnect(interface='wg1') vpn_disconnect(vpn_type='openvpn')
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vpn_type | No | auto | |
| interface | No | wg0 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |