vpn_connect
Connect to a WireGuard or OpenVPN VPN by providing a config file path. Automatically detects VPN type and returns the assigned IP address.
Instructions
Connect to a VPN (WireGuard or OpenVPN) with a single call.
Places the config, brings the tunnel up, and returns the assigned IP address. Auto-detects VPN type from the config file contents unless explicitly specified.
Args: config_path: Absolute path to the VPN config file inside the container (e.g. /vpn/wg0.conf or /vpn/client.ovpn). Mount your config directory as a Docker volume to /vpn. vpn_type: 'wireguard', 'openvpn', or 'auto' (default). Auto reads [Interface]/[Peer] for WireGuard, or client/remote directives for OpenVPN. interface: WireGuard interface name (default wg0). Ignored for OpenVPN connections.
Returns: Connection result including success flag, assigned IP, interface name, and VPN type.
Example: vpn_connect(config_path='/vpn/wg0.conf') vpn_connect(config_path='/vpn/client.ovpn', vpn_type='openvpn')
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vpn_type | No | auto | |
| interface | No | wg0 | |
| config_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |