One-Click Switching of Whistle Proxy Rules with Alfred

This article introduces implementing one-click switching of Whistle proxy rules with Alfred, including advantages, implementation details, and related resources to improve efficiency.

Jun 17, 2021 · 1 min read · 172 Words · -Views -Comments · Software & Tools
Productivity Tools 🇨🇳 阅读中文版
Read with AI

Choose an AI assistant

ChatGPT Open in a new tab with the article link and prompt
Claude Copy the prompt, then open Claude

Open Claude
Trouble reading the article?

If the prompt is missing, copy the full prompt below into your AI assistant. If the AI cannot read the article, paste the visible passage you want to discuss and add your question.

In my current work, I frequently use Whistle proxy for web module development. Because of different environments and projects, I often need to switch proxy rules. Using the web GUI operation is still too inefficient, so I decided to create a workflow to improve switching efficiency.

Effect

Operation Guide

  • ⌥ ⏎ Access the web management page
  • ⏎ Toggle rule selection status
  • ⌘ C Copy the current rule’s specific configuration items
  • ⌘ Y or ⌘ L Preview the rule

Workflow download link, click here

Implementation Details

Here are the key points of the implementation:

  1. To implement ⇧ for preview, I made the rules into local files because quicklook must point to HTTP network file URLs or local resource URIs. Since the overall speed is very fast, users don’t notice. However, compared to ⇧, I prefer ⌘L for magnified preview, which has a better effect
  2. The workflow essentially just uses a different method to call the API. You just need to find the key rule acquisition and rule selection/deselection APIs through GUI request capture.
Authors
Developer, digital product enthusiast, tinkerer, sharer, open source lover