Skip to content

Conversation

@sjmiller609
Copy link
Contributor

@sjmiller609 sjmiller609 commented Sep 26, 2025

TL;DR

This PR introduces a new proxies command, allowing users to create, list, get, and delete various types of proxies. The browsers create command is also 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 proxies Command (cmd/proxies/):
    • Introduced a new command for full lifecycle management of proxies (proxies.go, types.go).
    • create: Added functionality to create various proxy types (datacenter, residential, etc.) with validation (create.go).
    • list: Implemented a command to display all configured proxies in a formatted table (list.go).
    • get: Added a command to retrieve and display detailed information for a single proxy by ID (get.go).
    • delete: Implemented a command to remove a proxy with an interactive confirmation prompt (delete.go).
  • Browser Integration (cmd/browsers.go):
    • Updated the browsers create command with a --proxy-id flag to attach a managed proxy to a new browser session.
  • CLI Integration (cmd/root.go):
    • Registered the new proxies command into the root CLI application.
  • Dependencies (go.mod, go.sum):
    • Updated module dependencies to support the new functionality.

Validation

  • Comprehensive Unit Tests (cmd/proxies/*_test.go):
    • Added extensive tests for all proxies subcommands, covering successful creation, retrieval, listing, and deletion of all supported proxy types.
    • Ensured robust error handling for invalid input, missing fields, and API failures.
  • Mock Service (cmd/proxies/common_test.go):
    • Implemented a FakeProxyService to mock API interactions, ensuring reliable and isolated testing.

Description generated by Mesa. Update settings

@sjmiller609 sjmiller609 changed the title Add proxies feature in beta Add proxies feature Sep 29, 2025
Copy link
Contributor

@masnwilliams masnwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@sjmiller609 sjmiller609 merged commit dd88c41 into main Sep 29, 2025
1 check passed
@sjmiller609 sjmiller609 deleted the proxies branch September 29, 2025 21:47
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.

3 participants