GithubHelp home page GithubHelp logo

ctubio / php-proxy-stratum Goto Github PK

View Code? Open in Web Editor NEW
42.0 4.0 38.0 56 KB

ReactPHP stratum+tcp proxy between miners and pools with database and frontend.

License: MIT License

PHP 72.19% Shell 27.81%
stratum-proxy bitcoin mining stratum-tcp reactphp proxy

php-proxy-stratum's Introduction

php-proxy-stratum

ReactPHP stratum+tcp proxy between miners and pools with database and minimal web interface.

Used to demostrate how pools steal your hash by renaming worker names and redirecting the hashrate.

Used² to recommend you to mine only on trusted (self owned!) pools.

Basically it may be run with the following command (remember first to install dependencies with $ composer):

$ php bin/php-proxy-stratum-daemon.php

Or use the init script:

 $ sudo cp dist/init.sh /etc/init.d/php-proxy-stratum
 $ sudo chmod +x /etc/init.d/php-proxy-stratum
 $ sudo update-rc.d php-proxy-stratum defaults
 $ sudo update-rc.d php-proxy-stratum enable
 $ sudo service php-proxy-stratum start

And feel free to connect your miners at port 3333, also you can configure your webserver with pub/ as the document root and php-proxy-stratum.php as the index file.

The mining and all other configurations are hardcoded, please review/modify the daemon code before run it.

Currently the web interface features auto refresh and pool switch; a snapshot may look like (yes, is just json output):

2015-12-10 17:32:52
wtfisconnected

{
    "result": [
        {
            "key": 27,
            "user": "analpaper.2",
            "version": "cgminer\/4.8.0",
            "since": "2015-12-10T16:56:22+0000",
            "last": "2015-12-10T17:32:46+0000",
            "pool": {
                "id": 0,
                "url": "stratum.kano.is",
                "port": 3333,
                "user": "analpaper.0",
                "pass": "x"
            },
            "pending": [],
            "diff": 3801,
            "2min avg": "5,71 TH\/s"
        },
        {
            "key": 35,
            "user": "analpaper.3",
            "version": "cgminer\/4.8.0",
            "since": "2015-12-10T16:56:24+0000",
            "last": "2015-12-10T17:32:47+0000",
            "pool": {
                "id": "1",
                "url": "stratum.kano.is",
                "port": "3333",
                "user": "analpaper.0",
                "pass": "x"
            },
            "pending": [],
            "diff": 1042,
            "2min avg": "1,23 TH\/s"
        }
    ],
    "pid": 22559,
    "mem": "1.5mb"
}

Enjoy:exclamation:

Very special thanks to:

Donations

nope. but you can donate to your favorite developer today! (or tomorrow!)

php-proxy-stratum's People

Contributors

ctubio 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  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.