READMESource: master@1741dfd6
dsh-web-split
DeepSeek 免费网页版分屏插件:在 DSH 界面右侧以 iframe 面板打开 chat.deepseek.com 网页版,不打断当前任务。
安装
dsh plugin --profile web add /path/to/dsh-web-split
使用
- 侧边栏底部 / 会话头部的鲸鱼按钮:开/关右侧分屏面板;
- Ctrl / 中键点击按钮:在新标签页打开网页版;
- 面板头部:✕ 关闭、「新标签页 ↗」备用入口。
原理
chat.deepseek.com 发送 content-security-policy: frame-ancestors 'none',浏览器拒绝 iframe 嵌入。
本插件在本地启动一个 Node 反向代理(经 shell 服务,heredoc 传脚本):
- 剥掉
content-security-policy/x-frame-options/ HSTS; - 改写 cookie(Domain/Secure/SameSite)适配本机同域;
fe-static.deepseek.com资源改走/festatic同源路径,并剥掉 SRI/crossorigin (CDN 的 CORS 只放行*.deepseek.com,否则脚本跨域加载失败);- 给
main.js打环境补丁:让127.0.0.1命中 production 分支 (原switch(location.hostname)对未知主机名直接throw,导致"页面资源加载异常"); - SSE 流式透传,聊天流式输出不受影响。
代理端口固定为 127.0.0.1:8799(冲突时回退 8800-8810 并自动回收孤儿代理),
经 webServer 路由 /dsw-proxy-port 暴露给客户端。
固定端口保证 iframe origin 稳定,因此 DeepSeek 网页版的登录态(localStorage)
在 DSH 重启后仍然保留,无需重复登录。
已知限制
- 依赖 DeepSeek 网页版的页面结构,官方改版或收紧风控后可能需要更新;
- 登录验证码需在面板内正常操作;聊天接口若被 WAF 限流(Rate Limit Reached) 是 IP 级风控,稍后重试或直接用官方网页版确认。
No comments yet. Be the first to write one.