Use the chrome.vpnProvider API to implement a VPN client.
Use the chrome.vpnProvider API to implement a VPN client. * available since Chrome 43 * https://developer.chrome.com/extensions/vpnProvider
(create-config name)
Creates a new VPN configuration that persists across multiple login sessions of the user.
|name| - The name of the VPN configuration.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [id] where:
|id| - A unique ID for the created configuration, or undefined on failure.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/extensions/vpnProvider#method-createConfig.
Creates a new VPN configuration that persists across multiple login sessions of the user. |name| - The name of the VPN configuration. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [id] where: |id| - A unique ID for the created configuration, or undefined on failure. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/extensions/vpnProvider#method-createConfig.
(destroy-config id)
Destroys a VPN configuration created by the extension.
|id| - ID of the VPN configuration to destroy.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/extensions/vpnProvider#method-destroyConfig.
Destroys a VPN configuration created by the extension. |id| - ID of the VPN configuration to destroy. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/extensions/vpnProvider#method-destroyConfig.
(notify-connection-state-changed state)
Notifies the VPN session state to the platform. This will succeed only when the VPN session is owned by the extension.
|state| - The VPN session state of the VPN client.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/extensions/vpnProvider#method-notifyConnectionStateChanged.
Notifies the VPN session state to the platform. This will succeed only when the VPN session is owned by the extension. |state| - The VPN session state of the VPN client. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/extensions/vpnProvider#method-notifyConnectionStateChanged.
(send-packet data)
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.
|data| - The IP packet to be sent to the platform.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/extensions/vpnProvider#method-sendPacket.
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. |data| - The IP packet to be sent to the platform. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/extensions/vpnProvider#method-sendPacket.
(set-parameters parameters)
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| - The parameters for the VPN session.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/extensions/vpnProvider#method-setParameters.
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| - The parameters for the VPN session. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/extensions/vpnProvider#method-setParameters.
(tap-all-events chan)
Taps all valid non-deprecated events in chromex.ext.vpn-provider namespace.
Taps all valid non-deprecated events in chromex.ext.vpn-provider namespace.
(tap-on-config-created-events channel & args)
Triggered when a configuration is created by the platform for the extension.
Events will be put on the |channel| with signature [::on-config-created [id name data]] where:
|id| - ID of the configuration created. |name| - Name of the configuration created. |data| - Configuration data provided by the administrator.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/vpnProvider#event-onConfigCreated.
Triggered when a configuration is created by the platform for the extension. Events will be put on the |channel| with signature [::on-config-created [id name data]] where: |id| - ID of the configuration created. |name| - Name of the configuration created. |data| - Configuration data provided by the administrator. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/extensions/vpnProvider#event-onConfigCreated.
(tap-on-config-removed-events channel & args)
Triggered when a configuration created by the extension is removed by the platform.
Events will be put on the |channel| with signature [::on-config-removed [id]] where:
|id| - ID of the removed configuration.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/vpnProvider#event-onConfigRemoved.
Triggered when a configuration created by the extension is removed by the platform. Events will be put on the |channel| with signature [::on-config-removed [id]] where: |id| - ID of the removed configuration. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/extensions/vpnProvider#event-onConfigRemoved.
(tap-on-packet-received-events channel & args)
Triggered when an IP packet is received via the tunnel for the VPN session owned by the extension.
Events will be put on the |channel| with signature [::on-packet-received [data]] where:
|data| - The IP packet received from the platform.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/vpnProvider#event-onPacketReceived.
Triggered when an IP packet is received via the tunnel for the VPN session owned by the extension. Events will be put on the |channel| with signature [::on-packet-received [data]] where: |data| - The IP packet received from the platform. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/extensions/vpnProvider#event-onPacketReceived.
(tap-on-platform-message-events channel & args)
Triggered when a message is received from the platform for a VPN configuration owned by the extension.
Events will be put on the |channel| with signature [::on-platform-message [id message error]] where:
|id| - ID of the configuration the message is intended for. |message| - The message received from the platform. Note that new message types may be added in future Chrome versions to support new features. |error| - Error message when there is an error.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/vpnProvider#event-onPlatformMessage.
Triggered when a message is received from the platform for a VPN configuration owned by the extension. Events will be put on the |channel| with signature [::on-platform-message [id message error]] where: |id| - ID of the configuration the message is intended for. |message| - The message received from the platform. Note that new message types may be added in future Chrome versions to support new features. |error| - Error message when there is an error. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/extensions/vpnProvider#event-onPlatformMessage.
(tap-on-ui-event-events channel & args)
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.
Events will be put on the |channel| with signature [::on-ui-event [event id]] where:
|event| - The UI event that is triggered. |id| - ID of the configuration for which the UI event was triggered.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/vpnProvider#event-onUIEvent.
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. Events will be put on the |channel| with signature [::on-ui-event [event id]] where: |event| - The UI event that is triggered. |id| - ID of the configuration for which the UI event was triggered. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/extensions/vpnProvider#event-onUIEvent.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close