dsh-llm-proxy: Routing dsh's LLM Requests Through a Configurable HTTP Proxy

Preface

In the DSH plugin system, the host process can gain new capabilities through plugins. For scenarios where LLM requests sent by dsh need to be routed to a specified HTTP proxy, dsh-llm-proxy provides a straightforward plugin solution.

It primarily addresses three types of issues: routing dsh’s LLM requests through the configured proxy address; applying configuration changes immediately without requiring a restart; and providing a local interface to view the current status and test connectivity.

Below, we introduce its positioning, installation method, configuration fields, and limitations to be aware of.

What This Is

dsh-llm-proxy is a global HTTP proxy plugin for DeepSeek Harness (dsh). It uses undici’s setGlobalDispatcher and EnvHttpProxyAgent to take over dsh’s fetch proxy routing, allowing dsh’s LLM requests to go through the configured proxy.

The project is maintained by Ye-Yu-Mo and is licensed under MIT. The plugin is installed as a bundle package, is automatically added to dsh.profile.bundles, and becomes active on the next startup.

Core Features

  • Global takeover: Uses undici’s setGlobalDispatcher plus EnvHttpProxyAgent to take over dsh’s fetch proxy routing.
  • Proxy configuration: Routes dsh’s LLM requests through the configured proxy address.
  • Hot switching: Configuration changes take effect immediately without requiring a restart.
  • Recoverable: When the plugin is stopped or disabled, it restores the baseline dispatcher, leaving no process-level residue.
  • Status viewing: Provides a local interface to view the currently active mode.
  • Connectivity testing: Provides a local interface to test proxy connectivity to target endpoints.

Installation and Activation

First, use the verified GitHub installation command to install the plugin into the web profile:

dsh plugin --profile web add github:Ye-Yu-Mo/dsh-llm-proxy

For local debugging, you can also clone the repository first and then install using link:

git clone https://github.com/Ye-Yu-Mo/dsh-llm-proxy
dsh plugin --profile web add link:$(pwd)/dsh-llm-proxy

After installation, you need to restart dsh web for the bundle patch to take effect. Then check the log file:

~/.dsh/dsh.log

When you see the [llm-proxy] log entry, it means the plugin has been loaded.

Configuration

You can configure it through the “LLM Proxy” section in the dsh settings page, or directly edit the local settings file:

~/.dsh/settings.yaml

Here is an example configuration:

llm-proxy:
  enabled: true
  url: http://127.0.0.1:7891
  noProxy:
    - localhost
    - 127.0.0.1
    - ::1

The configuration fields have the following meanings:

  • llm-proxy.enabled: Whether proxy takeover is enabled.
  • llm-proxy.url: The HTTP(S) proxy address.
  • llm-proxy.noProxy: List of addresses that bypass the proxy.

After configuration changes, the plugin supports immediate effect without requiring a dsh restart.

Status and Test Interfaces

The plugin provides two local HTTP endpoints, and the HTTP API is loopback-only to reduce LAN probing risks.

View the current status:

GET /api/llm-proxy/status

After calling this, you can view the currently active mode, as well as the env.httpProxy and env.httpsProxy fields.

Test proxy connectivity:

POST /api/llm-proxy/test

When calling this, you need to submit the following fields:

  • url: The proxy address to test.
  • probeUrl: The target endpoint address.
  • timeoutMs: Timeout duration.

Applicable Scenarios and Notes

Suitable for the following situations:

  • You want dsh’s LLM requests to uniformly go through a specified proxy.
  • You need to switch proxy configuration at runtime rather than restarting dsh after each change.
  • You need a local interface to confirm the current proxy status and test whether the target endpoint is reachable.

Notes before use:

  • The plugin runs with the current dsh process permissions; you should review the source code and license before installation.
  • The project requires Node >=24.
  • The configuration namespace whitelist on the dsh settings page is hardcoded, and third-party plugins cannot self-register; you currently need to manually add llm-proxy to the whitelist for the settings page form to be usable.
  • When the plugin is stopped or disabled, it restores the baseline dispatcher to avoid leaving process-level residue.
  • Use the installation command provided in the materials, and do not construct commands by name on your own.

Conclusion

The value of dsh-llm-proxy lies in turning dsh’s LLM request proxy capability into a configurable, observable, and revertible plugin capability.

Project address:

https://github.com/Ye-Yu-Mo/dsh-llm-proxy

If you are using the DSH plugin directory, you can search by the project name dsh-llm-proxy or the author Ye-Yu-Mo.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye