Introduction¶
The ctx.web seam of DeepSeek Harness (DSH) provides web scraping capabilities. The built-in WebFetchProvider typically validates whether the resolved IP address is a public unicast address. In fake-ip or TUN mode, domains are resolved to the reserved range 198.18.0.0/15, causing any web page to report a resolves to a non-public IP address error.
dsh-web-fetch-proxy adds a web_fetch provider named http-proxy to DSH. It uses undici’s ProxyAgent and delegates domain name resolution and outbound traffic entirely to the HTTP(S) proxy explicitly configured by the user. This bypasses local DNS validation and resolves connection issues in TUN environments.
Positioning¶
This is a pure registry extension that does not modify DSH core. Through the Cordis Patch mechanism, it switches the default behavior of ctx.web to making requests via an external proxy.
Installation and Enablement¶
The installer requires dsh version 0.1.2-alpha.3 or 0.1.5-rc.1 to be present in PATH, as well as pnpm.
- Run the official installation command:
npx --yes github:shaomingbo/dsh-web-fetch-proxy#v0.1.2
- Use
--profileto specify the target profile (default isweb):
npx --yes github:shaomingbo/dsh-web-fetch-proxy#v0.1.2 --profile <name>
- After installation, restart the corresponding profile and force-refresh the web UI to load the new configuration.
Configuration and Wiring¶
This plugin takes over the fetchProvider of the web seam through the Cordis Patch mechanism. Configuration consists of two parts: the plugin’s own configuration and the configuration for taking over the seam.
- Define the plugin configuration: Add a
web-fetch-proxyentry at the profile patch layer and configureproxyUrl.
# 1) 插件条目
- id: web-fetch-proxy
config:
proxyUrl: http://127.0.0.1:7890
# 可选参数(默认值与内置一致):
# maxResponseBytes: 5000000
# maxBodyChars: 100000
# timeoutMs: 30000
# maxRedirects: 5
# userAgent: deepseek-harness/0.0.1 (+https://github.com/deepseek-ai)
- Take over the web seam: Modify the
webseam configuration to pointfetchProviderto the plugin IDhttp-proxy.
# 2) 接管 web seam
- id: web
config:
searchProvider: deepseek-official
fetchProvider: http-proxy
- Reload and verify:
- After configuration changes, restart the profile and force-refresh the GUI.
- Run the smoke test to verify connectivity:
develop dsh-web-fetch-proxy smoke:proxy
Compatibility and Limitations¶
- DSH version compatibility: Tested and compatible only with DSH 0.1.2-alpha.3 and 0.1.5-rc.1. The installer rejects other versions.
- Proxy trust: This plugin does not perform local DNS validation; name resolution is entirely delegated to the configured proxy. The proxy is the trust boundary and can observe and modify all requests and responses.
- No HMR: Hot updates are not guaranteed; configuration changes require a restart.
- Security semantics: The plugin does not attach cookies, does not use environment credentials, and credentials must not be embedded in URLs.
Conclusion¶
dsh-web-fetch-proxy is a lightweight plugin that solves DSH web scraping issues in TUN/fake-ip environments. By introducing an external proxy as a trust boundary, it ensures availability in special network environments.
- GitHub: https://github.com/shaomingbo/dsh-web-fetch-proxy
- Directory: https://www.skillhub.cn/plugins/shaomingbo/dsh-web-fetch-proxy