Introduction¶
When proxy software (like Clash) enables “System Proxy,” the browser can access the internet, but in DSH, when you try to pull code or install dependencies, it fails to connect. The reasons are two:
- DSH has its own way of accessing the internet, ignoring the system proxy switch in your system;
- The git, npm, and pip it runs for you also have their own proxy settings, which also ignore the system proxy.
The result is that even though the proxy is on, DSH cannot pull code or install packages. The mowendao/dsh-win-proxy (Plugin Interface Name: Proxy Switch) introduced below puts these settings under a single switch: On, everything is on; Off, everything is off.
What is this¶
dsh-win-proxy is maintained by Mowendao, licensed under MIT, and is positioned as a “Proxy Switch” plugin for the Windows platform. It provides three equivalent entry points—the Settings page, /proxy command, and directly saying “turn on proxy” in the chat—to turn on or off the Windows system proxy and the proxy settings of git / npm / pip together.
You need to note its boundaries: The layer of DSH scraping web pages is not managed by this plugin; the plugin only manages the system proxy and your local git / npm / pip configurations.
Core Capabilities¶
Organized according to the capabilities listed in the README, the main ones are:
- Three entry points have consistent effects: Settings page,
/proxycommand, and chat trigger; none go through the model and do not consume tokens; - Changes take effect immediately; programs like browsers do not need to be restarted;
- It does not touch the “Bypass Proxy” list you added manually (default is empty, meaning no overwrite);
- It gives a reminder when a port is not being listened to, and you can tell at a glance if the proxy software is not started;
- It only modifies its specific items: other content in the config files of git, npm, and pip remains unchanged;
- Does not require administrator privileges;
- Does not connect to the internet; it only reads and writes local settings.
Installation and Activation¶
The highest priority is the Plugin Market. Open DSH’s Settings → Plugins, search for Proxy Switch, and click Install.
You can also install from GitHub:
dsh plugin --profile web add github:Mowendao/dsh-win-proxy
Or install from npm (published, current version 0.1.0, uses pre-built artifacts, no local build needed, and no authorization script needed):
dsh plugin --profile web add dsh-win-proxy
If your profile is not named web, replace --profile web with your own:
dsh plugin --profile <profile> add github:Mowendao/dsh-win-proxy
DSH Desktop plugins are installed by the application itself: Settings → Plugins → Install. Desktop profiles cannot be managed via the command line; the command line will reject them directly.
After installation, restart DSH (or refresh the page) for the Settings page to appear. The “Proxy Switch” page only loads after the installation is complete; this is the troubleshooting method given in the README.
To uninstall:
dsh plugin --profile web remove dsh-win-proxy
For the desktop version, go to Settings → Plugins → Uninstall.
Typical Usage¶
The command line entry does not go through the model and does not consume tokens:
/proxy on # Turn on: System proxy + git + npm + pip
/proxy off # Turn off
/proxy status # Check status only
Directly saying “turn on proxy”, “turn off proxy”, or “proxy status” in the chat will make the model call the tools in the plugin.
In the Settings page Settings → Proxy Switch: The top is the master switch, toggling all targets at once; each item shows the current status, plus which common ports are listening on the local machine; the proxy address can be edited directly, and remains after saving and restarting; or you can check only a few items, for example, only letting git use the proxy.
What settings it will modify¶
| Location | Open Proxy | Close Proxy |
|---|---|---|
| Windows System Proxy | Turn on and fill in the proxy address | Turn off the switch only, keep the address |
| git | Record the proxy address | Delete |
| npm | Record the proxy address in its config file | Delete |
| pip | Same as above | Delete |
After turning off the system proxy, the address is left in the Windows settings, and git / npm / pip do not have a toggle switch, so when closed, the address is deleted directly. These are explanations from the README.
The fields corresponding to the configuration files are:
- id: dsh-win-proxy
name: 'dsh-win-proxy'
config:
proxyServer: "127.0.0.1:7890"
targets: ["system", "git", "npm", "pip"]
| Setting Item | Default | Description |
|---|---|---|
| Proxy Address | 127.0.0.1:7890 |
Local proxy software listening address; Clash defaults to 7890 |
| Bypass List | Leave empty | Leave empty means do not touch the existing list in the system; only effective when filled to overwrite |
| Which items to manage | All | System proxy, git, npm, pip; you can leave only a few of them |
| Which ports to check | Common ports | When checking status, it also checks if these ports have programs listening |
Use Cases and Notes¶
Suitable for people using proxy software on Windows 10/11 who also need DSH to run git / npm / pip. The requirements are Windows 10/11 (the “System Proxy” item only supports Windows; git / npm / pip items also work on Mac and Linux), DSH 0.2.x, and no administrator privileges.
Two usage notes:
- If the browser is completely unable to open web pages even though the proxy is on, it is mostly because the proxy software is not started or the port is entered incorrectly. Open “Settings → Proxy Switch” and check the “Local Listening Port”; if it is empty there, it means no program is listening on the port you entered.
- If git / npm / pip show “unavailable”, it means the corresponding programs are not installed on this computer; other projects with programs installed are not affected.
Regarding security, the plugin is a third-party project following the MIT license. It runs with the permissions of the current DSH process, is offline, and it is recommended to review the GitHub source code and license before installation.
Summary¶
dsh-win-proxy solves a very specific problem: the system proxy is on, but the commands running in DSH cannot connect. Its solution is a switch that manages the system proxy and git / npm / pip proxy configurations simultaneously—on means all on, off means all off. The directory page is at https://www.skillhub.cn/plugins/Mowendao/dsh-win-proxy, and the source code is at https://github.com/Mowendao/dsh-win-proxy.