Add proxies feature #18
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TL;DR
This PR introduces a new
proxiescommand, allowing users to create, list, get, and delete various types of proxies. Thebrowsers createcommand 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?
proxiesCommand (cmd/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).cmd/browsers.go):browsers createcommand with a--proxy-idflag to attach a managed proxy to a new browser session.cmd/root.go):proxiescommand into the root CLI application.go.mod,go.sum):Validation
cmd/proxies/*_test.go):proxiessubcommands, covering successful creation, retrieval, listing, and deletion of all supported proxy types.cmd/proxies/common_test.go):FakeProxyServiceto mock API interactions, ensuring reliable and isolated testing.Description generated by Mesa. Update settings