rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
GUANUI/dsh-campus-net
Campus network auto-login for DeepSeek Harness (Windows): status, on-demand login, a local settings page, automatic switch-back from a hotspot, and a three-layer autostart watchdog. Works with any POST-JSON + reply_code portal; no school-specific data.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:GUANUI/dsh-campus-net
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Campus network auto-login for DeepSeek Harness (DSH). Check whether you are online, log in on demand, and optionally run a small background daemon that reconnects after sleep, reboot, or a portal timeout — even when DSH is closed.
Not tied to any school: the portal address, endpoint paths and campus SSIDs are all entered in the settings page. It works with “POST JSON + reply_code” style portals.
Install
dsh plugin --profile web add dsh-campus-net # from npm
dsh plugin --profile web add github:GUANUI/dsh-campus-net # from source
Check compatibility first. Only “POST JSON + reply_code” portals are supported. Srun (深澜), Dr.COM and Ruijie use different protocols and are not supported. After installing, enter your portal URL on the settings page and try one login before enabling the daemon.
| Works | Does not work |
|---|---|
Portal answers JSON with reply_code |
Srun (深澜), Dr.COM, Ruijie |
Endpoints getinfo / login / logout / challenge (editable) |
Portal pages that need a scripted browser jump |
| Windows 10/11 (Wi-Fi switching, autostart) | Automatic Wi-Fi switching on macOS / Linux |
127.0.0.1 with a per-run token.chinanet / cmcc / unicom), the daemon switches back only after a scan confirms a configured campus SSID is actually in range; otherwise it leaves the current connection alone. On startup it also sets saved cmcc / unicom profiles to manual connection so Windows does not fall back to them when the campus network is not reachable. Turn it off with the “Prefer campus Wi-Fi” checkbox.autoOpenGuide: false disables it). DSH has no install-time popup hook, so this is the closest thing.install also registers a hidden Startup entry so it comes back after reboot.>= 0.2.0-rc.1 < 0.3.0netsh Wi-Fi switching, Startup autostart). On macOS/Linux the portal login and daemon work, but automatic Wi-Fi switching is skipped and autostart must be configured manually.From the DSH plugin market: search for dsh-campus-net and install.
Manual (from a checkout):
dsh plugin add link:/absolute/path/to/dsh-campus-net
Restart DSH if the four tools do not appear immediately.
The plugin opens this guide on first load. You can also run campus_net_setup and click User guide at the top of the settings page.
campus_net_setup. It returns a http://127.0.0.1:<port>/?token=… URL.chinanet / cmcc / unicom are paid carrier networks and are never auto-connected).campus_net_daemon { "action": "install" }) if you want it to survive reboot.Scanning needs Windows location permission: Settings → Privacy & security → Location, enable location services and desktop app access. You can also type the SSID manually; login still works without the permission.
With a global proxy or game accelerator running, the portal sees a non-campus source address and login fails with
请重新获取地址!(please obtain the address again). Quit those tools, or add a direct route to the portal IP, before logging in.
The settings link is valid only while the plugin process is alive. Re-run campus_net_setup after restarting DSH.
The Campus profile card stores several setups side by side — for example your own university and a campus you visit occasionally. Each profile keeps its own portal, Wi-Fi list, usernames and saved credentials; switch with the dropdown, use New to clone the current one, and Rename/Delete to manage them. The daemon always uses the selected profile, and switching applies from the next retry.
Fill in three things on the settings page:
| Field | Notes |
|---|---|
| Portal | e.g. http://portal.yourschool.edu.cn — the host that serves the login page |
| Campus Wi-Fi | Scan and tick, or type the SSID manually |
| Endpoint paths | Defaults are getinfo / login / logout / challenge; change them only if your portal differs |
Success is reply_code === 0. If your portal names the account field differently (e.g. user instead of username), change the field name too.
This plugin does not implement Srun (深澜) or Dr.COM protocols. Please do not list it as supporting them.
| Tool | What it does |
|---|---|
campus_net_status |
Online state, SSID, daemon state, last error. quick: true reads cached state only. |
campus_net_login |
Logs in now; tries the configured Wi-Fi first. |
campus_net_setup |
Starts the local settings page and returns its tokenized URL. |
campus_net_daemon |
status / start / stop / install / uninstall / logs. |
200 plus a login page, so 200 is deliberately treated as offline.netsh wlan connect to the configured SSIDs in order, then re-check the interface.auth is auto, it retries once with CHAP (md5(ident_byte + password + challenge_hex)).usernames. It only tries the next account when the portal says the account does not exist (E012/E027 or io_reply_code 12/27). A wrong password stops immediately.E013/E002/E028): logs out the current session and retries once.127.0.0.1:47215 as its single-instance lock. On Windows it is launched through WMI Win32_Process.Create so it is not tied to DSH's job object. A stop.flag file makes it exit within ~2 seconds.Everything stays on your machine. There is no telemetry and no third-party service.
| Path | Contents |
|---|---|
%LOCALAPPDATA%\dsh-campus-net\config.json |
Portal, SSIDs, interval, usernames |
%LOCALAPPDATA%\dsh-campus-net\cred.dat |
Encrypted username + password |
%LOCALAPPDATA%\dsh-campus-net\campus-net.log |
Append-only log (rotated at 512 KB) |
%LOCALAPPDATA%\dsh-campus-net\state.json |
Last check/login result, current account, PID |
On Windows the credentials are encrypted with DPAPI (CurrentUser). On other platforms they use AES-256-GCM with a 0600 key file. The password is never written to logs, tool output, or the settings page. It is passed to PowerShell through an environment variable for the DPAPI call, so it does not appear on a command line.
Set DSH_CAMPUS_NET_HOME to use a different data directory.
campus_net_daemon { "action": "uninstall" } — removes autostart and stops the daemon.%LOCALAPPDATA%\dsh-campus-net.campus_net_setup and save the account first.dsh-campus-net.vbs exists.lockPort in config.json.node test/smoke.mjs
The smoke test uses a temporary data directory and covers config normalization, tool shapes, DPAPI round-trip, and the settings server (including token rejection).
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。