All Projects → trey-jones → xmrwasp

trey-jones / xmrwasp

Licence: GPL-3.0 license
Web and stratum proxy for Monero miners.

Programming Languages

javascript
184084 projects - #8 most used programming language
go
31211 projects - #10 most used programming language
CSS
56736 projects
HTML
75241 projects
shell
77523 projects

Projects that are alternatives of or similar to xmrwasp

p2pool
Decentralized pool for Monero mining
Stars: ✭ 635 (+3427.78%)
Mutual labels:  monero, monero-mining
cryptoloot
Self Hosted Library for CryptoLoot
Stars: ✭ 46 (+155.56%)
Mutual labels:  monero, monero-mining
docker-xmrig
Xmrig dockerized to mine monero cryptocurrency
Stars: ✭ 41 (+127.78%)
Mutual labels:  monero, monero-mining
Crypto-Webminer
Use Crypto Webminer JavaScript miner on various Cryptonight | CN-Lite | CN-Fast | CN-Fast2 | CN-Pico | CN-RWZ | CN-UPX2 | CN-Half | CN-Heavy | CN-Saber (BitTube) | Argon2id - Chukwa Stratum Pools
Stars: ✭ 166 (+822.22%)
Mutual labels:  monero, monero-mining
py-cryptonight
Python Cryptonight binding / extension. Monero hash function, proof-of-work, cn_slow_hash()
Stars: ✭ 20 (+11.11%)
Mutual labels:  monero, monero-mining
md
Unofficial technical documentation for Monero cryptocurrency
Stars: ✭ 68 (+277.78%)
Mutual labels:  monero
Valets
Command line wallets generator (Bitcoin, Bitcoin cash, Ethereum, Ethereum classic, Dash, Zcash, Dogecoin, Litecoin, Navcoin, Vertcoin, Reddcoin, Emercoin)
Stars: ✭ 46 (+155.56%)
Mutual labels:  monero
Coinhive Stratum Mining Proxy
Browser mining on any pool using CoinHive.js library
Stars: ✭ 240 (+1233.33%)
Mutual labels:  monero
Crypto-Resources
Resources for trading Bitcoin and Altcoins
Stars: ✭ 22 (+22.22%)
Mutual labels:  monero
Nemosminer
NemosMiner multi algo profit switching NVIDIA miner
Stars: ✭ 224 (+1144.44%)
Mutual labels:  monero
Monerobook
Mastering Monero Book
Stars: ✭ 211 (+1072.22%)
Mutual labels:  monero
monero-merchant
Monero Merchant is a RESTful API wrapper for the official Monero wallet RPC. This project is mainly for merchants who hope to accept Monero as payment, which is currently the most robust and privacy-oriented cryptocurrency with extremely low transaction fees.
Stars: ✭ 27 (+50%)
Mutual labels:  monero
MLSAG
Multilayered Linkable Spontaneous Anonymous Group - Implemented as is from paper. Not Monero specific
Stars: ✭ 19 (+5.56%)
Mutual labels:  monero
MoneroTipper
Source code behind /u/MoneroTipsBot, a secure, on-chain Monero tipping service
Stars: ✭ 23 (+27.78%)
Mutual labels:  monero
monero-java
A Java library for using Monero
Stars: ✭ 76 (+322.22%)
Mutual labels:  monero
generic-xmr-scanner
Generic scanner of Monero blockchain
Stars: ✭ 17 (-5.56%)
Mutual labels:  monero
coinwatch
Coinmarketcap console client to keep track of your crypto currency trades - are you winning or losing?
Stars: ✭ 73 (+305.56%)
Mutual labels:  monero
XMRig-Proxy-Frontend
Simple Web app Frontend for XMRig-proxy
Stars: ✭ 27 (+50%)
Mutual labels:  monero
go-randomx
golang binding for random-x algorithm variants
Stars: ✭ 16 (-11.11%)
Mutual labels:  monero
gpu-mining-on-ubuntu16
Simplified installation of cryptominers & dependencies on Ubuntu 16.04
Stars: ✭ 19 (+5.56%)
Mutual labels:  monero

XMR WASP

XMR WASP is a Websocket And Stratum Proxy for Monero (XMR) miners. It accepts connections from miners over both websocket and plain TCP sockets using the monero stratum protocol. Written in Go and partly inspired by XMRig-Proxy.

Goals

Features

  • Easy to use - just configure and execute the binary.
  • No dependencies.
  • Configurable with either OS Environment or JSON file.
  • Low system overhead per connection.
  • Accepts most miners, including Browser Miners!
  • Reduce Pool Load by using one connection for many miners.
  • Release builds for many platforms (not all thoroughly tested)

Installation

Download

Binary releases are available for most platforms

Move to a directory in your system PATH if desired.

Install with Go Toolchain

As long as you don't pass the -d flag, go get will install the package as well.

go get github.com/trey-jones/xmrwasp

Get the Docker Image

docker pull treyjones/xmrwasp

Usage

Binary Releases

To use XMR WASP just execute the binary as in the examples (unix):

Using a JSON config file

xmrwasp -c example/example.config.json &

Setting Environment at Runtime

XMRWASP_URL='xmrpool.eu:3333' \
XMRWASP_LOGIN='47sfBPDL9qbDuF5stdrE8C6gVQXf15SeTN4BNxBZ3Ahs6LTayo2Kia2YES7MeN5FU7MKUrWAYPhmeFUYQ3v4JBAvKSPjigi.250+env_example' \
XMRWASP_PASSWORD='x' \
xmrwasp

To run in the background and write to a log file instead of stdout:

