dsh-network-config: DeepSeek Harness Network Proxy Configuration Plugin

Introduction

By default, DeepSeek Harness reads its proxy policy from environment variables (such as http_proxy, https_proxy, etc.). This means users must set these variables before starting the application, and every policy change requires an application restart.

This plugin adds a new Network page to the DeepSeek Harness settings. It addresses the pain points described above, allowing users to switch proxy modes directly inside the application, with changes taking effect immediately without a restart.

Core Features

  • Follow system proxy: Reads Windows system proxy settings and their enabled/disabled state.
  • Direct mode: Connects to the network without using any proxy.
  • Custom proxy: Specifies a custom HTTP(S) proxy address and supports configuring a bypass list.
  • Built-in bypass rules: Automatically uses direct connections for the following addresses, without manual configuration:
    • Loopback addresses
    • Private IP addresses (RFC 1918)
    • Link-local addresses
    • CGNAT addresses
  • Respect system bypass list: Also supports bypass entries in the system proxy configuration (such as wildcard prefixes, dotless hostnames, etc.).
  • Instant effect: No application restart or environment variable modification is required; saving the settings makes the changes effective immediately.

Installation and Activation

Environment Requirements

  • DeepSeek Harness desktop version (Windows is recommended to support the “Follow system” mode).
  • PowerShell.

Installation Steps

  1. Download the plugin package and extract it.
  2. Enter the extracted directory and run the installation script:
powershell -ExecutionPolicy Bypass -File .\install.ps1
  1. Completely close and then reopen DeepSeek Harness. The plugin is mounted at startup, and a running application cannot load new plugins.

  2. Verify the installation:

powershell -ExecutionPolicy Bypass -File .\verify.ps1

Uninstallation

powershell -ExecutionPolicy Bypass -File .\install.ps1 -Uninstall

A restart is required after uninstallation.

Typical Usage

Configure via UI

  1. Open DeepSeek Harness and go to Settings.
  2. Click Network.
  3. Select one of the following in the mode selector:
    - Follow system: Follow the system proxy.
    - Direct: Direct connection.
    - Custom: Custom proxy.
  4. Click Save.

Configure via API

Use a POST request to modify the proxy state. For example:

Invoke-RestMethod -Uri "http://127.0.0.1:19387/dsh-network-config/state" -Method POST -Body '{"mode": "system"}'

Notes and Limitations

  • SOCKS proxies are not supported: Only HTTP(S) protocols are supported.
  • PAC scripts are not supported: PAC script configurations are treated as direct connections.
  • Child process policy: Child processes fully follow the policy only on Node.js 22.21+ or 24+.
  • Dependencies: The plugin depends on the undici package, which must be resolvable in the application configuration.
  • Data file: Plugin configuration data is stored at %USERPROFILE%\.dsh\network-config.json.

Summary

This plugin provides DeepSeek Harness with a proxy configuration method that does not require a restart. By reusing the @deepseek-ai/dsh-http-proxy mechanism and combining it with a custom bypass matcher, it solves the cumbersome nature of the native environment-variable-based configuration.

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

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

Xiaoye