portal-relay

Crates.ioportal-relay
lib.rsportal-relay
version0.5.0
sourcesrc
created_at2022-03-28 02:53:14.463571
updated_at2023-10-14 23:40:36.773827
descriptionThe relay for Portal, a secure file transfer protocol.
homepagehttps://github.com/landhb/portal
repositoryhttps://github.com/landhb/portal
max_upload_size
id557540
size52,774
Bradley Landherr (landhb)

documentation

https://docs.rs/portal-client

README

portal-relay

This crate contains the relay application for Portal - An encrypted file transfer utility.

For the client utility go to:

Installation

cargo install portal-relay

When run the binary listens on TCP port 13265 to broker connections between clients.

Diagram of Key Derivation

Demo

Creating a Service on Alpine

First build a static relay binary and transfer it to the alpine system, then add a user for the service:

cross build --bin portal-relay --target x86_64-unknown-linux-musl --release

# upload and copy the binary to /sbin/portal-relay
chmod +x /sbin/portal-relay
useradd relay -M -N --system -s /sbin/nologin

On alpine linux you can setup a simple service file vi /etc/init.d/relay:

#!/sbin/openrc-run

command=/sbin/portal-relay
command_user="relay"
supervisor="supervise-daemon"

depend() {
        need net localmount
}

Then add the service to the default run-level to start on boot:

chmod +x /etc/init.d/relay
rc-update add relay

List services to verify the relay was enabled:

rc-status

Then start the service:

/etc/init.d/relay start
Commit count: 96

cargo fmt