mirror of
https://github.com/sipeed/NanoKVM.git
synced 2026-09-11 09:26:44 -05:00
- H.264 WebRTC: Refactored to significantly reduce video latency - H.264 Direct: Optimized data transmission; data parsing now continues correctly even when the tab is in the background - MJPEG: Refactored to ensure the correct data length is sent Bug Fixes - Fixed an issue where certain keyboard modifier keys were not recognized - Fixed vertical mouse cursor drift when the page is zoomed in or out Optimizations - Optimized HID write logic and updated the HID reset mechanism - Added support for deleting images - Added a Swap Memory option to the Tailscale page - Added a confirmation dialog when uninstalling Tailscale to prevent accidental removal - Improved the logic for updating the web page title - Improved the UI for the Clipboard, Settings, Image Mounting, and App Update pages Security - Added a mandatory delay after failed login attempts to prevent brute-force attacks - Updated dependencies to patch known security vulnerabilities
NanoKVM Frontend
This is NanoKVM web project. For more documentation, please refer to the Wiki.
Structure
src
├── api // backend api
├── assets // static resources
├── components // public components
├── i18n // language resources
├── jotai // Global jotai variables
├── lib // util libs
├── pages // web pages
│ ├── auth // login and password
│ ├── desktop // remote desktop
│ └── terminal // web terminal
├── router.tsx // routers
└── types // types
Local Development
Development requires SSH. You can enable it in the Web Settings:
Settings > SSH.
Due to CORS restrictions, authentication needs to be disabled during local development.
To develop authentication features, you need to build the project and test in NanoKVM.
- Log in to NanoKVM via SSH:
ssh root@your-nanokvm-ip(default password is root). - Open the configuration file
/etc/kvm/server.yaml/and addauthentication: disable. ⚠️CAUTION: This option disables all authentication and should NOT be enabled in production environment! - Restart the service:
/etc/init.d/S95nanokvm restart. - Edit the
.env.developmentfile and changeVITE_SERVER_IPto your NanoKVM IP address. - Run
pnpm devto start the server and visit http://localhost:3001/ in browser.
It's recommended to disable browser caching to avoid access issues during development:
- Open the browser Developer Tools;
- Go to the
Networktab; - Check
Disable cacheoption; - Refresh the page.
Deployment
Build:
cd web
pnpm install
pnpm build
- After the compilation is complete, the
distfolder will be generated. - Rename the folder to
web. - Upload
webto/kvmapp/server/in NanoKVM. - Restart the service by executing
/etc/init.d/S95nanokvm restartin NanoKVM.
Tips:
- File uploads requires SSH. You can enable it in the Web Settings:
Settings > SSH. - Browser may have old version cache. If you can't open the page, try a force refresh or clear the cache.