Giter Club home page Giter Club logo

p2pvps-client's Introduction

P2P VPS - Client

What is P2P VPS?

P2P VPS aspires to create a peer-to-peer (P2P) marketplace offering Virtual Private Servers (VPS), similar to Digital Ocean or Vultr. This would also be similar to co-location services like Raspberry Pi Hosting or Mythic Beasts. However, instead of using a data center, the marketplace would use an array of pseudo-anonymous IoT devices (like the Raspberry Pi) hosted by people participating in the marketplace. Anyone with an internet connection and a device capable of running Docker can rent that device in the P2P VPS marketplace.

While the applications of such a network are similar, the P2P VPS marketplace will never have the speed or reliability of the commercial outfits linked above. Instead, the focus of P2P VPS is to create a decentralized network of anonymous web servers, capable of delivering websites or web apps, in order to prevent censorship and promote free speech.

Members participating in the marketplace can earn cryptocurrency by renting out their device, while helping to create a more decentralized internet at the same time. That's the focus of the P2P VPS network. In this way, the P2P VPS software is censorship-fighting software similar to, but very different from, TOR.

For more information, read the full documentation

About This Repository

This repository is the client-side software needed to turn a computer into a VPS. By 'computer' we mean any computer. An old laptop, a Virtual Machine (VM) running on a desktop, or even an Internet of Things (IoT) device like a Raspberry Pi. Any computer capable of running Docker. The P2P VPS software is composed of three software packages:

  1. The Client software runs on any computer and allows the device to be rented on the marketplace.
  2. The Server software includes the database models, REST APIs, website content, and Vue.js marketplace app.
  3. Server Deployment is a collection of Docker containers used to easily deploy copies of the Server.

This repository contains The Client.

Installation

  • This repository currently targets two different types of hardware: One targets the Raspberry Pi. The other targets Ubuntu 16.04 environment running in a VirtualBox VM.

  • Each target of the Client has two versions. The simple client is the simplest possible client. You should install this client first before moving on to the more complex flash client. The flash client builds on top of the simple client by adding sudo privileges and persistent storage.

  • Installation Instructions:

File Layout

  • The client directory contains various implementations of the P2P VPS Client code, targeting different hardware. Within each implementation are the following sub-directories:

    • The simple directory creates the simplest possible client. It will set up a reverse SSH connection with no persistent storage and the user will not have sudo privileges. It's the simplest, most limited, way to create a VPS that can be rented out on P2P VPS. This client is primarily used for testing.

    It is best to build this client first, before moving on to a more complex version of the client.

    • the flash-storage directory creates a more complex Client by adding sudo privileges and persistent storage.

License

(The MIT License)

Copyright (c) 2018 Chris Troutner and P2P VPS Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

p2pvps-client's People

Contributors

christroutner avatar vaelinn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

p2pvps-client's Issues

Website Source Code?

Aye, where is the website source code? Is it not published?

Sorry, to clutter the Git. Wasn't sure where else to put this.

Feature | Support Debian

Feature: Support Debian + Install Instructions
Why?: Debian is by far the most popular GNU/Linux OS (including forks)
It is basically standard at this point.

Persist session through reboots

Currently the client shells are not capable of rebooting themselves. I need to look into that and fix it. Also, from previous testing, I know that rebooting or power cycling the Host machine will wipe out the rental session. The Client should be able to be rebooted and restore the rental session after reboot.

Create speed test

The client currently does not detect or report on its own internet speed. A program should be launched during the registration process that run a small speed test and reports on the internet connectivity speed.

Report Device Stats

Node.js provides a core 'os' package that allows easy reporting of statistics on the CPU and memory:
https://nodejs.org/api/os.html

The scope of this issue is to integrate this API into the P2P VPS Client software to reliably report on device statistics.

Report Local IP

Frequently IoT devices are plugged into a LAN and it's not easy to lookup the IP address of the device. The scope of this issue is to 1) detect the local LAN ip address during registration then 2) uploading this IP address to the P2P VPS server.

If the client-side part of this issue is implemented, it would allow users to retrieve the local LAN IP address of the device from the P2P VPS Dashboard. That would make it trivial to look up the local IP, to manage the device over SSH.

There are several NPM libraries for detecting the local IP address of the device. A well-maintained library should be used instead of reinventing the wheel.

Add support for Rasberry Pi V.1

Hi,

I run the simple-client installation like mentioned here and arriving at this point (4) had some problems:

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -

Because of Raspberry Pi V.1 (arm6) I had to install node manually.
No problem, did it like this:

wget https://nodejs.org/dist/latest/node-v10.5.0-linux-armv6l.tar.gz
tar -xvf node-v10.5.0-linux-armv6l.tar.gz
cd node-v10.5.0-linux-armv6l
sudo cp -R * /usr/local/

OK, installation went on fine until point 15:

node p2p-vps-client.js

The script ( I think it is write-files.js ) starts and runs the first steps successfully, but then stops at the same point with the same message mention before (4) and I tried modifing the write-files.js script changing the node install part like mentioned above - but this time no luck!
So I can't get a docker instance running until now, without solving that issue. Don't think it should be a big coding problem?

Thanks!

Regards

RPi needs a better way to mount USB flash

The current scheme is to use the /etc/fstab file in order to mount the USB flash drive on boot. This is a sketchy way of mounting the flash drive as any hiccup with stop the Pi from booting and will effectively brick it.

The scope of this issue is to find a better way to mount the flash drive after the OS has finished booting. Some scheme that is more fault tolerant and can report a status to the server like 'Flash drive could not be mounted!'.

P2P VPS Dashboard

Unable to delete owned devices, set up in error.
Click on red Delete button. Confirm deletion and nothing happens.

Refactor expiration code into a common library

The code that handles the detection of the expiration date could be moved to a new library file that is shared by all the different versions of the Client code. That would make updates a lot easier.

Report Memory

The client currently does not report it's memory. A subfunction should be created to execute free -h and parse the output to report on the total memory and free memory of the device.

VM flash-shell does not wipe storage

The persistent storage does not actually get wiped by the current VM flash-shell client. Can't have people renting devices with other peoples old info on it.

Feature | Support Parabola

Feature: Support Parabola.
Objective: Add install steps and support for Parabola GNU/Linux.
Why?: Parabola is the most supported free'd operating system among SoC(s).
It is one of the few lightweight OSes to support the BBB and they seem to be the go-to OS for RISC-V projects like the EOMA68.


Want to support this issue? Post a bounty on it! We accept bounties via BountySource.
Bountysource

Update Guide to Block Local Networks

The guides instructing the user on how to set up a firewall to protect their local network from rented clients needs to be updated to include this list of local network addresses:

  "/ip4/10.0.0.0/ipcidr/8",
  "/ip4/100.64.0.0/ipcidr/10",
  "/ip4/169.254.0.0/ipcidr/16",
  "/ip4/172.16.0.0/ipcidr/12",
  "/ip4/192.0.0.0/ipcidr/24",
  "/ip4/192.0.0.0/ipcidr/29",
  "/ip4/192.0.0.8/ipcidr/32",
  "/ip4/192.0.0.170/ipcidr/32",
  "/ip4/192.0.0.171/ipcidr/32",
  "/ip4/192.0.2.0/ipcidr/24",
  "/ip4/192.168.0.0/ipcidr/16",
  "/ip4/198.18.0.0/ipcidr/15",
  "/ip4/198.51.100.0/ipcidr/24",
  "/ip4/203.0.113.0/ipcidr/24",
  "/ip4/240.0.0.0/ipcidr/4"

This list comes from this IPFS guide

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.