goshare

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 8 Imported by: 0

README

GoShare

GoShare is a command line tool for sharing files through multiple relays.

Demo

goshare with two relays

Installation

Make sure you have Go installed on your system.
Clone the repository

git clone https://github.com/mbrostami/goshare.git

Build the binary

go build -o goshare

Run the binary

./goshare

Usage

Sharing files

To share a file, use the following command:

goshare share -f <path/to/file> -r relay1:2022 -r relay1:2030 

The above command gives you a key code that needs to be shared with receiver in order to download the file.

Receiving files

Use the following command to receive the file:

goshare receive -k KEY_CODE_FROM_SENDER
Server Configuration

To configure the server, you can provide the following options:

goshare relay --port 2202 --ip localhost
TLS enabled
Generate Certificate

Skip this step if you already have certificate.
You can use cert command to generate self-signed key.pem and cert.pem files.

goshare cert --host localhost --dst ./cert/

The above command will create two files in ./cert/ directory.

Enable TLS on server:
goshare relay --port 2202 --ip localhost --with-tls --cert-path ./cert/
Enable TLS on clients (sender and receiver):
goshare receive -k KEY_CODE_FROM_SENDER --with-tls 
goshare share -f <path/to/file> -r relay1:2022 -r relay2:2030 --with-tls

By default the above command will use system's root CA set. In other cases use ca-path as below:
Use ca-path to specify the CA's certificate that has been used to sign the server's self-signed certificate.

goshare receive -k KEY_CODE_FROM_SENDER --with-tls --ca-path ./cert/cert.pem 
goshare share -f <path/to/file> -r relay1:2022 -r relay2:2030 --with-tls --ca-path ./cert/cert.pem

To skip the certificate verification in clients, you can use --skip-verify option (NOT recommended)

Todo

  • STUN

License

This project is licensed under the MIT License - see the LICENSE file for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
cmd
internal
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL