openharmony 鸿蒙 js-apis-net-vpn

2025-06-12 浏览 (1)

@ohos.net.vpn (VPN Management)

This module is the built-in VPN function provided by the OS. It allows users to set up VPN connections through the network settings of the OS. Generally, this module provides only limited functions and is subject to strict restrictions.

NOTE

The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.

Modules to Import

import { vpn } from '@kit.NetworkKit';

LinkAddress

type LinkAddress = connection.LinkAddress

Defines the network link address information.

System capability: SystemCapability.Communication.NetManager.Core

TypeDescription
connection.LinkAddressNetwork link address information.

RouteInfo

type RouteInfo = connection.RouteInfo

Defines the network route information.

System capability: SystemCapability.Communication.NetManager.Core

TypeDescription
connection.RouteInfoNetwork route information.

AbilityContext

type AbilityContext = _AbilityContext

System capability: SystemCapability.Ability.AbilityRuntime.Core

TypeDescription
_AbilityContextContext of the target UIAbility. It is inherited from Context and provides the UIAbility configuration and methods for operating UIAbility and ServiceExtensionAbility.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Network Kit

harmony 鸿蒙NetConn_ConnectionProperties

harmony 鸿蒙NetConn_HttpProxy

harmony 鸿蒙NetConn_NetAddr

harmony 鸿蒙NetConn_NetCapabilities

harmony 鸿蒙NetConn_NetConnCallback

harmony 鸿蒙NetConn_NetHandle

harmony 鸿蒙NetConn_NetHandleList

harmony 鸿蒙NetConn_NetSpecifier

harmony 鸿蒙NetConn_Route

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/NvVwrf