dsh-web-fetch-fakeip: Solving Web Fetch Issues in mihomo/Clash TUN Mode

In the DeepSeek Harness (DSH) web seam, web_fetch is a commonly used tool. When machine DNS runs in fake-ip mode behind a transparent proxy (TUN), the standard provider @deepseek-ai/dsh-web-fetch-http rejects requests. This is because ipaddr.js classifies the default 198.18.0.0/15 block as a reserved address, preventing the tool from resolving domains. dsh-web-fetch-fakeip works as a plug-and-play replacement that solves this issue, allowing the tool to keep working without disabling fake-ip or setting proxy environment variables.

Plugin Positioning

dsh-web-fetch-fakeip is a fake-ip-aware WebFetchProvider that replaces @deepseek-ai/dsh-web-fetch-http. It reuses the entire transport layer of the standard provider and only replaces the destination policy, so it can work properly under mihomo/Clash TUN mode and fake-ip DNS.

Installation and Enablement

Install it through DSH’s plugin system, which is currently the recommended approach:

dsh plugin --profile web add dsh-web-fetch-fakeip

After installation, the plugin automatically applies the cordis.patch.yml layer, disabling the original provider and enabling this plugin.

Version Compatibility

If loading fails, it may be due to DSH version incompatibility. DSH 0.2.0-rc.2 introduced peerDependencies checks, and if versions do not match (for example, an older version 0.1.1), the plugin will be skipped. In this case, update the plugin:

dsh plugin --profile web update dsh-web-fetch-fakeip

Restart Required to Take Effect

After installing or removing a plugin, the profile must be restarted to make changes take effect. The patchReload: live observer cannot dynamically reload the dsh.profile.bundles list.

Configuration Notes

In most cases, no additional configuration is required. The plugin adapts to the default dns.fake-ip-range of mihomo/Clash (198.18.0.0/15) by default.

Custom fake-ip Ranges

If your proxy uses non-standard fakeIpRanges, specify them in the configuration:

- id: web-fetch-http
  disabled: true

- insert:
    - id: web-fetch-fakeip
      name: 'dsh-web-fetch-fakeip'
      config:
        fakeIpRanges:
          - 10.18.0.0/16
          - 198.18.0.0/15

Notes

  1. Reserved Address Issue: The standard provider fails because ipaddr.js marks 198.18.0.0/15 as a reserved address. This plugin bypasses this limitation by reimplementing the policy.
  2. Manual Installation: In addition to package installation, you can manually copy the source code to profiles/web/plugins/ and introduce it via a patch, but the officially recommended approach is to use the package management command.
  3. Permissions and Security: The plugin runs with the permissions of the current DSH process. Before installing, it is recommended to check the source code and license (MIT).

Summary

dsh-web-fetch-fakeip fixes compatibility issues when using fake-ip DNS in TUN mode. It provides the simplest configuration approach and is suitable for developers who need to keep their proxy environment clean and avoid relying on environment variables.

  • Project homepage: https://github.com/kaminn/dsh-web-fetch-fakeip
  • Plugin directory: https://www.skillhub.cn/plugins/kaminn/dsh-web-fetch-fakeip
羽毛球分组比赛记分
小程序二维码

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

Xiaoye