Preface¶
In DeepSeek Harness (DSH), the web_fetch tool parses domain names before connecting. If the resolution result contains any non-public address, it is rejected immediately with a WEB_BLOCKED_URL error. This is reasonable SSRF protection in most environments. However, if local TUN mode is enabled in Clash or mihomo with enhanced-mode: fake-ip, the system DNS resolves domains to reserved segments (commonly 198.18.0.0/15 and 2001:2::/64). These addresses are not considered public by DSH’s internal checks, so fetches are blocked uniformly, even though browsers and other applications can still access the internet normally. Users have to disable TUN to use web_fetch, or experience inconsistent behavior on Windows due to multi-NIC DNS behavior. The following introduces the community plugin dsh-web-fetch-lan (Maintainer: wqzhellohhwy, Category: Networking Tool), designed specifically to make web_fetch usable in this type of proxy environment while retaining blocking for internal networks, loopbacks, cloud metadata, and other addresses.
What is this¶
dsh-web-fetch-lan is a zero-dependency DSH plugin (current repo version 1.1.0, MIT license). It registers a replacement fetch provider (id = http-lan) that relaxes the judgment on fake-ip resolution results: it treats configurable fake-ip segments as connectable targets, while rejecting other non-public categories consistent with the internal logic. Connections are still forwarded by mihomo based on domain name mapping; it does not actually connect to fictional hosts on 198.18.x.x.
Core Features¶
Differences from the built-in provider¶
There is only one difference in the judgment rules:
| Resolution Result | Built-in Provider | This Plugin |
|---|---|---|
| Public Address | Allow | Allow |
| fake-ip Segment (Configurable) | Reject | Allow |
| Loopback / Private / Link-Local / CGNAT / Multicast / Reserved | Reject | Reject |
Therefore, 127.0.0.1, 192.168.x.x, 169.254.169.254, [::1], etc., will still be blocked, ensuring that installing the plugin does not expose local services, intranet devices, or cloud metadata endpoints.
DNS Connection Order¶
Under TUN + fake-ip, if Node connects following the raw DNS order (verbatim, IPv6 preferred), HTTPS may encounter intermittent ECONNRESET. The plugin sets the process’s DNS result order to ipv4first within apply(); if there is no A record, it still falls back to AAAA. The README states that in actual testing, it achieved 8/8 consecutive successes.
Behavior Boundaries Consistent with Built-in¶
- Only same-origin redirects are followed, max 5 hops; cross-origin jumps (including
http://→https://) are rejected with a prompt to retry the target URL. - Response limit is 2 MiB, body truncated at 200,000 characters; only text-based
content-typeis accepted. - 30-second timeout for a single fetch.
- URLs must not carry credentials; only
http:/https:are supported.
When blocked by SSRF, the error will explicitly state not a public address / resolves to a non-public IP address; fetch failed is mostly due to network layer or proxy node issues and is not the same type of failure as blocking.
Installation and Activation¶
The plugin is installed via the DSH Desktop plugin manager (not the dsh plugin CLI; profiles are managed by Electron):
- Place the repository in any directory, e.g.,
D:\repository\dsh-web-fetch-lan; - Open DSH sidebar Plugins → Add Plugin, enter the absolute path of the directory, and install;
- If a restart is prompted, restart DSH (providers are loaded when the host process starts).
Relative paths are rejected by the installer; absolute paths must be used. After installation, the profile’s package.json will have additional link: dependencies and bundle entries; you can uninstall by deleting them on the plugin page, and the built-in provider will immediately resume.
cordis.patch.yml fixes the fetchProvider for the web entry to http-lan; the built-in web-fetch-http is still registered, so if not explicitly specified, you will get WEB_PROVIDER_AMBIGUOUS.
Configuring fake-ip Segments¶
Default values are written in the repository’s cordis.patch.yml:
- insert:
- id: web-fetch-lan
name: '@local/dsh-web-fetch-lan'
config:
fakeIpRanges:
- 198.18.0.0/15
fakeIpRanges6:
- 2001:2::/64
- fdfe:dcba:9876::/64
If you modify fake-ip-range / fake-ip-range6 in clients like Clash Verge, add the corresponding CIDRs to the configuration above and restart DSH; there is no need to change the plugin source code.
You can also override at the profile level (~/.dsh/profiles/<profile>/cordis.patch.yml):
- id: web-fetch-lan
config:
fakeIpRanges: ['198.18.0.0/15']
fakeIpRanges6: ['2001:2::/64']
Fault Tolerance: Entries are validated CIDR by CIDR; invalid entries are removed while the rest are kept; if the input is not an array or is entirely invalid, it falls back to the built-in default segments and warns in the logs. The startup log prints the effective segments, for example:
[web-fetch-lan] fake-ip segments v4=198.18.0.0/15 v6=2001:2::/64,fdfe:dcba:9876::/64
Typical Usage and Self-check¶
After installation and restarting DSH, simply continue to use the web_fetch provided by DSH on the agent side; there is no need to call the plugin API separately in the conversation. The effective behavior is: in fake-ip environments, websites are no longer rendered unavailable due to “resolves to non-public IP”.
The repository provides a zero-dependency self-check, which can be executed in the plugin directory:
node selftest.mjs
Or:
pnpm test
The self-check covers configuration normalization and fallback, address judgment, and provider assembly. It confirms that 127.0.0.1, 169.254.169.254, [::1], 192.168.3.1, file:, and URLs with credentials are still rejected; it concludes with a real fetch (if the proxy is not running, it only prompts and does not count towards the exit code).
Use Cases and Notes¶
Who it is for: Developers who keep Clash / mihomo TUN + fake-ip enabled daily but need to stably use web_fetch in DSH to fetch public documents or pages.
Permissions and Security: The plugin runs with the permissions of the current DSH host process and participates in outbound HTTP(S) fetches. Before installation, you should read the repository source code and MIT license, and ensure the fake-ip segment configuration matches your local proxy settings; the community directory SkillHub has no official affiliation with DeepSeek / High-Flyer, and the plugin source is based on the GitHub repository.
Ecosystem Background: DSH adopts an “everything is a plugin” extension approach; this plugin belongs to the networking tool category. Star count and maintenance status are subject to the repository page (0 stars as of the data retrieval time).
Conclusion¶
dsh-web-fetch-lan only relaxes the SSRF judgment for fake-ip segments and optionally optimizes the DNS connection order. Its purpose is to restore web_fetch in TUN proxy environments without opening up internal network and metadata addresses. Directory Page: https://www.skillhub.cn/plugins/wqzhellohhwy/dsh-web-fetch-lan; Source Code & README: https://github.com/wqzhellohhwy/dsh-web-fetch-lan.