harmony 鸿蒙@ohos.net.vpn (VPN Management)

  • 2025-06-12
  • 浏览 (5)

@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

Type Description
connection.LinkAddress Network link address information.

RouteInfo

type RouteInfo = connection.RouteInfo

Defines the network route information.

System capability: SystemCapability.Communication.NetManager.Core

Type Description
connection.RouteInfo Network route information.

AbilityContext

type AbilityContext = _AbilityContext

System capability: SystemCapability.Ability.AbilityRuntime.Core

Type Description
_AbilityContext Context 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

0  赞