cazala / coin-hive

CoinHive cryptocurrency miner for node.js
https://www.npmjs.com/package/coin-hive
MIT License
1.99k stars 399 forks source link

Problem with changing the pool #92

Open Helmeboi opened 6 years ago

Helmeboi commented 6 years ago

Hello,

Yesterday I came across the other repo which is basically a proxy to be used on the miner to use a pool of my choice and overcome the 30% cut from coin-hive.

Now, what I understand is that I need to install and setup the proxy on a VPS and then I should direct my miner to that proxy and the proxy should direct the results to the pool..

I did setup the proxy over a VPS, checked that it was working and everything but then I didn't know how to port my miner to the proxy? the instructions are very unclear to me, a newbie, what do I need to change and where to change it? I looked for the vars in the instructions in my fork of the other repo "coin-hive" to change it to the proxy server but I couldn't find it.

I feel something is missing, please elaborate more.

PS: are you working on anything for crypto-loot.com?

ghost commented 6 years ago

In your miner code, you have to put this config:

<script src="https://coinhive.com/lib/coinhive.min.js"></script>
<script>
  // Configure CoinHive to point to your proxy
  // This is where the url defined in your VPS goes, e.g.: ws://myproxyurl.com
  CoinHive.CONFIG.WEBSOCKET_SHARDS = [["ws://localhost:8892"]];

  // Start miner
  var miner = CoinHive.User('your-monero-address', 'my-worker');
  miner.start();

</script>

Hope it helps