返回目录
其他 插件

dsh-plugin-auth-webserver

kolawong/dsh-plugin-auth-webserver

DeepSeek Harness plugin providing HTTP Basic Authentication, remote IP access, and Web Cryptography UUID polyfill for self-hosted server deployments.

Stars
2
Forks
1
Issues
0
更新
1 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:kolawong/dsh-plugin-auth-webserver

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

DeepSeek Harness Web Authentication Plugin

dsh-plugin-auth-webserver

GitHub license GitHub stars DeepSeek Harness

Native Web Authentication & Login plugin for DeepSeek Harness (DSH). Give your self-hosted server deployment a DSH-styled Web Login Page, Cookie Sessions, Basic Auth fallback, Web UI Settings Card, and Web Crypto Polyfill.

🌐 English | 简体中文


✨ Features

  • 🎨 DSH-Themed Web Login Page:
    • Replaces native browser authentication popups with a sleek dark-mode, glassmorphism login interface matching DeepSeek Harness's design system.
    • Password show/hide toggle, error shake animations, Enter-to-submit, and fully responsive layout for mobile and desktop browsers.
  • 🍪 Secure HMAC Cookie Session & Logout:
    • Issues 30-day cryptographically signed HMAC session tokens on login.
    • Includes a dedicated /api/auth.logout endpoint and Web UI logout button.
  • ⚙️ Interactive Web GUI Settings Card:
    • Live configuration directly within the DSH Web UI (Settings → Plugins → 🔒 Web Authentication).
    • Hot-updates credentials in memory instantly and persists changes across server restarts without downtime.
  • 🔌 Dual-Mode Authentication & WebSocket Protection:
    • Prioritizes modern Web Form / Cookie sessions while preserving backward-compatible HTTP Basic Auth headers for CLI tools, curl, and automated API clients.
    • Full authentication coverage for both HTTP routes and WebSocket (upgrade) channels.
  • 🛡️ Remote IP Privileged RPC Trust Delegation:
    • Automatically normalizes request Host and Origin headers for authenticated sessions, eliminating HTTP 403 Forbidden errors when accessing privileged RPC endpoints (settings.describe, agentPreset.*) via public IP.
  • 🔑 Web Crypto UUID Auto-Polyfill:
    • Automatically polyfills window.crypto.randomUUID() in HTML <head> for non-HTTPS and direct IP environments, preventing client-side runtime crashes.

📦 Installation

Step 1: Clone Plugin to DSH Plugins Directory

mkdir -p ~/.dsh/plugins/dsh-plugin-auth-webserver
cd ~/.dsh/plugins/dsh-plugin-auth-webserver
git clone https://github.com/kolawong/dsh-plugin-auth-webserver.git .

Step 2: Configure Web Profile Overlay

Edit ~/.dsh/profiles/web/cordis.patch.yml:

- id: webserver
  disabled: true

- insert:
    - id: webserver-auth
      name: '@custom/dsh-plugin-auth-webserver'
      inject:
        - webStartup
      config:
        host: '0.0.0.0'
        port: !!js ctx.webStartup.port ?? 3080
        username: 'admin'
        password: 'your_secure_password'

Step 3: Restart DSH Service

# If managed via systemd:
systemctl restart deepseek-harness

# Or launch directly via CLI:
dsh web --port 3080

Open your browser at http://your-server-ip:3080 to experience the new DSH-themed login page.


🔧 Configuration Reference

Option Type Default Description
host string '0.0.0.0' Listening network interface (0.0.0.0 or 127.0.0.1).
port number 3080 Port for the HTTP/WebSocket server.
username string 'admin' Authentication username.
password string '' Authentication password (leave empty to disable authentication).
realm string 'DeepSeek Harness Authentication' Realm string used for fallback Basic Auth.

📡 API Endpoints

  • POST /api/auth.login — Authenticate and receive a session cookie ({ username, password }).
  • POST /api/auth.logout — Invalidate current session and clear cookie.
  • GET /api/auth.get — Retrieve current username and realm configuration.
  • POST /api/auth.update — Live update credentials and persist to profile configuration.

📄 License

MIT License © 2026 kola

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类其他
规则置信度

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。