Appearance
根据指定的 key 获取对应的 VPN 文件
方法名
getVpnProfile
用法
- 用法如下:js
module.getVpnProfile({ params: { key: "" }, complete: (res) => { console.log(res) } })jsmodule.getVpnProfile({ params: { key: "" }, complete: (res : LevenResult) => { console.log(res) } } as LevenOptions) - 参数说明
参数名 参数类型 是否必填 默认值 参数描述 params Object 是 无 接口请求参数 params.key String 是 无 VPN 的唯一标识 success Function 否 无 执行成功的函数 fail Function 否 无 执行失败的函数 complete Function 否 无 执行完成的函数,不管成功还是失败都会执行
回调
- 示例json
{ "data": { "result":{ "key": "", "ipsecCaCert":"", "ipsecIdentifier":"", "isMppeEnabled":false, "name":"", "type":1, "password":"", "ipsecServerCert":"", "ipsecSecret":"", "server":"", "ipsecUserCert":"", "l2tpSecret":"", "username":"" } }, "message": "", "code": 0 } - 回调说明:
参数名 参数类型 参数描述 message String 消息提示 data Object 数据对象 data.result Object 获取结果 data.result.key String VPN 的唯一标识 data.result.ipsecCaCert String IPSec CA 证书 data.result.ipsecIdentifier String IPSec 标识符 data.result.isMppeEnabled Boolean 是否 PPP 加密 data.result.name String VPN 的名称 data.result.type Integer VPN 的类型,有效范围 0-6 0:TYPE_PPTP1:TYPE_L2TP2:TYPE_L2TP_IPSEC_PSK3:TYPE_L2TP_IPSEC_RSA4:TYPE_IPSEC_XAUTH_PSK5:TYPE_IPSEC_XAUTH_RSA6:TYPE_IPSEC_HYBRID_RSAdata.result.password String 密码 data.result.ipsecServerCert String IPSec 服务器证书 data.result.ipsecSecret String IPSec 预共享密钥 data.result.server String 服务器名称 data.result.ipsecUserCert String IPSec 用户证书 data.result.l2tpSecret String L2TP 密钥 data.result.username String 用户名 code Integer 返回类型,0.成功,其他:失败

