commit 9a958895231bf44ec5a0155bcbde3d9f450ad20a
parent 923dbe6fa93261fd6cd871a13b56701bafd4b604
Author: Daniel Barlow <dan@telent.net>
Date: Sat, 31 Jan 2026 21:22:43 +0000
update android client to use key
Diffstat:
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/client/README.md b/client/README.md
@@ -13,5 +13,9 @@ is Android) install Termux and Termux:Gui from the F-Droid repository,
```sh
$ termux-setup-storage
-$ pip install zeroconf
+$ pkg install binutils make libsodium
+$ SODIUM_INSTALL=system pip install pynacl zeroconf
```
+
+* you also need to copy `privkey.bin` from wherever you built the
+Rust app onto the phone
diff --git a/client/android.py b/client/android.py
@@ -5,6 +5,8 @@ import termuxgui as tg
import threading
import time
import sys
+from nacl.signing import SigningKey
+
hosts = {}
@@ -15,6 +17,8 @@ def add_host(activity, name, parent):
hosts[name] = button
return button
+with open("privkey.bin", "rb") as f:
+ signing_key = SigningKey(f.read(), encoder=RawEncoder)
with tg.Connection() as c:
a = tg.Activity(c)
@@ -68,7 +72,7 @@ with tg.Connection() as c:
threading.Thread(target = self.fake_host_add, daemon = True).start()
- client = GuiClient()
+ client = GuiClient(signing_key)
def update_byte_counter():
while True:
diff --git a/client/eculocate.py b/client/eculocate.py
@@ -1,6 +1,5 @@
#!/data/data/com.termux/files/usr/bin/python
-# import termuxgui as tg
import time
import sys
import socket