-
-
Notifications
You must be signed in to change notification settings - Fork 15
Description
part of #288. depends on VpnConfig trait + build_openvpn_connection().
changes
core/vpn.rs currently hardcodes wireguard type checks everywhere. refactor each function:
connect_vpn: accept impl VpnConfig, match on vpn_type() to dispatch to build_wireguard_connection vs build_openvpn_connection.
disconnect_vpn: currently checks connection.type == "wireguard". also accept connection.type == "vpn" with vpn.service-type == "...openvpn".
list_vpn_connections: expand filter to detect openvpn connections (connection.type == "vpn" + check vpn.service-type). set vpn_type on returned VpnConnection accordingly.
get_vpn_info: same type-detection. for openvpn gateway, read from vpn.data["remote"] instead of parsing wireguard peers. ip config extraction stays the same.
forget_vpn: same filter expansion as disconnect.