Skip to content

Command Line Interface (CLI)

The WireSock Secure Connect application offers a command-line interface (CLI) for Windows, accessible via wiresock-connect-cli.exe . It provides basic profile management and connection control operations:

  • list available profiles
  • connect to a profile (stream logs and monitor status)
  • disconnect current connection
  • query current connection status
  • import a profile from file
  • export a profile to file
  • delete a profile

In Professional builds, additional license management commands are available.

The CLI is designed for automation and scripting and prints human-readable messages to stdout.

Usage

Run the executable without arguments to show usage/help:

powershell
wiresock-connect-cli

General usage form (shown by the tool):

wiresock-connect-cli <command> [arguments] [options]

Commands

  • list

    • Lists available profiles known to the local service.
    • Example: wiresock-connect-cli list
  • connect <profile> [-log-level <error|warning|info|debug|all>] [-lac] [-network-lock <mode>] [-exit]

    • Connect to a named profile.
    • Streams recent log messages and prints status changes until the connection terminates or the user cancels.
    • Options:
      • -log-level <error|warning|info|debug|all> — set the log level used by the service for this connection (error, warning, info, debug, all).
      • -lac — enable virtual adapter mode (LAC / Local Adapter Controller).
      • -network-lock <mode> — enable/disable Kill Switch (network lock) mode for this connection. Supported values: enabled/on and disabled/off.
      • -exit — exit the CLI when the connection reaches Connected (do not stay attached to stream).
    • Examples:
      • wiresock-connect-cli connect myProfile -log-level info
      • wiresock-connect-cli connect myProfile -lac -network-lock on -exit
  • disconnect

    • Terminates the current active connection (if any) and waits until tunnel is actually down.
    • Example: wiresock-connect-cli disconnect
  • status

    • Shows current connection status (NotConnected, Connecting, Connected, Disconnecting, Disconnected) and external address if available.
    • Example: wiresock-connect-cli status
  • import <file-path>

    • Imports a profile from a local file. The profile name is derived from the file name (without extension).
    • The command will fail if a profile with the same name already exists.
    • Example: wiresock-connect-cli import /path/to/profile.conf
  • export <profile> <file-path>

    • Exports the named profile into a new file. Will not overwrite existing files.
    • Example: wiresock-connect-cli export myProfile /tmp/myProfile.conf
  • delete <profile>

    • Removes a named profile from the local configuration.
    • Example: wiresock-connect-cli delete myProfile
  • reset-network-lock

    • Resets the network lock driver state to default.
    • Use this to manually recover from a stuck network block when Kill Switch was enabled.
    • Example: wiresock-connect-cli reset-network-lock

Pro-only commands

The following commands are available only in Professional builds:

  • import-license <file-path>

    • Imports licenses from the specified file and activates them in the service.
  • list-licenses

    • Lists licenses currently loaded in the service.
  • remove-license <license-id>

    • Removes a license with the specified ID from the service.
  • export-licenses <file-path>

    • Exports all licenses currently loaded in the service to the specified file.

Exit codes

The CLI prints messages to stdout/stderr for failures and returns non-zero exit codes implicitly by throwing or returning after writing an error message. There is no detailed documented numeric exit-code map in the source — check standard process exit status in your scripting environment.

Notes for scripting and automation

  • Ensure the WireSock service is running before calling commands that require it (connect, status, disconnect, import/export/delete).
  • connect without -exit attaches the CLI to the connection and prints logs until disconnected or Ctrl+C. Use -exit to let the service keep the connection while the CLI exits after it becomes connected.
  • export refuses to overwrite existing files — remove target file before exporting if you want to replace it.