Giter Site home page Giter Site logo

landhb / portal Goto Github PK

View Code? Open in Web Editor NEW
22.0 6.0 2.0 1.88 MB

A Secure file transfer utility & library. The library utilizes SPAKE2 for key negotiation over an insecure channel, and ChaCha20Poly1305 Authenticated Encryption to encrypt the file with the derived shared symmetric key. This enables two peers to transfer a file over any channel without needing to trust the intermediary relay.

License: Apache License 2.0

Rust 100.00%
spake2 file-sharing wormhole file-transfer chacha20-poly1305 rust

portal's Introduction

Portal

cargo-badge-lib docs-badge-lib license-badge rust-version-badge build codecov

Securely & quickly transport your files.

Client Install

cargo-badge-client

The client binary can be installed via Cargo:

cargo install portal-client

On the first run, a configuration file will be created in:

Platform Value Example
Linux $XDG_CONFIG_HOME or $HOME/.config /home/alice/.config/portal
macOS $HOME/Library/Application Support /Users/Alice/Library/Application Support/portal
Windows {FOLDERID_RoamingAppData} C:\Users\Alice\AppData\Roaming\portal

Note: The default relay is portal-relay.landhb.dev. Your peer must connect to the same portal-relay as you. You can also host your own relay and change the value to any domain/IP address in your config.

To send a file:

portal send /path/to/file

To receive a file:

portal recv

Relay Install

cargo-badge-relay

If you wish to run your own relay, you can install the binary on a server with:

cargo install portal-relay

Note: An example service file is included in the relay/ directory.

Development:

The repo is a cargo workspace with the following directory structure:

lib/        # implementation of the protocol
relay/      # relay server source
client/     # client source

You can run the binaries individually with:

# window 1
cargo run --bin portal-relay

# window 2
cargo run --bin portal -- recv

# window 3
cargo run --bin portal -- send [FILE]

Acknowledgements:

This tool was a quick early pandemic project to learn rust, and has similar ideas/functionality to Wormhole written by Brian Warner, he actually also contributed a large amount to the RustCrypto project's SPAKE2 implementation that Portal uses.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.