tftp: update readme + small py2 fix

This commit is contained in:
ed 2024-02-12 05:39:54 +01:00
parent acbb8267e1
commit 02879713a2
2 changed files with 10 additions and 5 deletions

View file

@ -947,19 +947,24 @@ known client bugs:
## tftp server ## tftp server
a TFTP server (read/write) can be started using `--tftp 3969` (you probably want [ftp](#ftp-server) instead unless you are *actually* communicating with hardware from the 80s (in which case we should definitely hang some time)) a TFTP server (read/write) can be started using `--tftp 3969` (you probably want [ftp](#ftp-server) instead unless you are *actually* communicating with hardware from the 90s (in which case we should definitely hang some time))
> that makes this the first RTX DECT Base that has been updated using copyparty 🎉
* based on [partftpy](https://github.com/9001/partftpy) * based on [partftpy](https://github.com/9001/partftpy)
* no accounts; read from world-readable folders, write to world-writable, overwrite in world-deletable
* needs a dedicated port (cannot share with the HTTP/HTTPS API) * needs a dedicated port (cannot share with the HTTP/HTTPS API)
* run as root to use the spec-recommended port `69` (nice) * run as root to use the spec-recommended port `69` (nice)
* no accounts; read from world-readable folders, write to world-writable, overwrite in world-deletable * can reply from a predefined portrange (good for firewalls)
* only supports the binary/octet/image transfer mode (no netascii)
* [RFC 7440](https://datatracker.ietf.org/doc/html/rfc7440) is **not** supported (will be extremely slow over WAN) * [RFC 7440](https://datatracker.ietf.org/doc/html/rfc7440) is **not** supported (will be extremely slow over WAN)
* expect ~1100 KiB/s over 1000BASE-T, 400~500 KiB/s over wifi, ~200 on bad wifi
some recommended TFTP clients: some recommended TFTP clients:
* windows: `tftp.exe` (you probably already have it) * windows: `tftp.exe` (you probably already have it)
* linux: `tftp-hpa`, `atftp` * linux: `tftp-hpa`, `atftp`
* `tftp 127.0.0.1 3969 -v -m binary -c put initrd.bin` * `tftp 127.0.0.1 3969 -v -m binary -c put firmware.bin`
* `curl` (read-only) * `curl tftp://127.0.0.1:3969/firmware.bin` (read-only)
## smb server ## smb server

View file

@ -57,7 +57,7 @@ class Tftpd(object):
self.asrv = hub.asrv self.asrv = hub.asrv
self.log = hub.log self.log = hub.log
_hub.clear() _hub[:] = []
_hub.append(hub) _hub.append(hub)
lg.setLevel(logging.DEBUG if self.args.tftpv else logging.INFO) lg.setLevel(logging.DEBUG if self.args.tftpv else logging.INFO)