#file-transfer #relay #server #peer #sockets #exchange #command-line-tool

bin+lib gday_server

Server that lets 2 peers exchange their socket addresses

3 unstable releases

0.2.1 Jul 12, 2024
0.2.0 Jul 8, 2024
0.1.1 Jun 7, 2024

#1567 in Command line utilities

Download history 14/week @ 2024-07-22 14/week @ 2024-09-16 13/week @ 2024-09-23 1/week @ 2024-09-30

142 downloads per month

MIT license

51KB
768 lines

Note: this crate is still in early-development, so expect breaking changes.

gday_server

Crates.io Version docs.rs

A server that runs the gday_contact_exchange_protocol.

Installation

To run the executable directly:

  1. Go to releases and download the correct file for your platform.
  2. Extract it (on Linux: tar xf <file>).
  3. Run it: ./gday_server

To install with cargo:

$ cargo install gday_server

To install with brew:

$ brew install manforowicz/tap/gday_server

Usage

Usage: gday_server [OPTIONS]

Options:
  -k, --key <KEY>                      PEM file of private TLS server key
  -c, --certificate <CERTIFICATE>      PEM file of signed TLS server certificate
  -u, --unencrypted                    Use unencrypted TCP instead of TLS
  -a, --address <ADDRESS>              Custom socket address on which to listen. [default: `[::]:2311` for TLS, `[::]:2310` when --unencrypted]
  -t, --timeout <TIMEOUT>              Number of seconds before a new room is deleted [default: 3600]
  -r, --request-limit <REQUEST_LIMIT>  Max number of requests an IP address can send in a minute before they're rejected [default: 60]
  -v, --verbosity <VERBOSITY>          Log verbosity. (trace, debug, info, warn, error) [default: info]
  -h, --help                           Print help
  -V, --version                        Print version

Deployment

One of the strengths of gday is its decentralized nature. Want to add your own server to the list of default servers? Here's how:

  1. Get a virtual private server (VPS) from a hosting service. It must have public IPv4 and IPv6 addresses and not be behind NAT.
  2. Buy/configure a domain name to point at your VPS.
  3. On the VPS, get a TLS certificate using certbot with your domain name.
  4. On the VPS, use a tool such as wget to download gday_server from the releases page.
  5. On the VPS, run the gday_server with the correct TLS arguments.
  6. On a local device, verify you can use gday with your server domain name passed as an argument.
  7. On the VPS, follow instructions in gday_server.service to set up a systemd service.
  8. Verify gday_server auto-starts in the background, even when you reboot the server.
  9. Submit an issue, asking for your server to be added to the default server list.
  • gday - Command line tool for sending files.

Depends on

Dependencies

~12–21MB
~390K SLoC