Privately share folders using oneliner

2 min read • p2p, privacy

Problem

How to share folder between computers in any network in easy way without sending data to 3rd party (dropbox, wetransfer, google) ?

Assumptions:

  • privacy - no 3rd party can see data, data can go only via LAN or proxied Internet
  • easy - oneliner from terminal
  • fast - most efficient way - p2p

Solution

Requirements

  • nodejs
  • npm

Install package hyperspace/cli using npm.

npm install -g @hyperspace/cli

Usage

Sender

# Send zip file
cat archive.zip | hyp beam TOPIC

# List all files in FOLDER, then zip them to archive.zip, then send to anyone who knows passphrase TOPIC
grep -rl "abc" FOLDER | zip archive -@ && cat archive.zip | hyp beam TOPIC

# List all screenshots created at 12:5* , then zip them to archive.zip, then send to anyone who knows passphrase TOPIC
find ~/Pictures -name "*12-5*-*.png" -exec zip archive.zip {} ;  && cat archive.zip | hyp beam TOPIC

Receiver

# Receive file archive.zip using TOPIC as passphrase and unzip to current folder 
hyp beam TOPIC  > archive.zip && unzip archive.zip


Previous Post

About me

2 min read

header In top 20 of meteor developers based on Stackoverflow - https://stackoverflow.com/tags/meteor/topusers