💾 Archived View for gmi.noulin.net › markdown › tuyau_README.md captured on 2024-08-25 at 06:56:06.
⬅️ Previous capture (2023-07-10)
-=-=-=-=-=-=-
This is a client/server program for copying files between computer. It supports only 1 client at a time. It works like the cp command and copies the directories recursively. # install
spm -g install tuyau tuyauServer
# configuration In server, create ~/.tuyau/serverConfig.yml
---
port: 1033 // optional
ausername(string):
token: 8 random non zero 8 bit values
root: apath(home)
In client, create ~/.tuyau/config.yml
---
ausername(string, this is the server name):
hostname: ip // server ip
token: 8 random non zero 8 bit values, same as server config
port: 1032
# usage - start server - run client Example configuration:
---
serverName:
hostname: ip
token: QE123123
root: /home/USER/tmp/
port: 1032
~/.tuyau/serverConfig.yml
---
port: 1032 // optional
serverName:
token: QE123123
root: /home/USER/tmp/
relay:
hostname: ip
token: a2345678
port: 1032
Start server on remote machine:
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365 -nodes -subj '/CN=your_fqdn'
tuyauServer
Upload files:
tuyau files serverName
tuyau files serverName:path/
tuyau file serverName:path/newfilename
Upload files using `serverName` as a relay to the machine called `relay`:
tuyau files relay
Downdload files (globbing is supported):
tuyau serverName:path/files
>> downloads to current directory
tuyau serverName:path/files path/
tuyau serverName:path/file path/newfilename
Download files for the machine called `relay` using `serverName` as a relay:
tuyau relay:path/files
# Commits 1 - send a single file 2 - send files and directories recursively 3 - receive a single file 4 - receive files and directories recursively The send code in the client is similar to the send code in the server. The receive code in the server is similar to the receive code in the client.