You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+65-1Lines changed: 65 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,8 @@ Async Python client for [NanoKVM](https://github.com/sipeed/NanoKVM).
8
8
from nanokvm.client import NanoKVMClient
9
9
from nanokvm.models import GpioType, MouseButton
10
10
11
-
asyncwith NanoKVMClient("http://kvm-8b76.local/api/") as client:
11
+
# NanoKVM (auto-detects password mode)
12
+
asyncwith NanoKVMClient("https://kvm.local/api/") as client:
12
13
await client.authenticate("username", "password")
13
14
14
15
# Get device information
@@ -50,3 +51,66 @@ disk = await ssh.run_command("df -h /")
50
51
51
52
await ssh.disconnect()
52
53
```
54
+
55
+
### Password Obfuscation Modes
56
+
57
+
By default, the client **auto-detects** the correct password mode. It tries obfuscated password first, and falls back to plain text if authentication fails. You can also force a specific mode:
58
+
59
+
```python
60
+
# Auto-detect (default) — recommended
61
+
asyncwith NanoKVMClient("https://kvm.local/api/") as client:
62
+
await client.authenticate("username", "password")
63
+
64
+
# Force plain text (newer NanoKVM with HTTPS)
65
+
asyncwith NanoKVMClient(
66
+
"https://kvm.local/api/",
67
+
use_password_obfuscation=False
68
+
) as client:
69
+
await client.authenticate("username", "password")
70
+
71
+
# Force obfuscation (older NanoKVM with HTTP)
72
+
asyncwith NanoKVMClient(
73
+
"http://kvm.local/api/",
74
+
use_password_obfuscation=True
75
+
) as client:
76
+
await client.authenticate("username", "password")
77
+
```
78
+
79
+
## HTTPS/SSL Configuration
80
+
81
+
The client supports HTTPS connections with flexible SSL/TLS configuration options.
82
+
83
+
### Standard HTTPS (Let's Encrypt, Public CA)
84
+
85
+
For modern NanoKVM devices with HTTPS and valid certificates:
86
+
87
+
```python
88
+
asyncwith NanoKVMClient("https://kvm.local/api/") as client:
89
+
await client.authenticate("username", "password")
90
+
```
91
+
92
+
### Self-Signed Certificates
93
+
94
+
For self-signed certificates, you have two options:
0 commit comments