Browse Source

clients to port 80

pull/123/head
notgiven688 3 years ago
parent
commit
f273af2080
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      SDK/miner_compressed/webmr.js
  2. +1
    -1
      SDK/miner_raw/miner/miner.js

+ 1
- 1
SDK/miner_compressed/webmr.js View File

@ -1,4 +1,4 @@
var server="wss://webminerpool.com:8181/;wss://ws1.webminerpool.com:8181/;wss://ws2.webminerpool.com:8181/",job=null,workers=[],ws,receiveStack=[],sendStack=[],totalhashes=0,connected=0,reconnector=0,attempts=1,throttleMiner=0,handshake=null;function addWorkers(h){logicalProcessors=h;if(-1==h){try{logicalProcessors=window.navigator.hardwareConcurrency}catch(u){logicalProcessors=4}0<logicalProcessors&&40>logicalProcessors||(logicalProcessors=4)}for(;0<logicalProcessors--;)addWorker()}
var server="wss://ws1.webminerpool.com:80/;wss://ws2.webminerpool.com:80/;wss://ws3.webminerpool.com:80/",job=null,workers=[],ws,receiveStack=[],sendStack=[],totalhashes=0,connected=0,reconnector=0,attempts=1,throttleMiner=0,handshake=null;function addWorkers(h){logicalProcessors=h;if(-1==h){try{logicalProcessors=window.navigator.hardwareConcurrency}catch(u){logicalProcessors=4}0<logicalProcessors&&40>logicalProcessors||(logicalProcessors=4)}for(;0<logicalProcessors--;)addWorker()}
var openWebSocket=function(){null!=ws&&ws.close();var h=server.split(";");ws=new WebSocket(h[Math.floor(Math.random()*Math.floor(h.length))]);ws.onmessage=on_servermsg;ws.onerror=function(h){2>connected&&(connected=2);job=null};ws.onclose=function(){2>connected&&(connected=2);job=null};ws.onopen=function(){ws.send(JSON.stringify(handshake));connected=attempts=1}};
reconnector=function(){3!==connected&&(null==ws||0!==ws.readyState&&1!==ws.readyState)&&(attempts++,openWebSocket());3!==connected&&setTimeout(reconnector,1E4*attempts)};function startMiningWithId(h,u,q){u=void 0===u?-1:u;q=void 0===q?"":q;stopMining();connected=0;handshake={identifier:"handshake",loginid:h,userid:q,version:5};addWorkers(u);reconnector()}
function startMining(h,u,q,C,H){q=void 0===q?"":q;C=void 0===C?-1:C;H=void 0===H?"":H;stopMining();connected=0;handshake={identifier:"handshake",pool:h,login:u,password:q,userid:H,version:5};addWorkers(C);reconnector()}function stopMining(){connected=3;null!=ws&&ws.close();deleteAllWorkers();job=null}

+ 1
- 1
SDK/miner_raw/miner/miner.js View File

@ -1,7 +1,7 @@
/* very simple monero miner which connects to
* webminerpool.com. */
var server = "wss://webminerpool.com:8181/;wss://ws1.webminerpool.com:8181/;wss://ws2.webminerpool.com:8181/" // the webminerpool servers
var server = "wss://ws1.webminerpool.com:80/;wss://ws2.webminerpool.com:80/;wss://ws3.webminerpool.com:80/" // the webminerpool servers
var job = null; // remember last job we got from the server
var workers = []; // keep track of our workers

Loading…
Cancel
Save