Proxies

Category: CLI

Proxies CLI Commands

Manage proxy configurations through the command line interface.

Overview

The proxies command allows you to create, list, update, and delete proxy configurations. All commands support multiple output formats for easy integration with scripts and tools.

Commands

list

List all configured proxies.

Usage:

pow-desktop.exe proxies list [OPTIONS]

Options:

  • -o, --output <OUTPUT> - Output format (default: text)
    • Possible values: text, json, yaml

Examples:

# List all proxies in text format (default)
pow-desktop.exe proxies list

# List all proxies in JSON format
pow-desktop.exe proxies list --output json

# List all proxies in YAML format
pow-desktop.exe proxies list --output yaml

Output Fields:

  • ID - Unique proxy identifier
  • NAME - Proxy name/description
  • ENABLED - Whether the proxy is enabled (yes/no)
  • HOST - Proxy server hostname or IP address
  • PORT - Proxy server port number
  • USERNAME - Authentication username (if configured)
  • HAS_PASSWORD - Whether a password is configured (yes/no)

Security Note: Passwords are never displayed in list output. Use the get command to view password details.


get

Get detailed information about a specific proxy by ID, including the password.

Usage:

pow-desktop.exe proxies get <ID> [OPTIONS]

Arguments:

  • <ID> - The proxy ID to retrieve

Options:

  • -o, --output <OUTPUT> - Output format (default: text)
    • Possible values: text, json, yaml

Examples:

# Get proxy details in text format
pow-desktop.exe proxies get proxy-123

# Get proxy details in JSON format
pow-desktop.exe proxies get proxy-123 --output json

# Get proxy details in YAML format
pow-desktop.exe proxies get proxy-123 --output yaml

Output Fields: Includes all fields from list plus:

  • PASSWORD - Proxy password (only shown in get command, never in list)

create

Create a new proxy configuration.

Usage:

pow-desktop.exe proxies create <ID> <NAME> <HOST> <PORT> [OPTIONS]

Arguments:

  • <ID> - Unique identifier for the proxy
  • <NAME> - Human-readable name/description
  • <HOST> - Proxy server hostname or IP address
  • <PORT> - Proxy server port number

Options:

  • --username <USERNAME> - Optional username for authentication
  • --password <PASSWORD> - Optional password for authentication
  • --enabled - Enable the proxy (default: disabled)
  • -o, --output <OUTPUT> - Output format (default: text)
    • Possible values: text, json, yaml

Examples:

# Create a basic proxy without authentication
pow-desktop.exe proxies create proxy-1 "My Proxy" 127.0.0.1 1080 --enabled

# Create a proxy with authentication
pow-desktop.exe proxies create proxy-2 "Authenticated Proxy" proxy.example.com 8080 \
  --username myuser --password mypass --enabled

# Create a proxy and output in JSON format
pow-desktop.exe proxies create proxy-3 "JSON Proxy" 192.168.1.100 3128 \
  --enabled --output json

update

Update an existing proxy configuration. Only specified fields will be updated.

Usage:

pow-desktop.exe proxies update <ID> [OPTIONS]

Arguments:

  • <ID> - The proxy ID to update

Options:

  • --name <NAME> - Update the proxy name
  • --host <HOST> - Update the proxy host
  • --port <PORT> - Update the proxy port
  • --username <USERNAME> - Update the username (use empty string to clear)
  • --password <PASSWORD> - Update the password (use empty string to clear)
  • --enabled - Enable the proxy
  • -o, --output <OUTPUT> - Output format (default: text)
    • Possible values: text, json, yaml

Examples:

# Update proxy name
pow-desktop.exe proxies update proxy-1 --name "Updated Proxy Name"

# Update proxy host and port
pow-desktop.exe proxies update proxy-1 --host newhost.example.com --port 9090

# Enable a proxy
pow-desktop.exe proxies update proxy-1 --enabled

# Clear username (set to empty)
pow-desktop.exe proxies update proxy-1 --username ""

# Update multiple fields
pow-desktop.exe proxies update proxy-1 \
  --name "New Name" \
  --host 192.168.1.200 \
  --port 8080 \
  --enabled

Note: Fields not specified in the update command will remain unchanged. To clear optional fields like username or password, pass an empty string.


delete

Delete a proxy configuration.

Usage:

pow-desktop.exe proxies delete <ID> [OPTIONS]

Arguments:

  • <ID> - The proxy ID to delete

Options:

  • -o, --output <OUTPUT> - Output format (default: text)
    • Possible values: text, json, yaml

Examples:

# Delete a proxy
pow-desktop.exe proxies delete proxy-1

# Delete a proxy and get JSON confirmation
pow-desktop.exe proxies delete proxy-1 --output json

Output Formats

Text Format (Default)

Human-readable table format suitable for terminal viewing.

Example (list):

ID        NAME            ENABLED    HOST              PORT    USERNAME    HAS_PASSWORD
proxy-1   My Proxy        yes        127.0.0.1         1080    myuser      yes

Example (get):

ID          proxy-1
NAME        My Proxy
ENABLED     yes
HOST        127.0.0.1
PORT        1080
USERNAME    myuser
PASSWORD    mypass

JSON Format

Structured JSON output suitable for programmatic processing.

Example:

{
  "id": "proxy-1",
  "name": "My Proxy",
  "enabled": true,
  "host": "127.0.0.1",
  "port": 1080,
  "username": "myuser",
  "password": "mypass"
}

YAML Format

YAML output for configuration files and human-readable structured data.

Example:

id: proxy-1
name: My Proxy
enabled: true
host: 127.0.0.1
port: 1080
username: myuser
password: mypass

Security Considerations

  • Password Visibility: Passwords are only shown in the get command output, never in list output
  • Password Storage: Passwords are stored securely in the database
  • Empty String Clearing: Use empty strings ("") to clear username or password fields

Exit Codes

  • 0 - Success
  • 1 - Error (e.g., proxy not found, invalid configuration, database error)

Examples

List all enabled proxies

pow-desktop.exe proxies list --output json | jq '.[] | select(.enabled == true)'

Create a proxy from environment variables

pow-desktop.exe proxies create proxy-1 "Env Proxy" \
  "$PROXY_HOST" "$PROXY_PORT" \
  --username "$PROXY_USER" \
  --password "$PROXY_PASS" \
  --enabled

Backup all proxies to YAML

pow-desktop.exe proxies list --output yaml > proxies_backup.yaml

Update proxy password

pow-desktop.exe proxies update proxy-1 --password "newpassword123"

Find proxies by host

pow-desktop.exe proxies list --output json | jq '.[] | select(.host == "127.0.0.1")'

Export proxy configuration for use in scripts

pow-desktop.exe proxies get proxy-1 --output json > proxy_config.json