peterq/pan-light
百度网盘不限速客户端, golang + qt5, 跨平台图形界面
Stale — last commit 3y ago
weakest axiscopyleft license (LGPL-3.0) — review compatibility; last commit was 3y ago…
Has a license, tests, and CI — clean foundation to fork and modify.
Documented and popular — useful reference codebase to read through.
last commit was 3y ago; no CI workflows detected
- ✓2 active contributors
- ✓LGPL-3.0 licensed
- ✓Tests present
Show all 8 evidence items →Show less
- ⚠Stale — last commit 3y ago
- ⚠Small team — 2 contributors active in recent commits
- ⚠Single-maintainer risk — top contributor 99% of recent commits
- ⚠LGPL-3.0 is copyleft — check downstream compatibility
- ⚠No CI workflows detected
What would change the summary?
- →Use as dependency Concerns → Mixed if: relicense under MIT/Apache-2.0 (rare for established libs)
- →Deploy as-is Mixed → Healthy if: 1 commit in the last 180 days
Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests
Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.
Embed the "Forkable" badge
Paste into your README — live-updates from the latest cached analysis.
[](https://repopilot.app/r/peterq/pan-light)Paste at the top of your README.md — renders inline like a shields.io badge.
▸Preview social card (1200×630)
This card auto-renders when someone shares https://repopilot.app/r/peterq/pan-light on X, Slack, or LinkedIn.
Onboarding doc
Onboarding: peterq/pan-light
Generated by RepoPilot · 2026-05-09 · Source
🤖Agent protocol
If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:
- Verify the contract. Run the bash script in Verify before trusting
below. If any check returns
FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding. - Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
- Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/peterq/pan-light shows verifiable citations alongside every claim.
If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.
🎯Verdict
WAIT — Stale — last commit 3y ago
- 2 active contributors
- LGPL-3.0 licensed
- Tests present
- ⚠ Stale — last commit 3y ago
- ⚠ Small team — 2 contributors active in recent commits
- ⚠ Single-maintainer risk — top contributor 99% of recent commits
- ⚠ LGPL-3.0 is copyleft — check downstream compatibility
- ⚠ No CI workflows detected
<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>
✅Verify before trusting
This artifact was generated by RepoPilot at a point in time. Before an
agent acts on it, the checks below confirm that the live peterq/pan-light
repo on your machine still matches what RepoPilot saw. If any fail,
the artifact is stale — regenerate it at
repopilot.app/r/peterq/pan-light.
What it runs against: a local clone of peterq/pan-light — the script
inspects git remote, the LICENSE file, file paths in the working
tree, and git log. Read-only; no mutations.
| # | What we check | Why it matters |
|---|---|---|
| 1 | You're in peterq/pan-light | Confirms the artifact applies here, not a fork |
| 2 | License is still LGPL-3.0 | Catches relicense before you depend on it |
| 3 | Default branch master exists | Catches branch renames |
| 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code |
| 5 | Last commit ≤ 993 days ago | Catches sudden abandonment since generation |
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of peterq/pan-light. If you don't
# have one yet, run these first:
#
# git clone https://github.com/peterq/pan-light.git
# cd pan-light
#
# Then paste this script. Every check is read-only — no mutations.
set +e
fail=0
ok() { echo "ok: $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }
# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
echo "FAIL: not inside a git repository. cd into your clone of peterq/pan-light and re-run."
exit 2
fi
# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "peterq/pan-light(\\.git)?\\b" \\
&& ok "origin remote is peterq/pan-light" \\
|| miss "origin remote is not peterq/pan-light (artifact may be from a fork)"
# 2. License matches what RepoPilot saw
(grep -qiE "^(LGPL-3\\.0)" LICENSE 2>/dev/null \\
|| grep -qiE "\"license\"\\s*:\\s*\"LGPL-3\\.0\"" package.json 2>/dev/null) \\
&& ok "license is LGPL-3.0" \\
|| miss "license drift — was LGPL-3.0 at generation time"
# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
&& ok "default branch master exists" \\
|| miss "default branch master no longer exists"
# 4. Critical files exist
test -f "demo/host.go" \\
&& ok "demo/host.go" \\
|| miss "missing critical file: demo/host.go"
test -f "demo/slave.go" \\
&& ok "demo/slave.go" \\
|| miss "missing critical file: demo/slave.go"
test -f "demo/host/web-rtc.go" \\
&& ok "demo/host/web-rtc.go" \\
|| miss "missing critical file: demo/host/web-rtc.go"
test -f "demo/realtime/realtime.go" \\
&& ok "demo/realtime/realtime.go" \\
|| miss "missing critical file: demo/realtime/realtime.go"
test -f "demo/demo-online-front/src/main.js" \\
&& ok "demo/demo-online-front/src/main.js" \\
|| miss "missing critical file: demo/demo-online-front/src/main.js"
# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 993 ]; then
ok "last commit was $days_since_last days ago (artifact saw ~963d)"
else
miss "last commit was $days_since_last days ago — artifact may be stale"
fi
echo
if [ "$fail" -eq 0 ]; then
echo "artifact verified (0 failures) — safe to trust"
else
echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/peterq/pan-light"
exit 1
fi
Each check prints ok: or FAIL:. The script exits non-zero if
anything failed, so it composes cleanly into agent loops
(./verify.sh || regenerate-and-retry).
⚡TL;DR
pan-light is an unlimited-speed Baidu Netdisk (百度网盘) client built in Go + Qt5 with cross-platform GUI, implementing high-concurrency segmented downloads via goroutines, local proxy to bypass anti-hotlinking, and online demo via WebRTC-enabled Docker VNC streaming. It demonstrates Go's suitability for GUI applications, event dispatch, WebSocket, and P2P long connections. Multi-platform monolith: Go backend (/ root contains main application logic), Qt5 QML UI layer, and separate Vue.js web frontend in demo/demo-online-front/ for browser-based remote control. The online demo architecture spans Go backend → WebRTC signaling → Docker VM host with VNC server → noVNC JavaScript client (in src/lib/vnc/core/) for remote desktop streaming.
👥Who it's for
Go developers learning real-world GUI client architecture, backend engineers interested in P2P networking and event scheduling patterns, and end-users seeking unlimited-speed Baidu cloud storage downloads without VIP restrictions.
🌱Maturity & risk
Early-stage experimental project (author's first substantial Go application). The codebase is functionally complete with main features working but explicitly acknowledges loose typing (heavy use of map[string]interface{}), missing synchronization locks on low-contention data, and lack of strict type safety. No visible CI/CD setup, test coverage data, or recent commit activity shown; primarily educational rather than production-hardened.
Single-maintainer project with acknowledged code quality debt and architectural shortcuts taken for learning purposes. Heavy reliance on Baidu API (subject to blocking/throttling as author experienced with VIP account bans), minimal error handling in type assertions, and lack of automated testing. The online demo infrastructure (Docker VNC + WebRTC bridge) adds operational complexity and single-point failure risk.
Active areas of work
Project appears relatively dormant; README indicates author is busy and seeking community PRs, mentions multiple forks without pull requests, and acknowledges recent user influx overloading the single shared VIP account (causing Baidu API bans). No recent milestone or active development signals visible in the provided data.
🚀Get running
Check README for instructions.
Daily commands:
Web frontend dev: cd demo/demo-online-front && npm run dev (Vue CLI serve). Production build: npm run build (outputs to dist/). Main desktop client: requires Qt5 + Go toolchain; build command likely go build or qmake (QMake file present at root), exact invocation not documented in excerpt.
🗺️Map of the codebase
demo/host.go— Entry point for the host service that manages P2P connections, WebRTC setup, and remote instance coordinationdemo/slave.go— Entry point for the slave executor that runs inside Docker containers and manages VNC/video playback for remote instancesdemo/host/web-rtc.go— Core WebRTC signaling and P2P connection establishment for tunneling between user browser and Docker instancesdemo/realtime/realtime.go— Real-time event dispatch system that coordinates messages between host, slave, and web clientsdemo/demo-online-front/src/main.js— Vue.js frontend entry point that initializes the UI framework, routing, and global state managementdemo/demo-online-front/src/lib/vnc/core/rfb.js— RFB protocol implementation for VNC communication, critical for remote desktop rendering in the browserdemo/demo-online-front/src/realtime/webRtc.js— Client-side WebRTC peer connection handler that establishes P2P tunnels and manages data channels
🛠️How to make changes
Add a new remote command executor on the slave
- Define a new command handler struct in demo/slave/executor/executor.go with a Process() method (
demo/slave/executor/executor.go) - Register the handler in the command router inside executor.go's init or handler registration function (
demo/slave/executor/executor.go) - Update the host's WebSocket agent to route the command to the correct slave instance (
demo/host/ws-agent.go)
Add a new UI component for remote instance management
- Create a new .vue component file in demo/demo-online-front/src/comp/ with template, script, and style sections (
demo/demo-online-front/src/comp/layout.vue) - Import and register the component in the parent layout component (
demo/demo-online-front/src/comp/layout.vue) - Connect the component to real-time events via demo/demo-online-front/src/realtime/realtime.js subscription (
demo/demo-online-front/src/realtime/realtime.js)
Add a new VNC encoding decoder
- Create a new decoder module in demo/demo-online-front/src/lib/vnc/core/decoders/{encoding}.js with a decode() function (
demo/demo-online-front/src/lib/vnc/core/decoders/raw.js) - Register the decoder in demo/demo-online-front/src/lib/vnc/core/encodings.js with a unique encoding number (
demo/demo-online-front/src/lib/vnc/core/encodings.js) - Update the RFB protocol handler to call the new decoder when the encoding type is received (
demo/demo-online-front/src/lib/vnc/core/rfb.js)
Add a new event type for real-time messaging
- Define the event structure and marshal/unmarshal logic in demo/realtime/realtime.go (
demo/realtime/realtime.go) - Add a broadcast or targeted send method in the event dispatcher (
demo/realtime/realtime.go) - Subscribe to the new event in frontend via demo/demo-online-front/src/realtime/realtime.js (
demo/demo-online-front/src/realtime/realtime.js)
🔧Why these technologies
- Golang with goroutines — Lightweight concurrency for managing many simultaneous P2P connections, WebSocket agents, and Docker instance coordinators without thread overhead
- Vue.js 2.6 frontend — Reactive component framework for managing real-time UI state and simplifying event-driven updates from WebSocket/WebRTC streams
- WebRTC for P2P tunneling — Enables direct browser-to-Docker instance connections without exposing public IPs; NAT traversal via STUN/TURN
- VNC protocol (RFB) — Standardized remote desktop protocol for rendering GUI and capturing keyboard/mouse input over networks
- Docker containers — Isolates multiple virtual machine instances on a single host; enables rapid provisioning and cleanup of user sessions
- WebSocket for real-time messaging — Persistent bidirectional connection for event delivery, instance status updates, and command signaling
⚖️Trade-offs already made
-
Browser-based VNC client written in JavaScript
- Why: Allows instant web-based experience without client installation; leverages existing web technologies
- Consequence: Higher CPU usage for decoding/rendering; limited to browser capabilities; potential performance degradation with high frame rates or large resolutions
-
P2P WebRTC tunneling instead of centralized proxy
- Why: Reduces bandwidth on host server; direct peer connections for lower latency; privacy (traffic not relayed through server)
- Consequence: More complex signaling logic; NAT/fire
🪤Traps & gotchas
Baidu API is rate-limited and actively blocks excessive requests (author's VIP account was banned); concurrent download tuning via settings is required to avoid hard throttling. The online demo relies on idle personal PCs running Docker + VNC + reverse tunnel connectivity—network partition or host reboot breaks user sessions. QML/Qt5 build requires native compilation and Qt SDK installation, not pure Go. The Vue frontend uses legacy v2.6 (not v3); transpilation and polyfills via Babel are present. VNC decoder implementations assume specific data formats without robust error handling.
🏗️Architecture
💡Concepts to learn
- Goroutine-based concurrent segmented downloads — Core feature of pan-light allowing bypass of Baidu's single-connection speed limits; understanding goroutine pools and work distribution is essential to tuning download performance
- RFB (Remote Frame Buffer) protocol — The VNC protocol underlying the online demo's remote desktop streaming; knowledge of encoding negotiation (tight, hextile, RRE) and framebuffer update handling is needed to debug rendering issues
- WebRTC P2P signaling and STUN/TURN traversal — The online demo uses WebRTC to establish direct P2P tunnels between idle PCs and web clients; understanding connection establishment and NAT hole-punching is critical for debugging connection failures
- Local proxy and anti-hotlinking bypass — pan-light runs a local HTTP proxy to rewrite Baidu CDN requests and bypass referrer-based access control, allowing video playback in Qt; understanding proxy patterns and HTTP header manipulation is needed to maintain this capability
- Persistent state serialization for resume capability — Downloads are checkpointed to disk across application restarts; understanding serialization format, atomic writes, and recovery logic is essential for fixing resume bugs
- VNC encoding algorithms (Tight, Hextile, RRE, Raw) — The online demo supports multiple VNC framebuffer compression schemes; recognizing trade-offs between latency and bandwidth is needed to optimize remote desktop responsiveness
- cgo and Qt5 FFI (Foreign Function Interface) — The desktop client bridges Go and Qt5 C++ code; understanding cgo marshaling, memory ownership, and signal/slot bridging is critical for extending GUI functionality
🔗Related repos
syncthing/syncthing— Go-based cross-platform desktop sync client demonstrating mature patterns for GUI integration, file watching, and P2P protocols in Gogetlantern/lantern— Go + Qt GUI for network tunneling, showing production-grade concurrent connection management and cross-platform build setupnovnc/noVNC— Canonical browser-based VNC client library that inspired or is similar to the custom VNC decoder implementation indemo/demo-online-front/src/lib/vnc/qbittorrent/qBittorrent— Qt5 + C++ BitTorrent client showing mature patterns for segmented downloads, persistent state, and cross-platform compilation relevant to pan-light's architecturecloudreve/Cloudreve— Modern Go cloud storage client with similar Baidu API integration challenges, demonstrating alternative solutions for API rate-limiting and download management
🪄PR ideas
To work on one of these in Claude Code or Cursor, paste:
Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.
Add GitHub Actions CI/CD workflow for demo-online-front Vue.js build validation
The demo-online-front directory is a Vue.js project with build and lint scripts defined, but there's no CI pipeline to validate PRs. This is critical for a web frontend that users access at https://pan-light.peterq.cn/demo. A workflow would catch build failures, linting errors, and dependency issues before merge.
- [ ] Create .github/workflows/demo-frontend-ci.yml to run 'npm install' and 'npm run build' on every PR
- [ ] Add linting step with 'npm run lint' in the workflow
- [ ] Configure Node.js version matrix (test against Node 12+) since package.json uses older Vue 2.6.6 and babel-eslint
- [ ] Add dependency security scanning step (npm audit) to catch vulnerable packages like the outdated core-js ^2.6.5
Document the demo-online-front VNC implementation and websocket proxy architecture
The codebase contains a sophisticated custom VNC client (demo/demo-online-front/src/lib/vnc/) with WebSocket proxying (ProxyWebSocket.js, RtcWebSocket.js) that enables the online experience feature. This architecture is not documented anywhere in README.md or as inline comments, making it difficult for new contributors to understand or extend the remote desktop streaming capability.
- [ ] Create demo/demo-online-front/VNC_ARCHITECTURE.md explaining the VNC decoder chain (raw.js, hextile.js, tight.js, tightpng.js, copyrect.js, rre.js)
- [ ] Document the WebSocket abstraction layer (ProxyWebSocket.js vs RtcWebSocket.js) and when each is used
- [ ] Add code comments to demo/demo-online-front/src/lib/vnc/core/rfb.js explaining the RFB protocol handshake flow
- [ ] Reference this documentation in the main README.md under the '在线体验原理' section which is currently incomplete
Add unit tests for VNC decoder modules to prevent regressions in video streaming
The custom VNC decoder implementations (tight.js, tightpng.js, hextile.js, raw.js) handle binary protocol parsing and decompression. These are mission-critical for the online demo experience but have zero visible test coverage. A single regression here breaks the entire remote desktop viewing feature for all online users.
- [ ] Create demo/demo-online-front/tests/unit/vnc/decoders/ directory structure
- [ ] Add demo/demo-online-front/tests/unit/vnc/decoders/raw.decoder.spec.js with test fixtures for raw pixel data
- [ ] Add demo/demo-online-front/tests/unit/vnc/decoders/tight.decoder.spec.js testing JPEG/PNG decompression paths using pako vendor library
- [ ] Configure Jest in demo/demo-online-front/package.json and update npm scripts to include 'npm run test' coverage
🌿Good first issues
- Add TypeScript or JSDoc type annotations to
demo/demo-online-front/src/lib/vnc/core/rfb.jsand decoders to replace implicit type assumptions and improve maintainability for contributors unfamiliar with VNC protocol. - Implement comprehensive unit tests for VNC decoders (
demo/demo-online-front/src/lib/vnc/core/decoders/*.js) using mock frame data, currently lacking test coverage and making regression detection difficult. - Document the Docker + WebRTC + VNC architecture in a
docs/ARCHITECTURE_ONLINE_DEMO.mdfile with sequence diagrams, since the README mentions the system design but provides no developer reference guide for extending or debugging the remote control pipeline.
📝Recent commits
Click to expand
Recent commits
867eee7— Merge pull request #72 from iris-contrib/master (peterq)4118b35— Update to Iris version 12 (kataras)00444dd— change: 修改Client type (peterq)482eb09— change: 修改客户端 ua, 增加提示:关闭vip通道 (peterq)baf2180— fix demo: host进程6分钟强制关闭容器 (peterq)13dd38a— fix demo: docker 容器启动失败导致实例一直处于启动中状态, 无法继续提供服务 (peterq)652d7ec— update readme (peterq)e4f3a04— add doc: 增加评论 (peterq)b0254f3— Merge branch 'demo' (peterq)e6643bf— update readme (peterq)
🔒Security observations
- High · Outdated Vue.js Framework Version —
demo/demo-online-front/package.json. The project uses Vue.js 2.6.6, which is significantly outdated and may contain known security vulnerabilities. Vue 2 reached end-of-life and critical security patches are no longer released. Fix: Upgrade to Vue 3 (latest stable version) or at minimum ensure all dependencies are updated to their latest versions. Run 'npm audit' to identify known vulnerabilities. - High · Outdated Core-JS Dependency —
demo/demo-online-front/package.json. core-js version 2.6.5 is outdated and no longer maintained. This polyfill library has known security issues and compatibility problems. Fix: Upgrade to core-js 3.x or implement native ES2020+ features without polyfills if targeting modern browsers. - High · Outdated ESLint and Babel Dependencies —
demo/demo-online-front/package.json. ESLint 5.8.0, Babel 7.x (implied), and related tools are significantly outdated. These may have unpatched security vulnerabilities and lack important bug fixes. Fix: Update all dev dependencies to latest stable versions: @vue/cli-service, babel-eslint, eslint, eslint-plugin-vue, and vue-template-compiler. - Medium · Use of Webpack Obfuscator in Dependencies —
demo/demo-online-front/package.json. The inclusion of webpack-obfuscator (0.18.0) suggests code obfuscation in production builds, which may hide security issues and complicate security audits. Additionally, this version is outdated. Fix: Evaluate if obfuscation is necessary. If needed, use modern, actively maintained alternatives. Remove if not critical to application functionality. - Medium · Missing Content Security Policy (CSP) —
demo/demo-online-front/public/index.html, demo/demo-online-front/vue.config.js. No evidence of Content Security Policy headers configured in the Vue.js application. This increases XSS vulnerability risk. Fix: Implement CSP headers in vue.config.js with restrictive policies. Configure meta tags in index.html for browser CSP enforcement. - Medium · Potential XSS Vulnerability in VNC Implementation —
demo/demo-online-front/src/lib/vnc/core/display.js. The custom VNC implementation in demo/demo-online-front/src/lib/vnc/ includes DOM manipulation and display rendering. Without proper sanitization, this could be susceptible to XSS attacks if untrusted data is processed. Fix: Audit all DOM manipulation in the VNC library. Use Vue's built-in XSS protection. Sanitize any external data before rendering. Consider using a maintained VNC library. - Medium · No HTTPS/TLS Configuration Visible —
demo/demo-online-front/vue.config.js. The vue.config.js file does not show HTTPS configuration. WebSocket connections (used for VNC and chat) over HTTP are vulnerable to man-in-the-middle attacks. Fix: Configure Vue CLI to use HTTPS in development. Ensure all production deployments use TLS/SSL. Update WebSocket connections to use WSS (WebSocket Secure). - Medium · Unvalidated WebSocket Communication —
demo/demo-online-front/src/lib/vnc/core/ProxyWebSocket.js, demo/demo-online-front/src/realtime/. Multiple WebSocket implementations (ProxyWebSocket.js, RtcWebSocket.js) and custom realtime modules lack visible input validation and sanitization. Fix: Implement strict input validation for all WebSocket messages. Sanitize data before processing. Use message authentication codes (MAC) or digital signatures for critical operations. - Medium · Missing Security Headers Configuration —
demo/demo-online-front/vue.config.. No evidence of security headers (X-Frame-Options, X-Content-Type-Options, Referrer-Policy, etc.) in the application configuration. Fix: undefined
LLM-derived; treat as a starting point, not a security audit.
👉Where to read next
- Open issues — current backlog
- Recent PRs — what's actively shipping
- Source on GitHub
Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.