Lightweight local HTTP file server with plugin support. Serves static files from a webroot, mounts plugin directories at URL prefixes via config, and runs index.py entry points as CGI.
Lightweight local HTTP file server — no Apache/nginx needed, no root required. Serves static files, mounts plugin directories, and runs index.py entry points as CGI.
Entry point: INLINECODE1
See SETUP.md for prerequisites and setup instructions.
CODEBLOCK0
CODEBLOCK1
Config lives in {workspace}/intranet/config.json, webroot is {workspace}/intranet/www/. The config file is never exposed to HTTP.
Plugins mount external directories at URL prefixes. Configure in config.json:
CODEBLOCK2
Plugin config supports simple (static only) or extended (with CGI hash) format:
CODEBLOCK3
hash, index.py at the plugin root handles all sub-paths — but only if its SHA-256 matcheshash are static-only (CGI blocked even when globally enabled)Off by default. Enable in config.json:
CODEBLOCK4
When enabled, only files named index.py can execute as CGI:
index.py in any subdirectory handles that directory's requestsindex.py at the plugin root handles all plugin sub-paths.py files → 403 Forbidden (never served, never executed)chmod +x)www/), never served"cgi": true in config.jsonconfig.json are served; must be inside workspaceindex.py — no arbitrary script execution; plugin CGI requires SHA-256 hash in config.json. Webroot CGI does not require a hash (webroot files are under your direct control).py files blocked except index.py entry points (not served as text, not executed)allowed_hosts restricts which Host headers are accepted--token flag or config.json. Browser clients visit ?token=SECRET once → session cookie set → all subsequent navigation works. API clients use Authorization: Bearer <token> header.127.0.0.1 (loopback only). LAN access via --host 0.0.0.0 requires both token auth and allowed_hosts in config.json.The server auto-detects the workspace by walking up from $PWD (or the script location) looking for a skills/ directory. The detected path is printed on startup so you can verify it.
To skip autodiscovery, set INTRANET_WORKSPACE to the workspace root:
CODEBLOCK5
{workspace}/intranet/config.json
- PID: {workspace}/intranet/.pid
- Runtime: {workspace}/intranet/.conf
- Webroot: {workspace}/intranet/www/
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 intranet-1776420059 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 intranet-1776420059 技能
skillhub install intranet-1776420059
文件大小: 15.69 KB | 发布时间: 2026-4-17 20:12