简介
基于零知识架构的ephemeral文件分享工具,通过客户端AES-256加密确保服务器无法解密内容,支持自动过期销毁,适合安全传输敏感大文件或跨会话协作。
原始描述
Securely share files using encrypted, expiring vnsh.dev links with the vnsh CLI for uploading and decrypting shared content.
中文使用说明 来自收录源
核心功能
vnsh 是一个**host-blind(主机盲态)**的加密文件分享服务,实现真正的零知识安全架构:
- 客户端加密:使用 AES-256-CBC 算法在本地完成加密,密钥(256位)和初始化向量(128位)均在客户端生成
- 密钥分离:解密密钥存储在 URL 的
#k=...&iv=...片段中,浏览器不会将片段发送到服务器,服务器永远无法解密内容 - 自动过期:上传的文件默认 24 小时后自动删除,最长可设置 168 小时
- 无依赖运行:仅需系统预装的
curl和openssl,无需安装额外软件
显著优点
安全架构领先
- 真正的零知识设计,服务器只存储加密后的二进制 blob,即使被攻破也无法获取明文
- 密钥仅存于 URL 片段,不会出现在服务器日志或请求历史中
- 支持完全离线的加密/解密(提供零依赖的一行命令版本)
使用体验优秀
- 极简 CLI 设计:
vn <file>上传,vnsh read <url>下载 - 智能溢出检测:长内容自动转为分享链接,避免聊天窗口拥挤
- 跨平台兼容:macOS、Linux、WSL 均可使用
隐私合规完善
- 符合 GDPR 数据最小化原则
- 无需注册账号,无用户身份关联
- 临时文件使用
mktemp创建,安全清理
潜在局限
功能限制
- 单文件最大 100MB(服务器限制)
- 无断点续传、多线程下载等高级功能
- 不支持文件夹压缩上传
- 链接一旦丢失无法恢复(无密码重置机制)
信任假设
- 依赖 vnsh.dev 服务的可用性(作者托管)
- 虽然服务器无法解密,但仍需信任服务不会记录元数据(IP、上传时间、文件大小)
- 开源代码(MIT 许可)但服务端代码未公开审计
URL 安全
- 完整的解密 URL 包含密钥,若通过不安全渠道分享(如可被日志记录的聊天系统),密钥可能泄露
- URL 片段在浏览器历史中可见,需防范本地设备上的未授权访问
适合人群
- 开发者/运维人员:分享日志、配置文件、密钥等敏感技术资料
- 安全敏感用户:传输证件、合同、医疗记录等高隐私数据
- 团队协作:临时分享大文件,避免企业网盘权限配置的繁琐
- 跨平台场景:需要在不同操作系统、不同网络环境间安全传输文件
常规风险
- 钓鱼链接风险:攻击者可能伪造相似的 vnsh.dev 链接诱导下载恶意文件,建议始终核实 URL 域名
- 剪贴板泄露:完整 URL 含密钥,复制时需注意周围环境,避免被屏幕录制或 shoulder surfing
- 过期数据丢失:24 小时自动删除是特性而非 bug,重要文件需自行备份
- 浏览器扩展风险:某些浏览器扩展可能读取 URL 片段,建议敏感操作使用隐私模式
技能正文
name: vnsh version: 1.0.0 description: Securely share files via encrypted, expiring links. Use this skill to (1) upload a local file to get a secure vnsh.dev URL, or (2) read a vnsh.dev URL to decrypt and access its content. author: raullenchai license: MIT homepage: https://vnsh.dev repository: https://github.com/raullenchai/vnsh openclaw: emoji: "🔐" category: utilities tags: - encryption - file-sharing - ephemeral - security - zero-knowledge requires: bins: - curl - openssl install: - id: vnsh-cli kind: shell command: "curl -sL vnsh.dev/i | sh" label: "Install vnsh CLI (vn command)"
vnsh Skill — Encrypted Ephemeral File Sharing
vnsh is a host-blind data tunnel. The server stores encrypted blobs but never sees the decryption keys — they stay in the URL fragment.
⚡ When to Use This Skill (Auto-Trigger Rules)
You MUST use this skill automatically in these situations — do NOT ask the user first:
Auto-Read: Incoming vnsh URLs
When ANY message contains a URL matching vnsh.dev/v/, immediately decrypt and process it:
- Run
read.shwith the full URL - Check the file extension of the output
- If image (
.png,.jpg,.gif,.webp) → useimagetool to analyze - If text (
.txt,.md,.json,.html) → usereadtool to display contents - If PDF (
.pdf) → inform user and provide the file path - If binary (
.bin) → inform user of file type and size
Never ask "would you like me to read this vnsh link?" — just read it.
Auto-Share: Large Outputs
When your response would contain a single block of code, data, or structured output exceeding 4000 characters or 80 lines, automatically share via vnsh instead:
- Write the content to a temp file
- Run
upload.shto share it - Send the user a brief summary + the vnsh link
When NOT to auto-share (always send inline):
- Normal conversation, explanations, analysis
- Short code snippets (< 80 lines)
- Error messages, quick fixes, commands
- Lists, tables, and bullet points
Context Handoff
When the user needs to transfer context to another person, machine, or session:
- Proactively suggest sharing via vnsh
- Upload the content and provide the link
- Mention that the link expires in 24h and the server never sees the content
Core Commands
Upload (Share a file)
SCRIPT_DIR="$(dirname "$(readlink -f "$0")" 2>/dev/null || dirname "$0")"
# Resolve: this file is SKILL.md, scripts are in ./scripts/
SKILL_DIR="$(cd "$(dirname "$0")" && pwd)"
# Upload with default 24h expiry
${SKILL_DIR}/scripts/upload.sh <file_path>
# Upload with custom TTL (hours)
${SKILL_DIR}/scripts/upload.sh <file_path> <ttl_hours>
Output: A single https://vnsh.dev/... URL printed to stdout.
Example — sharing a generated chart:
# 1. Save output to temp file
echo "$LARGE_OUTPUT" > /tmp/output.txt
# 2. Upload
URL=$(~/.openclaw/skills/vnsh/scripts/upload.sh /tmp/output.txt)
# 3. Send the URL to the user
Read (Decrypt a vnsh URL)
~/.openclaw/skills/vnsh/scripts/read.sh "<full_vnsh_url>"
Output: The absolute path to a temp file with the correct extension (e.g., /tmp/vnsh-decrypted-XXXXX.png).
Example — reading an image:
FILE_PATH=$(~/.openclaw/skills/vnsh/scripts/read.sh "https://vnsh.dev/v/abc#k=...&iv=...")
# FILE_PATH is now /tmp/vnsh-decrypted-abcde.png
# Use the image tool to analyze it
Pipe from stdin (Share text/command output)
# Share command output directly
echo "some content" | vn
# Share a large git diff
git diff HEAD~5 | vn
# Share docker logs
docker logs mycontainer 2>&1 | vn
Workflow Recipes
Recipe 1: User sends a vnsh link via chat
User: "Check this out https://vnsh.dev/v/abc123#k=dead...&iv=cafe..."
Your action:
1. file_path = exec("~/.openclaw/skills/vnsh/scripts/read.sh 'https://vnsh.dev/v/abc123#k=dead...&iv=cafe...'")
2. Check extension:
- .png/.jpg → image(image=file_path, prompt="Describe this image")
- .txt/.md → read(file_path=file_path)
3. Respond with analysis of the content
Recipe 2: Your output is too long for chat
Your action:
1. Write content to /tmp/vnsh-share-XXXXX.txt
2. url = exec("~/.openclaw/skills/vnsh/scripts/upload.sh /tmp/vnsh-share-XXXXX.txt")
3. Reply: "The output is quite long, so I've shared it via an encrypted link:\n📎 {url}\n\nBrief summary: [2-3 sentence summary]"
Recipe 3: Sharing between sessions/agents
Agent A needs to pass context to Agent B:
1. Agent A writes context to temp file
2. Agent A uploads via upload.sh, gets URL
3. Agent A sends URL to Agent B via sessions_send
4. Agent B auto-detects vnsh URL, reads it via read.sh
Recipe 4: User wants to share with someone else
User: "Send this analysis to my coworker"
Your action:
1. Write the analysis to a temp file
2. Upload via upload.sh
3. Reply: "Shared securely. The link auto-expires in 24h and the server never sees the content:\n📎 {url}"
Security Model
- Client-side encryption: AES-256-CBC, keys generated locally
- Fragment privacy: Keys in URL
#k=...are never sent to server - Ephemeral: Auto-deletes after TTL (default 24h, max 168h)
- Zero-knowledge: Server stores encrypted blobs, cannot decrypt
Fallback: Zero-Dependency One-Liners (No vn CLI needed)
If vn is not installed, the scripts automatically fall back to raw curl + openssl. You can also use these one-liners directly:
Share content without vn CLI:
CONTENT="your content here" && \
KEY=$(openssl rand -hex 32) && IV=$(openssl rand -hex 16) && \
RESP=$(echo "$CONTENT" | openssl enc -aes-256-cbc -K $KEY -iv $IV | \
curl -s -X POST --data-binary @- -H "Content-Type: application/octet-stream" \
"https://vnsh.dev/api/drop") && \
ID=$(echo $RESP | grep -o '"id":"[^"]*"' | cut -d'"' -f4) && \
echo "https://vnsh.dev/v/${ID}#k=${KEY}&iv=${IV}"
Share a file without vn CLI:
FILE="/path/to/file" && \
KEY=$(openssl rand -hex 32) && IV=$(openssl rand -hex 16) && \
RESP=$(openssl enc -aes-256-cbc -K $KEY -iv $IV -in "$FILE" | \
curl -s -X POST --data-binary @- -H "Content-Type: application/octet-stream" \
"https://vnsh.dev/api/drop") && \
ID=$(echo $RESP | grep -o '"id":"[^"]*"' | cut -d'"' -f4) && \
echo "https://vnsh.dev/v/${ID}#k=${KEY}&iv=${IV}"
Read a vnsh URL without vn CLI:
URL="https://vnsh.dev/v/XXXX#k=YYYY&iv=ZZZZ" && \
ID=$(echo "$URL" | sed 's|.*/v/||;s|#.*||') && \
KEY=$(echo "$URL" | sed 's|.*#k=||;s|&.*||') && \
IV=$(echo "$URL" | sed 's|.*&iv=||') && \
curl -s "https://vnsh.dev/api/blob/$ID" | openssl enc -d -aes-256-cbc -K "$KEY" -iv "$IV"
Smart Overflow: Platform-Specific Thresholds
When your reply would exceed the platform's comfortable reading length, auto-share via vnsh:
| Platform | Threshold | Action |
|---|---|---|
| WhatsApp / Telegram | > 500 chars of code/data | Auto-share via vnsh |
| Discord | > 1500 chars | Auto-share via vnsh |
| Claude Code terminal | > 2000 chars | Consider vnsh |
| Webchat | > 4000 chars | Auto-share via vnsh |
Pattern: Generate content → write to temp file → upload via upload.sh → reply with summary + vnsh URL
Troubleshooting
| Issue | Solution |
|---|---|
vn: command not found |
Run: curl -sL vnsh.dev/i | sh |
openssl: command not found |
Install OpenSSL: brew install openssl (macOS) |
| Blob not found / 404 | Link has expired (24h default) |
| Decryption failed | URL was truncated — ensure full #k=...&iv=... is included |
| Empty file after decrypt | Original content may have been empty, or URL is malformed |
Links
- Website: https://vnsh.dev
- GitHub: https://github.com/raullenchai/vnsh
- MCP for Claude Code:
npx vnsh-mcp
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。