Coder Social home page Coder Social logo

jokeskay / browserextensionminerpoc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mine4acause/browserextensionminerpoc

0.0 0.0 0.0 90 KB

Here is a POC for adding a Monero hash miner as a Chrome Extension

License: GNU General Public License v3.0

HTML 2.97% JavaScript 96.63% Shell 0.40%

browserextensionminerpoc's Introduction

Mine4aCause POC

The proposal for Mine4aCause is to create a nonprofit organization that creates and manages a tool to engage with the communities of nonprofit organizations where members harnesses their excess browser CPU capacity to mine crypto-currency. All activity would be out in the open with an simple user experience to enable individuals to see the effect of their collective work while controlling the CPU utilization from none to extra-generous. This idea was inspired by projects like SETI@home and Folding@home with a further desire to put this kind of crypto-mining to serve a greater good.

The Tool

The proposed tool is a browser extension that will generate hashes against a specific organization's pool. Clearly, a functional website that enables partner organizations to run Mine4aCause campaigns will need to be built should there be enough interest in the project. Until then, this POC focuses on a very minimal Chrome browser plugin that enables Monero generation through CoinHive to generate hashes for the CoinHive XMR miner.

This tool can be found in the background-miner folder. Instructions on getting started are found in the Getting Started section. You'll install the tool in your Chrome browser and it will begin generating hashes for a Monero Pool right away.

The UI is accessible via the extension bar icon. Clicking on the Chrome icon for the Mine4aCause POC Extention will bring up a bare bones interface that identifies the hashing speed, progress and offers a slider to increase or lower the resource use of the extension.

Getting Started

To load an extension...

  1. Start by retrieving the coinhive js files locally; chrome extensions don't like loading things remotely - $ ./install-js
  2. Load the chrome extension page in your browser: chrome://extensions
  3. Check Developer mode on the top right
  4. Click on Load unpacked extention... then browse and select the background-miner folder to load it
  5. Click on the Enabled checkbox to enable the extension.

Other Tools

During the development of the POX extension, the following were also created.

  1. A docker based miner - update the Dockerfile with your own public site token (see below for instructions).
  2. A simple-ui miner that will load in a page (just load simple-miner.html)
  3. A chrome browser extension simple-miner that will mine while it is open (follow the same instructions to load the POC extension)

To build and run the docker image...

$ docker build --rm -t coin-hive
$ docker run --rm coin-hive

NB! You won't really see tremendous performance out of this since it essentially runs a browser within the container. Update your Docker settings to allow your containers to use more CPU if you would like to get more out of it.

Future Work

  1. Enable the POC to remember its power settings
  2. Build a website to demonstrate campaign integration with stats per organization
  3. Update the UI
  4. Investigate Coin Hive Stratum as a solution to reducing payment fees.
  5. Consider writing an opensource replacement for coinhive.js

Thanks!

Special thanks to Juan Cazala and his coin-hive project.

browserextensionminerpoc's People

Contributors

leopoldodonnell avatar

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.