diff --git a/src/configurator.js b/src/configurator.js index ca7d317..7729158 100644 --- a/src/configurator.js +++ b/src/configurator.js @@ -72,9 +72,11 @@ const generate = async function (pools = null, settings = null ) { const fanLow = (settings.fan_low && settings.fan_low !== 40) ? `-fan_temp_low ${settings.fan_low}` : null; const fanHigh = (settings.fan_high && settings.fan_high !== 60) ? `-fan_temp_hi ${settings.fan_high}` : null; - const poolUrl = new URL(mainPool.url); + const poolUrl = mainPool.url.replace(/^.*\/\//, ''); - let minerConfig = `-host ${poolUrl.hostname} -port ${poolUrl.port} -user ${mainPool.username} -brd_ocp ${voltage} -osc ${frequency}`; + const [poolHost, poolPort] = poolUrl.split(':'); + + let minerConfig = `-host ${poolHost} -port ${poolPort} -user ${mainPool.username} -brd_ocp ${voltage} -osc ${frequency}`; if (fanLow) minerConfig += ` ${fanLow}`; if (fanHigh) minerConfig += ` ${fanHigh}`;