Difference between revisions of "Trigger: VPN State"

m
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<pre style="background-color: #EEEEEE; color: Black; border-radius: 10px; padding: 10px;">
+
<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>
This trigger will fire when the a VPN (Virtual Private Network) is connected/ disconnected.
 
</pre>
 
<br>
 
'''Example Usage'''<br/>
 
A VPN in some situations avoids censorship and geo-blocking of content.
 
<pre style="background-color: #AC2424; color: white; border-radius: 10px; padding: 10px;">
 
Triggers
 
  
VPN state change (Enable)
+
''' Options '''
</pre><br>
 
<pre style="background-color: #1665B0; color: white; border-radius: 10px; padding: 10px;">
 
Actions
 
  
Launch app StreamApp
+
* '''Enabled''': Trigger when a VPN connection is established
</pre><br>
+
* '''Disabled''': Trigger when a VPN connection is terminated
<pre style="background-color: green; color: white; border-radius: 10px; padding: 10px;">
 
Constraints
 
  
 +
''' Configuration '''
  
</pre><br>
+
Select whether to trigger when a VPN is connected (Enabled) or disconnected (Disabled). The trigger monitors network connectivity changes to detect VPN state.
<pre style="background-color: teal; color: white; border-radius: 10px; padding: 10px;">
 
Local variables
 
  
 +
''' Examples '''
  
</pre><br>
+
  <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