Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
coin-hive-stratum
Advanced tools
This proxy allows you to use CoinHive's JavaScript miner on a custom stratum pool. This package was inspired by x25's coinhive-stratum-mining-proxy.
New: deploy your proxy to now.sh
in a few clicks using CoinHive Proxy.
npm install -g coin-hive-stratum
You just need to launch a proxy pointing to the desired pool:
coin-hive-stratum 8892 --host=la01.supportxmr.com --port=3333
And then just point your CoinHive miner to the proxy:
<script src="https://coinhive.com/lib/coinhive.min.js"></script>
<script>
// Configure CoinHive to point to your proxy
CoinHive.CONFIG.WEBSOCKET_SHARDS = [["ws://localhost:8892"]];
// Start miner
var miner = CoinHive.Anonymous('your-monero-address');
miner.start();
</script>
Now your CoinHive miner would be mining on supportXMR.com
pool, using your monero address. This will work for any pool based on the Stratum Mining Protocol. You can even set up your own.
Usage: 'coin-hive-stratum <port>'
<port>: The port where the server will listen to
Options:
--host The pool's host.
--port The pool's port.
--pass The pool's password, by default it's "x"
--log Enable/Disable the logs, default is true
--log-file A filename where the logs will be stored, ie: proxy.log
createProxy
: Creates a proxy
server. It may take an options
object with the following optional properties:
host
: the pool's host.
port
: the pool's port.
pass
: the pool's password, default is "x"
.
log
: enable/disable the logs, default is true
.
logFile
: a filename where the logs will be stored, ie: "proxy.log"
.
proxy.listen(port)
: launches the server listening on the specified port, which by default is 8892
.
Yes, like this:
const createProxy = require('coin-hive-stratum');
const proxy = createProxy({
host: 'la01.supportxmr.com',
port: 3333,
});
proxy.listen(8892);
Yes, just create a CoinHive.User
and the username will be used as the stratum worker name:
<script src="https://coinhive.com/lib/coinhive.min.js"></script>
<script>
// Configure CoinHive to point to your proxy
CoinHive.CONFIG.WEBSOCKET_SHARDS = [["ws://localhost:8892"]];
// Start miner
var miner = CoinHive.User('your-monero-address', 'my-worker');
miner.start();
</script>
Yes, just like this:
$ git clone https://github.com/cazala/coin-hive-stratum.git
$ cd coin-hive-stratum
$ docker build -t coin-hive-stratum .
$ docker run --rm -t -p 8892:8892 coin-hive-stratum 8892 --host=la01.supportxmr.com --port=3333
There's no built in solution, but you can pipe the logs into a file like this:
coin-hive-stratum 8892 --host=la01.supportxmr.com --port 3333 > proxy.log &
This project is not endorsed by or affiliated with coinhive.com
in any way.
If you like this project and you want to show your support, you can buy me a beer with magic internet money:
BTC: 16ePagGBbHfm2d6esjMXcUBTNgqpnLWNeK
ETH: 0xa423bfe9db2dc125dd3b56f215e09658491cc556
XMR: 46WNbmwXpYxiBpkbHjAgjC65cyzAxtaaBQjcGpAZquhBKw2r8NtPQniEgMJcwFMCZzSBrEJtmPsTR54MoGBDbjTi2W1XmgM
<3
FAQs
proxy to use CoinHive miner on any stratum pool
The npm package coin-hive-stratum receives a total of 87 weekly downloads. As such, coin-hive-stratum popularity was classified as not popular.
We found that coin-hive-stratum demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.