Introduction¶
When using DeepSeek Harness’s web_fetch in a WSL environment, the default behavior bypasses the system proxy, resolving DNS directly via the Linux kernel and connecting to the target IP. As a result, web_fetch requests fail in scenarios where internet access requires a proxy. dsh-wsl-fetch is designed to solve this problem: it takes over the official web_fetch and forwards requests through the Windows HTTP proxy.
What It Is¶
This is a networking tool plugin maintained by user 173787247. Its core purpose is to register the wsl-proxy fetch provider and work in-process using undici’s ProxyAgent, enabling the official web_fetch to read and use the Windows HTTP proxy settings.
Core Features¶
- Use the Windows HTTP proxy for the official
web_fetch: Routes originally direct requests through the Windows HTTP proxy. - Register the
wsl-proxyfetch provider: Registers this provider in the DSH system forweb_fetchto use. - In-process proxying: Relies on undici’s
ProxyAgentto execute proxy logic within the current DSH process.
Installation and Enablement¶
The installation command is:
dsh plugin --profile web add github:173787247/dsh-wsl-fetch
After installation, the plugin only takes effect when the HTTP(S)_PROXY environment variable is set. If this environment variable is not set, the plugin is registered but remains unavailable.
Configuration¶
The plugin supports adjusting behavior through a configuration file:
- id: dsh-wsl-fetch
name: dsh-wsl-fetch
config:
timeoutMs: 30000
maxRedirects: 5
retries: 2
retryDelayMs: 400
| Setting | Default | Description |
|---|---|---|
timeoutMs |
30000 | Request timeout (milliseconds) |
maxRedirects |
5 | Maximum number of redirects |
retries |
2 | Number of failure retries |
retryDelayMs |
400 | Base retry delay (milliseconds) |
Notes¶
- Version dependency: Requires dsh version >= 0.1.2.
- Local URL restriction: Private or local URLs are blocked and cannot be accessed through the proxy.
- Cloudflare handling: If accessing Cloudflare through Clash results in 403 or 1010 errors, this is interception by the website firewall (WAF). You need to configure a
DIRECTrule in Clash; this plugin cannot bypass the WAF. - Model configuration: The plugin is not responsible for configuring Cloud Flash model IDs. They must be manually set in
~/.dsh/settings.yaml.
Testing¶
After installation, you can run the following commands to test:
npm test
bash scripts/stress.sh