Tor Toggle + IP Check

Enciende/apaga Tor mediante comandos y devuelve IP anterior y actual

Tor Toggle + IP Check

AI-generated

Summary

Toggle the Tor service on or off via shell commands and retrieve the public IP address before and after the toggle to verify the change.

Inputs

  • Activar Tor (required) — Boolean to decide whether to enable (true) or disable (false) Tor.
  • Comando para encender Tor — Shell command to start the Tor service, e.g., "systemctl start tor" or Docker command.
  • Comando para apagar Tor — Shell command to stop the Tor service, e.g., "systemctl stop tor" or Docker command.
  • API para detectar IP — URL of a public IP detection API returning a JSON response, defaults to https://api.ipify.org?format=json.
  • Campo JSON de IP — JSON field name from the IP API response that contains the IP address, typically "ip".

Output shape

An array with one item containing an object with keys: torEnabledBefore (boolean), torEnabledAfter (boolean), ipPrevious (string or null), ipBeforeToggle (string or null), and ipCurrent (string or null).

The output reflects the Tor state before and after the toggle and the public IP address values before and after executing the toggle commands. IP fields may be null if the IP API request fails. The operation uses global static data to track state between executions.

Examples

Example 1: Toggle Tor on and verify IP change

Set 'Activar Tor' to true, optionally adjust 'Comando para encender Tor', and provide IP API URL and JSON field if needed. The node runs the enable command if Tor was off and returns IP details before and after.

Discussion