💾 Archived View for gmi.noulin.net › gitRepositories › tuyau › file › NOTES.md.gmi captured on 2023-07-10 at 18:13:23. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-01-29)
-=-=-=-=-=-=-
NOTES.md (1582B)
1 - reduce repeated code: create macros and functions 2 - create tests 3 - send errors from server to client 4 - make daemon 5 - add timeouts in server to close the connection when a client is too slow 6 ..- tls 7 ..- check inputs, add limits 8 ..- add rate limiter, ban wrong token for 15minutes 9 ..- create packages 10 11 12 Speed (no tls) 13 158MB 14 tuyau 2.744s 15 scp 3.896s 16 17 18 # to root path 19 x./sclient.c NOTES.md dev 20 x./sclient.c ~/notes.txt dev 21 # to path 22 x./sclient.c NOTES.md dev:tuyauTest/ 23 # new name 24 x./sclient.c NOTES.md dev:tuyauTest/ger.md 25 26 ## receive 27 x./sclient.c dev:NOTES.md 28 x./sclient.c dev:NOTES.md ../ 29 x./sclient.c dev:NOTES.md test.txt 30 31 //cp file tuyau://ip/path 32 33 0 frame send file: 34 1 byte command 35 8 bytes token 36 2 bytes file name length 37 <filename> 38 2 bytes file mode/permissions 39 2 bytes path length 40 <path> 41 - optional 42 8 bytes data size 43 <data> 44 45 1 frame mkdir 46 1 byte command 47 8 bytes token 48 2 bytes file mode/permissions 49 2 bytes path length 50 <path> 51 52 2 frame receive file: 53 1 byte command 54 8 bytes token 55 2 bytes path in server length 56 <path in server> 57 58 59 > client/server requests 60 client > command 61 reponse < server 1 byte - 0 ok/1 error 62 <data> 63 64 port 1032 65 66 ..- mkdir 67 ..- send files with glob 68 ..- send files recursive 69 ..- receive files, glob 70 ..- receive files recursive 71 //- list files in path 72 ..- token, home directory 73 ..- server name ip port in config 74 ..- config home ~/.tuyau/config.yml 75 --- 76 alias: 77 hostname: ip 78 token: QE123123 79 root: /home/USER/tmp/ 80 port: 1022 81 ~/.tuyau/serverConfig.yml 82 --- 83 port: 1023 // optional 84 user: 85 token: QE123123 86 root: /home/USER/tmp/