FishCN Chat
LAN P2P encrypted chat right inside your VSCode terminal
藏在 VSCode 终端里的局域网加密聊天

English · 中文
English
Overview
FishCN Chat is a zero-config, zero-server LAN chat tool that lives entirely inside VSCode. Each conversation opens as a normal terminal tab. Everything is encrypted with AES-256-GCM. Designed for office colleagues who want to chat without leaving the IDE — and without IT noticing.
Features
- 🌐 Zero server, zero config — pure P2P over UDP multicast + TCP mesh
- 🔒 End-to-end encryption — AES-256-GCM with scrypt-derived keys; room password lives in VSCode SecretStorage
- 💬 Terminal-native UI — every chat is a separate terminal tab, just like multiple
npm run dev sessions
- 👥 Sidebar contacts — live list of LAN peers with online/offline status, rename, group chat
- 🏷️ Local aliases — set a private nickname for each peer that only you see
- 📨 Private messages — one-on-one conversations in their own terminals
- 🔔 Mentions —
@nickname triggers a notification
- 🛡️ Strict input validation — every field length-limited and sanitized; XSS / injection / OOM all blocked
- 🚪 Multiple rooms — share a password to form a private room
- ♻️ Auto reconnect — peers come and go, connections recover automatically
- 🪪 Privacy-first — no telemetry, no logs to disk, no internet access required
Requirements
|
|
| VSCode |
≥ 1.75 |
| OS |
Windows, macOS, Linux |
| Network |
Same LAN / WiFi |
| Firewall |
Allow VSCode/Node on Private network |
Install
From the marketplace:
ext install fishcn.fishcn-chat
Or from VSIX:
code --install-extension fishcn-chat-0.5.4.vsix
Quick Start
- Click the 💬 Code Sync icon in the activity bar
- Press the ▶ button or run Code Sync: Start
- Within 10 seconds, every other LAN peer with this extension appears in Contacts
- Click anyone (or 群聊 大厅 = Group Chat) → a new terminal tab opens for that conversation
- Type and press Enter to send
CODE SYNC
└─ CONTACTS [▶ Start] [👤 Nickname] [⟳]
├─ 💬 群聊 · 大厅 3 online
└─ 👥 在线用户 (2)
├─ 🟢 老王 192.168.1.5 ✏️
└─ 🟢 fe_22c1 2 unread ✏️
Chat Terminal
╔════════════════════════════════════════════╗
║ Code Sync · 私聊:老王 ║
║ 🔒 AES-256-GCM Encrypted · Enter to send ║
╚════════════════════════════════════════════╝
[12:34:01] <老王> Hello!
[12:34:05] <Me> Hi
> _
Keyboard:
| Key |
Action |
Enter |
Send |
↑ / ↓ |
Command history |
Ctrl+L |
Clear screen |
Ctrl+C |
Clear current input |
Backspace |
Delete (CJK-aware) |
Commands
| Command |
Description |
Code Sync: Start |
Start discovery and TCP listener |
Code Sync: Stop |
Disconnect everything |
Code Sync: Set My Nickname |
Change your displayed name |
Code Sync: Set Room Password |
Switch to a private encrypted room |
Code Sync: Clear Room Password |
Revert to public default room |
Code Sync: Show Logs |
Open the diagnostic output channel |
Security Model
- Transport encryption — every UDP discovery packet and every TCP message is encrypted with AES-256-GCM. Eavesdroppers without the room password cannot read or forge messages.
- Room isolation — two clients with different passwords cannot see each other at all (decrypt fails silently).
- Strict validation — every incoming field is sanitized: control characters stripped, lengths capped (4 KB text / 32 char nick), unknown types dropped.
- Connection-source restriction — TCP server only accepts connections from RFC1918 / link-local addresses; public IP attempts are dropped.
- WebView hardening (N/A in 0.5.x) — chat UI is a pseudoterminal, no HTML rendering = no XSS surface at all.
- Local data — only aliases are persisted, encrypted in VSCode
SecretStorage. No chat history is written to disk.
- No outbound — extension never opens an HTTPS connection, never reads files outside config.
Settings
| Setting |
Default |
Notes |
fishingLobby.nickname |
(empty) |
Per-window default nick; empty = random |
fishingLobby.discoveryPort |
45000 |
UDP multicast port (must match across peers) |
fishingLobby.autoStart |
false |
Auto-start on VSCode launch |
Troubleshooting
| Symptom |
Fix |
| Peers appear but send fails |
Windows Firewall blocks TCP inbound — allow VSCode / Node on Private networks. See logs via Code Sync: Show Logs |
| Two VSCode windows on same machine can't see each other |
Restart VSCode (selfId is per-process now; should work) |
| Across VLANs |
UDP multicast is L2-scoped; not supported by design |
| Cross-WiFi / cross-network |
Not supported — local network only |
Privacy
This extension does not:
- contact any remote server
- collect telemetry
- write chat history to disk
- read files outside
globalState / secretStorage
中文
简介
FishCN Chat 是一款隐藏在 VSCode 终端中的局域网加密聊天工具。零配置、零服务器、端到端加密。每个会话独立终端 tab,UI 完美融入开发环境,让你在不离开 IDE 的前提下和同事打字、传话、群聊。
功能
- 🌐 零服务器、零配置 — 纯 P2P,UDP 组播发现 + TCP 网状互联
- 🔒 端到端加密 — AES-256-GCM + scrypt 派生密钥;房间密码加密保存到 VSCode SecretStorage
- 💬 终端原生 UI — 每个聊天单独的终端 tab,跟开多个
npm run dev 体验一致
- 👥 侧边栏联系人 — 实时显示同网段在线用户,支持改名、群聊
- 🏷️ 本地备注名 — 给每个对端设私有备注名,仅自己可见
- 📨 私聊 — 一对一独立终端会话
- 🔔 @提醒 —
@昵称 触发系统通知
- 🛡️ 严格输入校验 — 字段长度限制、控制字符过滤;XSS / 注入 / OOM 攻击全防
- 🚪 多房间 — 共享密码 = 同一私密房间
- ♻️ 自动重连 — 对端掉线后自动重连
- 🪪 隐私优先 — 不上传任何数据、不写聊天日志、无外网请求
系统要求
|
|
| VSCode |
≥ 1.75 |
| 系统 |
Windows / macOS / Linux |
| 网络 |
同一局域网 / WiFi |
| 防火墙 |
放行 VSCode / Node 在「专用网络」 |
安装
从应用市场:
ext install fishcn.fishcn-chat
或离线 VSIX:
code --install-extension fishcn-chat-0.5.4.vsix
快速上手
- 左侧活动栏点 💬 Code Sync 图标
- 按 ▶ 启动 或运行命令 Code Sync: Start
- 10 秒内同网段其他装了本插件的用户出现在 Contacts 里
- 点用户或「群聊 大厅」→ 自动开一个终端 tab
- 输入文字回车发送
侧边栏
CODE SYNC
└─ CONTACTS [▶ 启动] [👤 改昵称] [⟳ 刷新]
├─ 💬 群聊 · 大厅 3 在线
└─ 👥 在线用户 (2)
├─ 🟢 老王 192.168.1.5 ✏️
└─ 🟢 fe_22c1 2 未读 ✏️
聊天终端
╔════════════════════════════════════════════╗
║ Code Sync · 私聊:老王 ║
║ 🔒 AES-256-GCM 加密 · Enter 发送 ║
╚════════════════════════════════════════════╝
[12:34:01] <老王> 在吗
[12:34:05] <我> 在
> _
按键:
| 按键 |
作用 |
Enter |
发送 |
↑ / ↓ |
历史命令 |
Ctrl+L |
清屏 |
Ctrl+C |
清当前输入 |
Backspace |
删除(中文双宽正确) |
命令面板
| 命令 |
说明 |
Code Sync: Start |
启动发现 + TCP 监听 |
Code Sync: Stop |
全断 |
Code Sync: Set My Nickname |
改自己被别人看到的昵称 |
Code Sync: Set Room Password |
切换到私有加密房间 |
Code Sync: Clear Room Password |
恢复默认公共房间 |
Code Sync: Show Logs |
打开诊断日志 |
安全机制
- 传输加密 — 所有 UDP 发现包和 TCP 消息全部 AES-256-GCM 加密,没密码的人抓包看到的是 base64 乱码且无法伪造(GCM tag 校验)
- 房间隔离 — 不同密码的客户端互相完全看不到(解密失败静默丢弃)
- 严格校验 — 控制字符过滤、长度上限(文本 4KB / 昵称 32 字符)、非法类型丢弃
- 来源限制 — TCP 仅接受私有网段(10/172.16-31/192.168/169.254/IPv6 ULA)连接,公网 IP 直接踢
- 本地数据 — 仅备注名持久化,加密存 SecretStorage;聊天记录不落盘
- 零外网 — 插件从不发起 HTTPS、不读取额外文件
配置
| 设置项 |
默认 |
说明 |
fishingLobby.nickname |
空 |
每窗口默认昵称;空 = 随机 |
fishingLobby.discoveryPort |
45000 |
UDP 组播端口(双方需一致) |
fishingLobby.autoStart |
false |
启动 VSCode 时自动运行 |
常见问题
| 现象 |
解决 |
| 能看到对方但发送失败 |
Windows 防火墙拦了 TCP 入站,控制面板放行 VSCode / Node 的「专用网络」;Code Sync: Show Logs 看 [drop] 日志 |
| 同机两个 VSCode 窗口互相看不到 |
重启 VSCode(0.5.2+ 已修) |
| 跨 VLAN |
UDP 组播是二层范围,设计上不支持 |
| 跨网络 / 跨 WiFi |
不支持,仅局域网 |
隐私
本插件不会:
- 联网任何远程服务器
- 收集任何遥测数据
- 把聊天记录写入磁盘
- 读
globalState / secretStorage 以外的文件
License
MIT © fishcn
Sister Extensions
- 📖 FishCN Reader — read TXT / EPUB / MD novels right in your VSCode terminal