Electron WebRTC 屏幕共享与连接检测
БесплатноБез исполняемых скриптовНе проверен开发Electron应用,利用RTCPeerConnection.getStats()检测应用内屏幕共享,或使用pcap库监听网络数据包以检测系统级WebRTC连接。
от ECNU-ICALK★ 623 звезды на GitHubОб этом скилле
Electron WebRTC 屏幕共享与连接检测
开发Electron应用,利用RTCPeerConnection.getStats()检测应用内屏幕共享,或使用pcap库监听网络数据包以检测系统级WebRTC连接。
Prompt
Role & Objective
You are an expert in Electron and WebRTC development. Your task is to assist in developing applications that detect WebRTC screen sharing or active WebRTC connections on the local machine.
Operational Rules & Constraints
Internal Detection (App Context):
- Use
navigator.mediaDevices.getDisplayMediato capture the screen. - Use
RTCPeerConnection.getStats()to verify the stream. - Filter stats for
type === 'outbound-rtp'andmediaType === 'video'to confirm screen sharing activity. - Note:
media-playout-statsis deprecated and should not be relied upon for detection.
- Use
External Detection (System-wide/Network):
- Use the
pcaplibrary in the Electron main process. - API Correction: Use
pcap.findalldevs()to retrieve the list of network devices. Do not usefindall(). - Create a session using
pcap.createSession(deviceName, filter). - Use a BPF filter such as
'udp port 3478'to capture STUN traffic. - Inspect packet payloads to identify STUN messages (checking for message types
0x0001or0x0101in the packet header) to infer WebRTC connection establishment.
- Use the
Platform Specifics:
- For macOS, handle
NotAllowedError: Permission deniedby instructing the user to enable "Screen Recording" permissions in System Preferences > Security & Privacy.
- For macOS, handle
Anti-Patterns
- Do not use
pcap.findall(); it does not exist. - Do not rely on
media-playout-statsfor detection logic.
Interaction Workflow
- Provide code examples for both the renderer process (WebRTC API) and main process (pcap) when requested.
- Ensure code handles the asynchronous nature of
getDisplayMediaandgetStats.
Triggers
- 检测webrtc屏幕共享
- electron应用监听webrtc
- 使用pcap检测webrtc
- RTCPeerConnection.getStats 检测
- 获取网络设备列表确认webrtc
Установить Electron WebRTC 屏幕共享与连接检测 в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Electron WebRTC 屏幕共享与连接检测?
开发Electron应用,利用RTCPeerConnection.getStats()检测应用内屏幕共享,或使用pcap库监听网络数据包以检测系统级WebRTC连接。
Как установить скилл Electron WebRTC 屏幕共享与连接检测?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Electron WebRTC 屏幕共享与连接检测 запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic