💾 Archived View for gmi.noulin.net › gitRepositories › tuyau › file › README.md.gmi captured on 2023-01-29 at 11:23:35. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

tuyau

Log

Files

Refs

README

README.md (2035B)

     1 This is a client/server program for copying files between computer.
     2 It supports only 1 client at a time.
     3 
     4 It works like the cp command and copies the directories recursively.
     5 
     6 # install
     7 ```
     8 spm -g install tuyau tuyauServer
     9 ```
    10 
    11 # configuration
    12 In server, create ~/.tuyau/serverConfig.yml
    13 ```
    14 ---
    15   port: 1033 // optional
    16   ausername(string):
    17     token: 8 random non zero 8 bit values
    18     root: apath(home)
    19 ```
    20 In client, create ~/.tuyau/config.yml
    21 ```
    22 ---
    23   ausername(string, this is the server name):
    24     hostname: ip // server ip
    25     token: 8 random non zero 8 bit values, same as server config
    26     port: 1032
    27 ```
    28 
    29 # usage
    30 - start server
    31 - run client
    32 
    33 Example configuration:
    34 ```
    35 # client
    36 # ~/.tuyau/config.yml
    37 ---
    38   serverName:
    39     hostname: ip
    40     token: QE123123
    41     root: /home/USER/tmp/
    42     port: 1032
    43 # server
    44 ~/.tuyau/serverConfig.yml
    45 ---
    46   port: 1032 // optional
    47   serverName:
    48     token: QE123123
    49     root: /home/USER/tmp/
    50   relay:
    51     hostname: ip
    52     token: a2345678
    53     port: 1032
    54 ```
    55 
    56 Start server on remote machine:
    57 ```
    58 # create a certificate for the server (before first start)
    59 openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365 -nodes -subj '/CN=your_fqdn'
    60 tuyauServer
    61 ```
    62 
    63 Upload files:
    64 ```
    65 tuyau files serverName
    66 tuyau files serverName:path/
    67 tuyau file serverName:path/newfilename
    68 ```
    69 
    70 Upload files using `serverName` as a relay to the machine called `relay`:
    71 ```
    72 tuyau files relay
    73 ```
    74 
    75 Downdload files (globbing is supported):
    76 ```
    77 tuyau serverName:path/files
    78   >> downloads to current directory
    79 tuyau serverName:path/files path/
    80 tuyau serverName:path/file path/newfilename
    81 ```
    82 
    83 Download files for the machine called `relay` using `serverName` as a relay:
    84 ```
    85 tuyau relay:path/files
    86 ```
    87 
    88 # Commits
    89 1 - send a single file
    90 2 - send files and directories recursively
    91 3 - receive a single file
    92 4 - receive files and directories recursively
    93 
    94 The send code in the client is similar to the send code in the server.
    95 The receive code in the server is similar to the receive code in the client.