com.pax.dal

Interface IPaxVpn

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      int connectPPTP(java.lang.String ip, java.lang.String userName, java.lang.String password, boolean mppe)
      连接PPTP类型的VPN。
      Connect to the PPTP type VPN.
      int connectVpn(java.lang.String ip, java.lang.String userName, java.lang.String password, int type)
      连接VPN。
      Connect to the VPN.
      int disconnectVpn()
      断开VPN的连接。
      Disconnect the VPN.
      int getVpnStatus()
      获取当前VPN连接的状态。
      Gets the status of the current VPN connection.
    • Method Detail

      • connectPPTP

        int connectPPTP(java.lang.String ip,
                        java.lang.String userName,
                        java.lang.String password,
                        boolean mppe)
        连接PPTP类型的VPN。
        Connect to the PPTP type VPN.
        Parameters:
        ip -
        服务器IP地址。
        Server IP address.
        userName -
        用户名。
        User name.
        password -
        密码。
        Password.
        mppe -
        是否使用mppe加密。
        Whether to use mppe encryption.
        Returns:
        执行结果。
        • -1:连接错误。
        • 0:执行成功。(使用 #getVpnStatus()来获取VPN连接状态。)
        result of execution.
        • -1:Connect error.
        • 0:Execution successful.(Use #getVpnStatus() to get the VPN connection status.)
        Since:
        V3.20.00
      • connectVpn

        int connectVpn(java.lang.String ip,
                       java.lang.String userName,
                       java.lang.String password,
                       int type)
        连接VPN。
        Connect to the VPN.
        Parameters:
        ip -
        服务器IP地址。
        Server IP address.
        userName -
        用户名。
        User name.
        password -
        密码。
        Password.
        type -
        连接类型。
        • 0:TYPE_PPTP.
        • 1:TYPE_L2TP_IPSEC_PSK.
        • 2:TYPE_L2TP_IPSEC_RSA.
        • 3:TYPE_IPSEC_XAUTH_PSK.
        • 4:TYPE_IPSEC_XAUTH_RSA.
        • 5:TYPE_IPSEC_HYBRID_RSA.
        Connection type.
        • 0:TYPE_PPTP.
        • 1:TYPE_L2TP_IPSEC_PSK.
        • 2:TYPE_L2TP_IPSEC_RSA.
        • 3:TYPE_IPSEC_XAUTH_PSK.
        • 4:TYPE_IPSEC_XAUTH_RSA.
        • 5:TYPE_IPSEC_HYBRID_RSA.
        Returns:
        执行结果。
        • -1:连接错误。
        • 0:执行成功。(使用 #getVpnStatus()来获取VPN连接状态。)
        result of execution.
        • -1:Connect error.
        • 0:Execution successful.(Use #getVpnStatus() to get the VPN connection status.)
        Since:
        V3.20.00
      • getVpnStatus

        int getVpnStatus()
        获取当前VPN连接的状态。
        Gets the status of the current VPN connection.
        Returns:
        VPN连接的状态。
        • -1:获取状态出错。
        • 0:已断开。
        • 1:正在初始化。
        • 2:连接中。
        • 3:已连接。
        • 4:执行超时。
        • 5:执行失败。
        Status of the VPN connection.
        • -1:Error obtaining state.
        • 0:Disconnected.
        • 1:Initializing.
        • 2:Connecting.
        • 3:Connected.
        • 4:Timeouts.
        • 5:Exec failure.
        Since:
        V3.20.00
      • disconnectVpn

        int disconnectVpn()
        断开VPN的连接。
        Disconnect the VPN.
        Returns:
        执行结果。
        • -1:断开错误。
        • 0:执行成功。(使用 #getVpnStatus()来获取VPN连接状态。)
        result of execution.
        • -1:Disconnect error.
        • 0:Execution successful.(Use #getVpnStatus() to get the VPN connection status.)
        Since:
        V3.20.00