Difference between revisions of "Trigger: VPN State"

(Created page with "This trigger will fire when the a VPN (Virtual Private Network) is connected/ disconnected. '''Example Usage'''<br/> When VPN is active > launch streaming app (Avoid censors...")
 
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This trigger will fire when the a VPN (Virtual Private Network) is connected/ disconnected.
+
<pre class="header-style">This trigger will fire when a VPN (Virtual Private Network) is connected or disconnected. It monitors network connectivity changes to detect VPN state transitions.</pre>
  
'''Example Usage'''<br/>
+
''' Options '''
  
When VPN is active > launch streaming app (Avoid censorship and geo-blocking of content)
+
* '''Enabled''': Trigger when a VPN connection is established
 +
* '''Disabled''': Trigger when a VPN connection is terminated
 +
 
 +
''' Configuration '''
 +
 
 +
Select whether to trigger when a VPN is connected (Enabled) or disconnected (Disabled). The trigger monitors network connectivity changes to detect VPN state.
 +
 
 +
''' Examples '''
 +
 
 +
  <pre class="trigger-style">Triggers
 +
 
 +
VPN State (Enabled)</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Notification: VPN Connected
 +
    Your connection is now secure
 +
Set Variable: [vpn_status] = Connected</pre>
 +
 
 +
''Notify when VPN connection is established.''
 +
 
 +
----
 +
 
 +
  <pre class="trigger-style">Triggers
 +
 
 +
VPN State (Disabled)</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Notification: VPN Disconnected - Warning!
 +
    Your connection is no longer protected
 +
Speak Text: VPN has disconnected</pre>
 +
 
 +
''Alert when VPN disconnects unexpectedly.''
 +
 
 +
''' Notes '''
 +
 
 +
* The trigger works with any VPN app that uses standard Android VPN APIs.
 +
* Detection is based on network connectivity changes, so there may be a brief delay between the actual VPN state change and trigger activation.
 +
* Useful for security-conscious workflows that require awareness of VPN connection status.
 +
* Consider pairing with a VPN constraint to ensure actions only run when VPN is in the desired state.
 +
* Works with both system VPN connections and third-party VPN applications.
 +
 
 +
''' See Also '''
 +
 
 +
* [[Constraint:_VPN_State|VPN State Constraint]]
 +
* [[Trigger:_Wifi_State_Change|Wifi State Change Trigger]]

Latest revision as of 22:01, 7 January 2026

This trigger will fire when a VPN (Virtual Private Network) is connected or disconnected. It monitors network connectivity changes to detect VPN state transitions.

Options

  • Enabled: Trigger when a VPN connection is established
  • Disabled: Trigger when a VPN connection is terminated

Configuration

Select whether to trigger when a VPN is connected (Enabled) or disconnected (Disabled). The trigger monitors network connectivity changes to detect VPN state.

Examples

Triggers

VPN State (Enabled)
Actions

Notification: VPN Connected
    Your connection is now secure
Set Variable: [vpn_status] = Connected

Notify when VPN connection is established.


Triggers

VPN State (Disabled)
Actions

Notification: VPN Disconnected - Warning!
    Your connection is no longer protected
Speak Text: VPN has disconnected

Alert when VPN disconnects unexpectedly.

Notes

  • The trigger works with any VPN app that uses standard Android VPN APIs.
  • Detection is based on network connectivity changes, so there may be a brief delay between the actual VPN state change and trigger activation.
  • Useful for security-conscious workflows that require awareness of VPN connection status.
  • Consider pairing with a VPN constraint to ensure actions only run when VPN is in the desired state.
  • Works with both system VPN connections and third-party VPN applications.

See Also