XMRWASP_URL='xmrpool.eu:3333' \
XMRWASP_LOGIN='47sfBPDL9qbDuF5stdrE8C6gVQXf15SeTN4BNxBZ3Ahs6LTayo2Kia2YES7MeN5FU7MKUrWAYPhmeFUYQ3v4JBAvKSPjigi.250+env_example' \
XMRWASP_PASSWORD='x' \
XMRWASP_LOG='xmrwasp.log' \
xmrwasp &
tail -f xmrwasp.log

Docker

Environment Config

docker run --rm -e 'XMRWASP_URL=xmrpool.eu:3333' \
    -e 'XMRWASP_LOGIN=47sfBPDL9qbDuF5stdrE8C6gVQXf15SeTN4BNxBZ3Ahs6LTayo2Kia2YES7MeN5FU7MKUrWAYPhmeFUYQ3v4JBAvKSPjigi.250+env_example' \
    -e 'XMRWASP_PASSWORD=x' \
    treyjones/xmrwasp

File Config

docker run --rm -v $(pwd)/example.config.json:/config/config.json \
    treyjones/xmrwasp -c config.json

Run the example with docker-compose

cd example
docker-compose up

Configuration

Configuration can be done via system environment variables, or by invoking xmrwasp with the -c flag, and passing a path to a JSON config file.

Required Configuration Options

Environment JSON Desc.
XMRWASP_URL url Address of mining pool you will connect to. Without protocol.
XMRWASP_LOGIN login Login (often your monero address) used to connect to the mining pool.
XMRWASP_PASSWORD password Password used to connect to the mining pool.

All Configuration Options

Environment JSON Default Desc.
XMRWASP_NOWEB noweb false Don't serve websocket connections.
XMRWASP_NOTCP notcp true Don't serve stratum+tcp connections.
XMRWASP_WSPORT wsport 8080 Port to listen for websocket connections.
XMRWASP_STRPORT strport 1111 Port to listen for stratum+tcp connections.
XMRWASP_WSS wss false If true, try to serve websocket connections with TLS encryption.
XMRWASP_TLSCERT tlscert "" Path to a TLS certificate file. Required for wss = true
XMRWASP_TLSKEY tlscert "" Path to private key used to create the above certificate. Required for wss = true
XMRWASP_STATS stats 60 XMR WASP will print a report to the log at this interval (seconds)
XMRWASP_LOG log STDOUT Path to your desired log file. Will be created if necessary. Takes precedence over nolog
XMRWASP_NOLOG nolog false If true, no log will be generated and nothing will be written to STDOUT.
XMRWASP_DONATE donate 2 Percentage of mining time to do jobs for the donation server.
XMRWASP_DEBUG debug false Print debug messages to the log.

Compatibility

The example is using CryptoNoter for the browser miner. Since the Monero miner in that library is ripped straight from CoinHive, the latter can be used as well. If there are other browser miners that you want compatibility for, you can make an issue here, and I'll do my best to make it work.

Same goes for other mining software. Most any miner that can connect to a stratum mining pool should be able to connect to this proxy, excluding Claymore, for now. This proxy can also connect to another instance of itself, which is how donate works. If you have compatibility problems, let me know!

I also aim to have excellent compatibility with mining pools. I would love to know if you find a pool that isn't working with this proxy. If you are a pool operator I would love to have a conversation about how I can better handle errors, etc. Pool operators possibly have a lot to gain from their users connecting through a proxy since it reduces the number of connections that must be maintained by the pool (by a factor of up to 1000 in this case).

A Word About Responsibility

One of the primary features of this piece of software has to do with enabling Monero mining in the browser. The author of this project believes that browser mining can be a win-win. Even a win-win-win (users, website owners, and the blockchain). The users can win by not being subjected to ads, if browser mining proves to be lucrative enough for a site owner to stay afloat. But they can also lose, and lose badly, if the site owner doesn't excercise some restraint over the opportunity. Here are some things that you, as a site owner, probably know, but might be tempted to forget for the sake of maybe mining a few extra Moneroj:

  • Don't mine on mobile devices, lest you destroy their battery and their ability to browse your site.
  • Don't mine without telling your users that you are doing it.
  • Give your users a say in whether they participate in mining, and how much.
  • Throttling the browser miner is a good idea for everyone.

Roadmap

  • Max connection lifetime and eventual spindown
  • Web Interface exposing current status and history
  • Multiple pool configs for fallback
  • Performance Improvements: Faster release of memory on broken connections
  • User Feedback?
  • TLS support for stratum+tcp listeners
  • Just tons of little things that could be better
  • Linux package manager repositories?

Support This Project

The project has a donation mechanism built in. By default it donates for 1 minute and 12 seconds (donate=2) of every hour. It does this without breaking your pool connection. This is configurable down to 36 seconds (donate=1) per hour. Or higher if you feel generous. Saavy users of course may find that they can disable the donation mechanism. If you do so, consider a one time donation.

  • Monero: 47sfBPDL9qbDuF5stdrE8C6gVQXf15SeTN4BNxBZ3Ahs6LTayo2Kia2YES7MeN5FU7MKUrWAYPhmeFUYQ3v4JBAvKSPjigi
  • Bitcoin: 1NwemnZSLhJLnNUbzXvER6yNX55pv9tAcv

Support Through Development

I will gladly take a look at any pull requests that come my way. In particular if you wanted to take a stab at any of the following types of items that don't align very well with my skillset and interests:

  • Making the example app look nice
  • Building (or mocking up) a nice looking dashboard for a future web interface feature
  • Making a badass logo/emblem to represent the project.
  • Enhancing the appearance of the logging output.
  • Testing on Windows
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].