coin-hive-stratum icon indicating copy to clipboard operation
coin-hive-stratum copied to clipboard

Reverse Proxy to allow Regular Miners to mine for Coin Hive

Open billygerhard opened this issue 7 years ago • 11 comments

Is it possible to use the proxy backwards, or maybe it would be a new project itself, but be able to use any miner like xmr-stak, but hash towards your coin-hive account instead of using the javascript miner for coin-hive?

billygerhard avatar Jan 01 '18 00:01 billygerhard

why would you do that?

cazala avatar Jan 02 '18 18:01 cazala

I am not sure what @billygerhard mean but maybe it is because of antivirus app? Coinhive.com domain is on many blacklist and it is automatically blocked. If we could create reverse proxy on our own server and domain, antivirus will not detect it as an malware.

vidoza avatar Jan 02 '18 18:01 vidoza

yea but you could simply use xmr-stak and mine on any regular pool (supportxmr, moneroocean, minexmr, etc). Why do you need coinhive if you are not doing web mining? Why would you pay the 30% commission if you can simply mine on any other pool and pay the regular <1% commissions?

cazala avatar Jan 02 '18 18:01 cazala

it is a very very weird and arguably stupid request, but there's no reason it shouldn't be possible, though it's well out of the scope of this project. If you want something like that it's going to be a totally new codebase and could even end up being a little more complex. If there's a valid reason behind it I'm sure somebody is going to make it, or maybe even already has.

notgne2 avatar Jan 02 '18 18:01 notgne2

They take a 30% commission, but they guarantee payout per hash, even if their pool doesn't get the block reward. If you are using coin hive as service on a site, then you probably have servers running like I do, and they are not anywhere near maxed out. If I can add to my coin hive balance with double or triple the hashing power with the same processors, why not. yes, I can just point them to a normal pool, but getting to that payout threshold on a couple servers alone will take lots of time, but if I can get my coin hive balance to the payout amount faster, that would help pay the server bills.

billygerhard avatar Jan 02 '18 20:01 billygerhard

fair enough, that's a good answer. this was not the first time someone asked for this, that's why I wanted to know what was the reason behind this request, I was just curious. now answering your question: it's doable, but it's not possible with this proxy. it's basically doing the same thing but the other way around, receiving TCP connections from miners, and connecting to Coinhive via WebSockets, translating stratum message from the miners to Coinhive's custom protocol and vice versa.

cazala avatar Jan 02 '18 20:01 cazala

I tried to do it with something like that https://www.nginx.com/blog/websocket-nginx/ . But with huge traffic it was very unstable and server stucks after several minutes. Is there anyone who have enought knowlage with websocket, who can create something like that and share with others?

vidoza avatar Jan 03 '18 07:01 vidoza

You mean kind of like this? http://xmr.cpufan.club/

It's a 1% commission, fwiw

JRoosh avatar Jan 04 '18 03:01 JRoosh

@cpufanboy no, not like your noobish site that anyone can make.

hes asking for mining to coinhive. stop spamming your useless site

hitmanex avatar Jan 10 '18 08:01 hitmanex

@billygerhard Hi there, I wonder if you're still interested in this topic, but if you are, I have a good news for you. I've analyzed almost all JS code from CoinHive last month and made a crypto library and a miner based on that. See libcryptohive and HiveMiner for more information. I hope that these help to you.

P.S. Sorry about my poor English, I'm from China...

EZForever avatar Sep 09 '18 14:09 EZForever

I haven't looked into it in a while, but I will check out your site when I get a chance!

billygerhard avatar Nov 24 '18 19:11 billygerhard