A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.chrome.com/docs/extensions/reference/api/vpnProvider below:

chrome.vpnProvider | API | Chrome for Developers

Skip to main content chrome.vpnProvider

Stay organized with collections Save and categorize content based on your preferences.

Important: This API works only on ChromeOS. Description

Use the chrome.vpnProvider API to implement a VPN client.

Permissions

vpnProvider

Availability Concepts and usage

Typical usage of chrome.vpnProvider is as follows:

Types Properties

PlatformMessage

The enum is used by the platform to notify the client of the VPN session status.

Enum

"connected"
Indicates that the VPN configuration connected.

"disconnected"
Indicates that the VPN configuration disconnected.

"error"
Indicates that an error occurred in VPN connection, for example a timeout. A description of the error is given as the error argument to onPlatformMessage.

"linkDown"
Indicates that the default physical network connection is down.

"linkUp"
Indicates that the default physical network connection is back up.

"linkChanged"
Indicates that the default physical network connection changed, e.g. wifi->mobile.

"suspend"
Indicates that the OS is preparing to suspend, so the VPN should drop its connection. The extension is not guaranteed to receive this event prior to suspending.

"resume"
Indicates that the OS has resumed and the user has logged back in, so the VPN should try to reconnect.

UIEvent

The enum is used by the platform to indicate the event that triggered onUIEvent.

Enum

"showAddDialog"
Requests that the VPN client show the add configuration dialog box to the user.

"showConfigureDialog"
Requests that the VPN client show the configuration settings dialog box to the user.

VpnConnectionState

The enum is used by the VPN client to inform the platform of its current state. This helps provide meaningful messages to the user.

Enum

"connected"
Specifies that VPN connection was successful.

"failure"
Specifies that VPN connection has failed.

Methods

createConfig()

chrome.vpnProvider.createConfig(
  name: string,
)
: Promise<string>

Creates a new VPN configuration that persists across multiple login sessions of the user.

Parameters

destroyConfig()

chrome.vpnProvider.destroyConfig(
  id: string,
)
: Promise<void>

Destroys a VPN configuration created by the extension.

Parameters

notifyConnectionStateChanged()

chrome.vpnProvider.notifyConnectionStateChanged(
  state: VpnConnectionState,
)
: Promise<void>

Notifies the VPN session state to the platform. This will succeed only when the VPN session is owned by the extension.

Parameters

sendPacket()

chrome.vpnProvider.sendPacket(
  data: ArrayBuffer,
)
: Promise<void>

Sends an IP packet through the tunnel created for the VPN session. This will succeed only when the VPN session is owned by the extension.

Parameters

setParameters()

chrome.vpnProvider.setParameters(
  parameters: Parameters,
)
: Promise<void>

Sets the parameters for the VPN session. This should be called immediately after "connected" is received from the platform. This will succeed only when the VPN session is owned by the extension.

Parameters Events

onConfigCreated

chrome.vpnProvider.onConfigCreated.addListener(
  callback: function,
)

Triggered when a configuration is created by the platform for the extension.

Parameters

onConfigRemoved

chrome.vpnProvider.onConfigRemoved.addListener(
  callback: function,
)

Triggered when a configuration created by the extension is removed by the platform.

Parameters

onPacketReceived

chrome.vpnProvider.onPacketReceived.addListener(
  callback: function,
)

Triggered when an IP packet is received via the tunnel for the VPN session owned by the extension.

Parameters

onPlatformMessage

chrome.vpnProvider.onPlatformMessage.addListener(
  callback: function,
)

Triggered when a message is received from the platform for a VPN configuration owned by the extension.

Parameters

onUIEvent

chrome.vpnProvider.onUIEvent.addListener(
  callback: function,
)

Triggered when there is a UI event for the extension. UI events are signals from the platform that indicate to the app that a UI dialog needs to be shown to the user.

Parameters

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-11 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-11 UTC."],[],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4