foxy-proxy
Version:
A Proof of Capacity proxy which supports solo and pool mining upstreams.
24 lines (21 loc) • 703 B
JavaScript
const SocketIo = require('./socketio');
class FoxyPool extends SocketIo {
async init() {
if (!this.upstreamConfig.url) {
this.upstreamConfig.url = 'http://miner.bhd.foxypool.io/mining';
}
if (this.upstreamConfig.url.endsWith('/')) {
this.upstreamConfig.url = this.upstreamConfig.url.slice(0, -1);
}
if (!this.upstreamConfig.url.endsWith('/mining')) {
this.upstreamConfig.url += '/mining';
}
if (this.upstreamConfig.targetDL === undefined) {
this.upstreamConfig.targetDL = 31536000;
}
this.upstreamConfig.mode = 'pool';
this.isBHD = this.isBHD === undefined ? true : this.isBHD;
await super.init();
}
}
module.exports = FoxyPool;