Release v4.0.0
PCLink 4.0.0 — Codename “Cortex”
⚠️ IMPORTANT: BREAKING CHANGES
This is a breaking version. Because of the massive structural changes in how the server manages configuration, permissions, and routing, a Factory Reset is highly recommended for a clean, stable start.
Please ensure you back up any critical configuration or data before updating, as this reset will clear old settings and re-initialize your server identity.
This release, “Cortex”, represents a massive architectural refactor. We have moved toward a modular, scalable router architecture and introduced granular permission management, headless pairing capabilities, and a safer, more robust server lifecycle.
🧠 Architectural Overhaul (The “Cortex” Core)
- Modular Router Architecture: The API has been reorganized into discrete
routers/(e.g.,auth,devices,pairing,transfers,websocket_routes), significantly improving maintainability and startup speed. - Permission Middleware: Introduced a powerful
service_enforcement_middlewarethat handles global "kill switches" and device-specific permission checks dynamically, preventing unauthorized access at the gateway level. - Websocket Manager: Centralized WebSocket lifecycle management for both Mobile and Web UI clients into a robust
ws_manager. - Headless Device Management: Added dedicated CLI commands (
pclink device ...) to list, revoke, ban, and assign roles to paired devices without needing the Web UI.
🚀 New Features
- Headless Pairing: You can now manage pairing requests directly from the CLI or via the
pairing/router API, perfect for headless/server-only deployments. - Permission Roles: Added predefined roles (
admin,viewer,media,remote,none) for bulk device permission assignment. - Hardware Blacklisting: Added a new
device bansystem to permanently block hardware IDs from re-pairing to your server. - Factory Reset: Added a secure, local-only Factory Reset feature via the Web UI to completely purge server data, auth credentials, and extensions when starting fresh.
- Headless-Friendly Notification Handlers: Improved notification dispatch for Linux/Windows to ensure trays and native toasts work reliably in background service contexts.
🛠 Improvements & Infrastructure
- Dependency Migration: Upgraded
pre-committo v4.6.0 and fully migrated fromflake8/isort/autoflaketo Ruff for high-performance linting and formatting. - Extension Hot-Loading: Added
extension_runtime_middlewareto allow hot-loading extensions on-demand if the manifest is found, without restarting the server. - Terminal Stability: Refactored terminal service logic into a dedicated router for better reliability.
- Robust Startup: Added a
StartupManagerclass to handle cross-platform boot persistence more reliably than legacy systemd scripts. - Pathing: Standardized path management for configuration and data files to prevent cross-platform issues.
🐛 Bug Fixes & Refactors
- Session Restoration: Fixed issues with transfer session recovery on startup; sessions now properly cleanup after a configurable threshold.
- XML Parsing: Fixed WebDAV-related XML parsing issues for more reliable phone file browsing.
- Logging: Introduced a
fatal.loghook to catch and persist crash traces in the config directory, aiding in debugging background service failures. - DPI Awareness: Added explicit DPI awareness settings for Windows to prevent blurry UI on high-resolution displays.
- Cleanup: Removed
controller.pyin favor of more direct, granular service interactions. - Security: Enforced local-only constraints for destructive operations like the Factory Reset to ensure the security of the host machine.
📦 Maintenance
- Updated
pyproject.tomldependencies. - Switched to a more consistent naming convention for build artifacts.
- Removed legacy
api_keyandportfiles; settings are now exclusively managed through the consolidatedconfig.json.
Note: Since version 4.0.0 introduces breaking changes, a Factory Reset is highly encouraged to ensure your server configuration is clean and compatible. Ensure your mobile app is updated to match your server version to maintain full feature compatibility.