Preface¶
DeepSeek Harness (DSH) natively provides API invocation capabilities, but if you need web-side session history, free quota, or want to leverage the browser’s own login state, you’ll need to embed chat.deepseek.com within DSH. This plugin embeds the full DeepSeek web interface into Harness’ sidebar panel via a local loopback reverse proxy.
Plugin Overview¶
- Name: dsh-deepseek-web-chat
- Maintainer: xubin0628
- Category: Client
- GitHub: https://github.com/xubin0628/dsh-deepseek-web-chat
- SkillHub Directory: https://www.skillhub.cn/plugins/xubin0628/dsh-deepseek-web-chat
It solves the problem of “using the web version of DeepSeek’s login state and session history within DSH” without consuming Harness’ API quota.
Core Features¶
- Adds a “Web DeepSeek” entry to the DSH sidebar. Clicking it opens chat.deepseek.com as a full page.
- Uses your own web login state, free quota, and session history.
- Enables embedding and same-origin access via a local loopback reverse proxy.
- Persistent login state: automatically restored after restarting Harness—no need to log in again.
- Supports manual import of
localStorage.userTokento resolve CAPTCHA stuck issues. - Hides the unavailable WeChat QR code login, retaining only phone number and password login.
Installation & Enablement¶
Install via command line:
dsh plugin --profile desktop add github:xubin0628/dsh-deepseek-web-chat
Or go to DSH’s “Settings → Plugins → Add Plugin” and enter github:xubin0628/dsh-deepseek-web-chat. After installation, refresh the page—the “Web DeepSeek” icon will appear in the sidebar.
Usage Steps¶
- Click the “Web DeepSeek” icon in the sidebar.
- Log in once with phone number + verification code (or password login).
- No need to log in again thereafter: the login state is automatically restored after restarting Harness.
Login state persistence is implemented through DSH’s credential store. The plugin maintains a Cookie jar, writing to deepseek-web-chat/site-session on every change and restoring it on startup. It also persists localStorage.userToken and validates it during page injection.
If you encounter a CAPTCHA getting stuck, copy localStorage.userToken from the browser console, then click “Import Login State” in the panel’s top bar and paste it in. The plugin first validates the token against /api/v0/users/current before saving and injecting it.
Configuration¶
The plugin uses port 45177 by default, configured via the port field in cordis.patch.yml. If that port is occupied, it automatically increments by 20 ports. The port is critical for login state: the official site stores login state in that origin’s localStorage, so changing the port is equivalent to switching devices.
Proxy Mechanism¶
The plugin starts a reverse proxy bound exclusively to the loopback interface (127.0.0.1 and [::1]), rewriting the entire site for same-origin access. Key issues addressed:
frame-ancestors 'none': Removes CSP / X-Frame-Options / HSTS to allow page embedding.- Static assets on
fe-static.deepseek.com: Rewritten to same-origin/_cdn/..., strippingintegrityandcrossoriginattributes. - Main bundle misidentifying the “IP host” as a dev environment: Rewritten to the production branch to avoid debug headers.
- API endpoints
/api/v0/*: Hit the proxy via same-origin, forwarded as-is in streaming fashion (including SSE, uploads, and PoW verification headers). - Response header contamination: Whitelist-based forwarding; HSTS, alt-svc, and Access-Control-* are not passed through.
The proxy does not log requests, is not exposed to external networks, and all data flows only locally.
Security & Privacy¶
- The proxy listens only on
127.0.0.1and[::1]—inaccessible from LAN or the public internet. - No request logs are recorded; neither response bodies nor request bodies are written to disk.
- Site cookies are stored only in the local DSH credential store (
deepseek-web-chat/site-session), equivalent to the credentials you’d have when logging into chat.deepseek.com in a browser. - The proxy strips upstream CSP / X-Frame-Options / HSTS and rewrites CDN resources to same-origin. This only affects the panel’s page and does not alter system or other browser settings.
- Your DSH credentials are never sent anywhere outside of Harness.
Known Limitations¶
- Binds only to the local loopback interface; not exposed externally.
- DSH accounts and the web version are two separate account systems with non-interoperable tokens: you cannot use DSH’s login state to auto-login to the web version.
- WeChat QR code login is hidden—please use phone number or password login.
- Voice readout uses
wss://.../api/v0/chat/tts/, which is not proxied; other features do not depend on it. - CAPTCHAs (shumei / hcaptcha / Turnstile) issue tokens per domain and may be rejected under the proxied domain; you can bypass this by importing
localStorage.userToken. - If the official site undergoes a redesign that breaks the rewrites, the panel may show a white screen, but “Open in New Tab” remains available.
Use Cases¶
Ideal for developers who need web version DeepSeek session history, free quota, or want to maintain a web login state within DSH. If you’ve already logged into chat.deepseek.com in a browser, this plugin lets you seamlessly switch to using it within DSH without re-logging in.
Notes¶
- The plugin runs with the current DSH process’s permissions. It is recommended to review the source code and license before installation.
- Requires DSH version >=0.2.1-rc.2 <0.3.0.
- Licensed under MIT © xubin0628.
Summary¶
dsh-deepseek-web-chat embeds the web version of DeepSeek into DeepSeek Harness’ sidebar panel via a loopback reverse proxy, using your own login state and free quota without consuming Harness’ API quota. Login state is persisted to the DSH credential store and automatically restored after restart. The plugin runs exclusively on the local machine, is not exposed externally, does not log requests, and keeps privacy under control.
Plugin Directory: https://www.skillhub.cn/plugins/xubin0628/dsh-deepseek-web-chat
GitHub: https://github.com/xubin0628/dsh-deepseek-web-chat