fix: Use latest dartssh2 and add a switch for temperature between celsius and millicelsius (#1095)

* refactor(sftp): Optimize file download logic and SSH command execution handling

Replace manual chunked downloads with a more concise `sftp.download` method
Consistently use `utf8.decode` to process SSH command output

Remove redundant code and comments, and simplify the logic

* chore: Update `dartssh2` submodule

* feat (Temperature Display): Added an option to switch between degrees Celsius and millicelsius

Allows users to switch temperature units in server settings, resolving the issue of incorrect temperature display on some devices

* chore: Add a participnt

* fix(sftp): Fixed a resource leak issue during file downloads and SSH command execution

Ensured that remote and local file handles are properly closed during file downloads to prevent resource leaks. Additionally, improved error handling during SSH command execution to ensure that all streams are either successfully completed or properly handled in the event of an error.
This commit is contained in:
GT610
2026-04-01 11:27:58 +08:00
committed by GitHub
parent 36851ef1c2
commit 3c592baf2c
36 changed files with 211 additions and 102 deletions

View File

@@ -187,6 +187,7 @@
"softWrap": "Soft wrap",
"specifyDev": "Specify device",
"specifyDevTip": "For example, network traffic statistics are by default for all devices. You can specify a particular device here.",
"tempIsCelsiusTip": "When enabled, the temperature value will be treated as Celsius instead of millicelsius. Turn on only if the temperature displays incorrectly (e.g., showing 0.1°C instead of 58°C).",
"speed": "Speed",
"spentTime": "Spent time: {time}",
"sshConfigAllExist": "All servers already exist ({duplicateCount} duplicates found)",

View File

@@ -187,6 +187,7 @@
"softWrap": "自动换行",
"specifyDev": "指定设备",
"specifyDevTip": "例如网络流量统计默认是所有设备,你可以在这里指定特定的设备",
"tempIsCelsiusTip": "开启后温度值将被视为摄氏度而非毫摄氏度。仅在温度显示不正确时开启例如显示0.1°C而非58°C。",
"speed": "速度",
"spentTime": "耗时:{time}",
"sshConfigAllExist": "所有服务器已存在(发现 {duplicateCount} 个重复项)",