mirror of
https://github.com/sipeed/NanoKVM.git
synced 2026-11-13 03:15:51 -06:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0dbf8c007f | ||
|
|
a24c1b0cef | ||
|
|
42dc6ad079 | ||
|
|
d670cf19a1 | ||
|
|
7fe7c49e65 | ||
|
|
5c1e617862 | ||
|
|
9ff9d59aa5 | ||
|
|
7556d154d3 | ||
|
|
df808da5d6 | ||
|
|
06bd869fb1 | ||
|
|
7343ca3811 |
54
CHANGELOG.md
Normal file
54
CHANGELOG.md
Normal file
@@ -0,0 +1,54 @@
|
||||
## 2.1.6 [6eb4a4e](https://github.com/sipeed/NanoKVM/commit/6eb4a4ea6254f465a47f9881d13934c686649061) (2025-02-14)
|
||||
|
||||
* feat: support downloading image from online URL (thanks to [@Itxaka](https://github.com/Itxaka))
|
||||
* feat: add keyboard shortcut `Ctrl+Alt+Del` (thanks to [@CaffeeLake](https://github.com/CaffeeLake))
|
||||
* fix: fix the CSRF issue
|
||||
* perf: add an option to configure custom ICE servers (thanks to [@VMFortress](https://github.com/VMFortress))
|
||||
* perf: removed unnecessary modifications to DNS configuration
|
||||
* perf: add an SSH enable/disable toggle in the web UI
|
||||
* perf: add a Tailscale enable/disable toggle in the web UI
|
||||
* perf: download Tailscale installation package from the official source
|
||||
* perf: automatic enable/disable GOMEMLIMIT on tailscale start/stop
|
||||
* perf: add JWT configuration
|
||||
* secretKey: customize secret key. If empty, generated a random 64-byte secret key by default
|
||||
* refreshTokenDuration: customize token expiration time
|
||||
* revokeTokensOnLogout: invalidate all JWT tokens on logout
|
||||
* perf: implement secure password storage using bcrypt hashing
|
||||
* perf: implement integrity checks for online updates
|
||||
* refactor: refactor HDMI module and remove the dependency `libmaixcam_lib.so`
|
||||
* refactor: web terminal use pty instead of SSH
|
||||
* refactor: move Tailscale APIs from the `network` module to the `extensions` module
|
||||
|
||||
## 2.1.5 [85f6447](https://github.com/sipeed/NanoKVM/commit/85f6447a16cc2591c6459b7d3dfda4d4cb75e98c) (2025-01-14)
|
||||
|
||||
* feat: add HDMI reset for NanoKVM-PCIe
|
||||
* fix: remove unnecessary lock acquisition during HID reset
|
||||
* refactor: refactor Tailscale
|
||||
|
||||
## 2.1.4 [d7ca7c4](https://github.com/sipeed/NanoKVM/commit/d7ca7c453d821ad099bf79b463969419041279cb) (2025-01-10)
|
||||
|
||||
* feat: support configuring OLED sleep settings
|
||||
* feat: support setting the `GOMEMLIMIT` environment variable
|
||||
* fix: fix Wi-Fi configuration
|
||||
* perf: password changes now update both the web user and the system root user
|
||||
* perf: add MAC address verification for Wake-on-LAN
|
||||
* refactor: a lot update to web UI
|
||||
* refactor: refactor Tailscale
|
||||
|
||||
## 2.1.3 [26078fe](https://github.com/sipeed/NanoKVM/commit/26078fe46e43d4543d7b09901b4992e4fbe4f01f) (2024-12-27)
|
||||
|
||||
* feat: add API to retrieve Wi-Fi information
|
||||
* fix: fix keyboard modifier keys
|
||||
* fix: update keyboard and mouse HID codes
|
||||
* fix: update hardware version information
|
||||
|
||||
## 2.1.2 [5a39562](https://github.com/sipeed/NanoKVM/commit/5a39562f2d32695933f4e7e86866136236cc9903) (2024-12-04)
|
||||
|
||||
* feat: add hardware version to configuration
|
||||
* feat: add Wi-Fi configuration support for NanoKVM-PCIe
|
||||
* perf: update web UI
|
||||
* chore: add dependency libraries
|
||||
|
||||
## 2.1.1 [74a303b](https://github.com/sipeed/NanoKVM/commit/74a303bd5cbb58f9d8ddd81abaaf4919dbbfb71b) (2024-11-06)
|
||||
|
||||
* feat: support h264
|
||||
32
README.md
32
README.md
@@ -20,6 +20,9 @@ English | [中文](./README_ZH.md) | [日本語](./README_JA.md)
|
||||
|
||||
## Opensource & Contribution
|
||||
|
||||
### Update 2025.02.14
|
||||
Newest APP v2.1.6 add most security enhancements&bug fix, recommend regular users upgrade to this version or newer.
|
||||
|
||||
### Update 2025.02.05
|
||||
For users concerned about security, you can read this issue: https://github.com/sipeed/NanoKVM/issues/301 , you will find explanations addressing all security concerns.
|
||||
GitHub, as an open and transparent platform, provides a space for discussing so-called "backdoor" concerns. Open-source makes products more secure!
|
||||
@@ -45,7 +48,7 @@ The NanoKVM Full is a full version with a sophisticated case and complete access
|
||||
| --- | --- | --- | --- |
|
||||
| Compute Units | LicheeRV Nano(RISCV) | LicheeRV Nano(RISCV) | CM4 (ARM) |
|
||||
| Resolution | 1080P @ 60fps | 1080P @ 60fps | 1080P @ 60fps |
|
||||
| Video encoding | MJPEG, H264(developing) | MJPEG, H264(developing) | MJPEG, H264 |
|
||||
| Video encoding | MJPEG, H264 | MJPEG, H264 | MJPEG, H264 |
|
||||
| Video delay | 90~230ms | 90~230ms | 100~230ms |
|
||||
| UEFI/BIOS | ✓ | ✓ | ✓ |
|
||||
| Virtual HID | ✓ | ✓ | ✓ |
|
||||
@@ -85,21 +88,28 @@ Note: Out of the 256MB memory in SG2002, 158MB is currently allocated for the mu
|
||||
|
||||
**Enhancements:**
|
||||
|
||||
- [ ] Refactor the HDMI module and remove the libmaixcam_lib.so dependency
|
||||
- [ ] Disable SSH by default and add an enable/disable toggle in the web UI
|
||||
- [ ] Disable Tailscale by default and add an enable/disable toggle in the web UI
|
||||
- [ ] Add JWT configuration options to the configuration file
|
||||
- [x] Refactor the HDMI module and remove the libmaixcam_lib.so dependency
|
||||
- [ ] Disable SSH by default ~~and add an enable/disable toggle in the web UI~~
|
||||
- [ ] Disable Tailscale by default ~~and add an enable/disable toggle in the web UI~~
|
||||
- [x] Add JWT configuration options to the configuration file
|
||||
- [x] Secure password storage with bcrypt
|
||||
|
||||
**Distribution:**
|
||||
|
||||
- [ ] Distribute applications via GitHub
|
||||
- [ ] Implement integrity checks for online updates
|
||||
- [x] Distribute applications via GitHub
|
||||
- [x] Implement integrity checks for online updates
|
||||
- [ ] Support offline updates
|
||||
|
||||
**Bug Fixes:**
|
||||
|
||||
- [ ] Fix the DNS issue
|
||||
- [ ] Fix the CSRF vulnerability
|
||||
- [x] Fix the DNS issue
|
||||
- [x] Fix the CSRF vulnerability
|
||||
|
||||
**Features**
|
||||
|
||||
- [ ] [79](https://github.com/sipeed/NanoKVM/issues/79) Support Zerotier
|
||||
- [ ] [99](https://github.com/sipeed/NanoKVM/issues/99) Support WireGuard
|
||||
- [ ] [249](https://github.com/sipeed/NanoKVM/issues/249) Add Mouse Jiggler
|
||||
|
||||
## Where to buy
|
||||
|
||||
@@ -107,11 +117,7 @@ Note: Out of the 256MB memory in SG2002, 158MB is currently allocated for the mu
|
||||
* [淘宝](https://item.taobao.com/item.htm?id=811206560480)
|
||||
* [Preorder (anyother country that not support in Aliexpress or Taobao)](https://sipeed.com/nanokvm)
|
||||
|
||||
|
||||
## Community
|
||||
|
||||
* [MaixHub Discussion](https://maixhub.com/discussion/nanokvm)
|
||||
* QQ group: 703230713
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ NanoKVM Fullは完全版で、洗練されたケースと完全なアクセサ
|
||||
| --- | --- | --- | --- |
|
||||
| 計算ユニット | LicheeRV Nano(RISCV) | LicheeRV Nano(RISCV) | CM4 (ARM) |
|
||||
| 解像度 | 1080P @ 60fps | 1080P @ 60fps | 1080P @ 60fps |
|
||||
| ビデオエンコーディング | MJPEG, H264(開発中) | MJPEG, H264(開発中) | MJPEG, H264 |
|
||||
| ビデオエンコーディング | MJPEG, H264 | MJPEG, H264 | MJPEG, H264 |
|
||||
| ビデオ遅延 | 90~230ms | 90~230ms | 100~230ms |
|
||||
| UEFI/BIOS | ✓ | ✓ | ✓ |
|
||||
| 仮想HID | ✓ | ✓ | ✓ |
|
||||
|
||||
@@ -33,7 +33,7 @@ NanoKVM Full 为完整版配置,带精致外壳和完整配件,内置开机
|
||||
| --- | --- | --- | --- |
|
||||
| 计算单元 | LicheeRV Nano(RISCV) | LicheeRV Nano(RISCV) | CM4 (ARM) |
|
||||
| 分辨率 | 1080P @ 60fps | 1080P @ 60fps | 1080P @ 60fps |
|
||||
| 视频编码 | MJPEG, H264(developing) | MJPEG, H264(developing) | MJPEG, H264 |
|
||||
| 视频编码 | MJPEG, H264 | MJPEG, H264 | MJPEG, H264 |
|
||||
| 视频延迟 | 90~230ms | 90~230ms | 100~230ms |
|
||||
| UEFI/BIOS | ✓ | ✓ | ✓ |
|
||||
| 模拟USB键鼠 | ✓ | ✓ | ✓ |
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -15,7 +15,7 @@ const AccountFile = "/etc/kvm/pwd"
|
||||
|
||||
type Account struct {
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
Password string `json:"password"` // should be named HashedPassword for clarity
|
||||
}
|
||||
|
||||
func GetAccount() (*Account, error) {
|
||||
@@ -40,10 +40,10 @@ func GetAccount() (*Account, error) {
|
||||
return &account, nil
|
||||
}
|
||||
|
||||
func SetAccount(username string, password string) error {
|
||||
func SetAccount(username string, hashedPassword string) error {
|
||||
account, err := json.Marshal(&Account{
|
||||
Username: username,
|
||||
Password: password,
|
||||
Password: hashedPassword,
|
||||
})
|
||||
if err != nil {
|
||||
log.Errorf("failed to marshal account information to json: %s", err)
|
||||
@@ -65,7 +65,7 @@ func SetAccount(username string, password string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func CompareAccount(username string, password string) bool {
|
||||
func CompareAccount(username string, plainPassword string) bool {
|
||||
account, err := GetAccount()
|
||||
if err != nil {
|
||||
return false
|
||||
@@ -75,16 +75,16 @@ func CompareAccount(username string, password string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
decryptedPassword, err := utils.DecodeDecrypt(password)
|
||||
if err != nil || decryptedPassword == "" {
|
||||
hashedPassword, err := utils.DecodeDecrypt(plainPassword)
|
||||
if err != nil || hashedPassword == "" {
|
||||
return false
|
||||
}
|
||||
|
||||
err = bcrypt.CompareHashAndPassword([]byte(account.Password), []byte(decryptedPassword))
|
||||
err = bcrypt.CompareHashAndPassword([]byte(account.Password), []byte(hashedPassword))
|
||||
if err != nil {
|
||||
// Compatible with old versions
|
||||
accountDecryptedPassword, _ := utils.DecodeDecrypt(account.Password)
|
||||
if accountDecryptedPassword == decryptedPassword {
|
||||
accountHashedPassword, _ := utils.DecodeDecrypt(account.Password)
|
||||
if accountHashedPassword == hashedPassword {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -104,10 +104,10 @@ func DelAccount() error {
|
||||
}
|
||||
|
||||
func getDefaultAccount() *Account {
|
||||
password, _ := bcrypt.GenerateFromPassword([]byte("admin"), bcrypt.DefaultCost)
|
||||
hashedPassword, _ := bcrypt.GenerateFromPassword([]byte("admin"), bcrypt.DefaultCost)
|
||||
|
||||
return &Account{
|
||||
Username: "admin",
|
||||
Password: string(password),
|
||||
Password: string(hashedPassword),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package auth
|
||||
import (
|
||||
"NanoKVM-Server/proto"
|
||||
"NanoKVM-Server/utils"
|
||||
"errors"
|
||||
"io"
|
||||
"os"
|
||||
"os/exec"
|
||||
@@ -70,7 +71,9 @@ func (s *Service) IsPasswordUpdated(c *gin.Context) {
|
||||
err = bcrypt.CompareHashAndPassword([]byte(account.Password), []byte("admin"))
|
||||
|
||||
rsp.OkRspWithData(c, &proto.IsPasswordUpdatedRsp{
|
||||
IsUpdated: err == nil,
|
||||
// If the hash is not valid, still assume it's not updated
|
||||
// The error we want to see is password and hash not matching
|
||||
IsUpdated: errors.Is(err, bcrypt.ErrMismatchedHashAndPassword),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -137,6 +137,12 @@ const ko = {
|
||||
input: 'MAC주소를 입력하세요.',
|
||||
ok: '확인'
|
||||
},
|
||||
download: {
|
||||
title: '이미지 다운로드',
|
||||
input: '원격 이미지 URL을 입력하세요.',
|
||||
ok: '확인',
|
||||
disabled: '/data 파티션이 읽기 전용(RO) 상태이므로 이미지를 다운로드할 수 없습니다.'
|
||||
},
|
||||
power: {
|
||||
title: '전원',
|
||||
reset: '리셋',
|
||||
@@ -144,12 +150,6 @@ const ko = {
|
||||
powerShort: '전원 (짧게 누르기)',
|
||||
powerLong: '전원 (길게 누르기)'
|
||||
},
|
||||
download: {
|
||||
download: '이미지 다운로드',
|
||||
input: '원격 이미지 URL을 입력하세요.',
|
||||
ok: '확인',
|
||||
disabled: '/data 파티션이 읽기 전용(RO) 상태이므로 이미지를 다운로드할 수 없습니다.'
|
||||
},
|
||||
settings: {
|
||||
title: '설정',
|
||||
about: {
|
||||
@@ -191,6 +191,10 @@ const ko = {
|
||||
description: 'Wi-Fi 설정',
|
||||
setBtn: '설정'
|
||||
},
|
||||
ssh: {
|
||||
description: 'SSH 원격 접속 활성화',
|
||||
tip: '활성화하기 전에 강력한 비밀번호를 설정하세요. (계정 - 비밀번호 변경)'
|
||||
},
|
||||
disk: '가상 디스크',
|
||||
diskDesc: '원격 호스트에서 가상 U-디스크를 마운트합니다.',
|
||||
network: '가상 네트워크',
|
||||
@@ -228,6 +232,7 @@ const ko = {
|
||||
account: '계정',
|
||||
logout: '로그아웃',
|
||||
logout2: '정말로 로그아웃 합니까?',
|
||||
uninstall: 'Tailscale 제거',
|
||||
okBtn: '예',
|
||||
cancelBtn: '아니오'
|
||||
},
|
||||
|
||||
@@ -134,6 +134,12 @@ const zh_tw = {
|
||||
input: '請輸入 MAC 位址',
|
||||
ok: '確定'
|
||||
},
|
||||
download: {
|
||||
title: '下载映像',
|
||||
input: '請輸入映像檔的下載URL',
|
||||
ok: '確定',
|
||||
disabled: '/data 為唯讀目錄,無法下載映像檔'
|
||||
},
|
||||
power: {
|
||||
title: '電源',
|
||||
reset: '重新啟動',
|
||||
@@ -182,6 +188,10 @@ const zh_tw = {
|
||||
description: '設定 Wi-Fi',
|
||||
setBtn: '設定'
|
||||
},
|
||||
ssh: {
|
||||
description: '啟用SSH',
|
||||
tip: '啟用前請務必設定強密碼(帳號 - 更改密碼)'
|
||||
},
|
||||
disk: '虛擬隨身碟',
|
||||
diskDesc: '在遠端主機上連接虛擬隨身碟',
|
||||
network: '虛擬網卡',
|
||||
@@ -219,6 +229,7 @@ const zh_tw = {
|
||||
account: '帳號',
|
||||
logout: '登出',
|
||||
logout2: '確認登出?',
|
||||
uninstall: '移除 Tailscale',
|
||||
okBtn: '確認',
|
||||
cancelBtn: '取消'
|
||||
},
|
||||
|
||||
@@ -68,7 +68,7 @@ export const Update = ({ setIsLocked }: UpdateProps) => {
|
||||
setErrMsg('');
|
||||
|
||||
window.location.reload();
|
||||
}, 6000);
|
||||
}, 10000);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user