💾 Archived View for gmi.noulin.net › markdown › tuyau_NOTES.md captured on 2024-08-25 at 06:56:04.
⬅️ Previous capture (2023-07-10)
-=-=-=-=-=-=-
- reduce repeated code: create macros and functions - create tests - send errors from server to client - make daemon - add timeouts in server to close the connection when a client is too slow ..- tls ..- check inputs, add limits ..- add rate limiter, ban wrong token for 15minutes ..- create packages Speed (no tls) 158MB tuyau 2.744s scp 3.896s # to root path x./sclient.c NOTES.md dev x./sclient.c ~/notes.txt dev # to path x./sclient.c NOTES.md dev:tuyauTest/ # new name x./sclient.c NOTES.md dev:tuyauTest/ger.md ## receive x./sclient.c dev:NOTES.md x./sclient.c dev:NOTES.md ../ x./sclient.c dev:NOTES.md test.txt //cp file tuyau://ip/path 0 frame send file: 1 byte command 8 bytes token 2 bytes file name length <filename> 2 bytes file mode/permissions 2 bytes path length <path> - optional 8 bytes data size <data> 1 frame mkdir 1 byte command 8 bytes token 2 bytes file mode/permissions 2 bytes path length <path> 2 frame receive file: 1 byte command 8 bytes token 2 bytes path in server length <path in server> > client/server requests client > command reponse < server 1 byte - 0 ok/1 error <data> port 1032 ..- mkdir ..- send files with glob ..- send files recursive ..- receive files, glob ..- receive files recursive //- list files in path ..- token, home directory ..- server name ip port in config ..- config home ~/.tuyau/config.yml --- alias: hostname: ip token: QE123123 root: /home/USER/tmp/ port: 1022 ~/.tuyau/serverConfig.yml --- port: 1023 // optional user: token: QE123123 root: /home/USER/tmp/