Skip to content

Conversation

sjmiller609
Copy link

@sjmiller609 sjmiller609 commented Sep 26, 2025

TL;DR

This PR introduces a new proxies feature, allowing users to create, list, get, and delete various types of proxies (datacenter, residential, etc.). The feature is housed under a new, experimental beta command. Additionally, the browsers create command has been updated to allow launching a browser session with a specified proxy.

Why we made these changes

To provide users with integrated tools for managing and utilizing proxies directly within the CLI. This simplifies workflows that require running browser sessions from different geolocations or under specific network configurations, removing the need for external proxy management.

What changed?

  • New beta Command:

    • Introduced a top-level beta command (cmd/beta.go, cmd/root.go) to house new and experimental features safely.
  • New proxies Subcommand:

    • Added a full suite of commands for proxy management under beta proxies (cmd/proxies/*.go).
    • create: Supports creating datacenter, ISP, residential, mobile, and custom proxies with various configuration flags.
    • list: Displays all configured proxies in a formatted table with type-specific details.
    • get: Retrieves and shows detailed information for a single proxy by its ID.
    • delete: Removes a specified proxy, with a confirmation prompt.
  • Browser Integration:

    • Updated the browsers create command with a --proxy-id flag to attach a managed proxy to a new browser session (cmd/browsers.go).
  • Dependencies:

    • Updated go.mod and go.sum to include new dependencies required for the proxy management functionality.

Validation

  • Added comprehensive unit tests for all proxies subcommands (cmd/proxies/*_test.go), covering:
    • Successful creation and retrieval of all supported proxy types.
    • Correct display of proxy lists and details.
    • Robust error handling for invalid input, missing required fields, and API failures.
    • Successful deletion of proxies.
  • A FakeProxyService was implemented to mock API interactions and ensure reliable testing.

Description generated by Mesa. Update settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant