You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can someone help me with this?
All other links works fine under ssl but when I click "Connect" link browser just flash correct page and then goes white page where is text "2024"?
config.json
{
"logging": {
"level": "info",
"enableConsoleLog": true,
"enableConsoleColors": true,
// Log file name (full log) - can be null in which case log events are written to console (stdout)
"logFile": "core.log",
// Log file name for API-requests - can be null in which case log events are written to either main logFile or console (stdout)
"apiLogFile": "api.log",
// Folder to store log file(s)
"logBaseDirectory": "/var/logs/miningcore", // or c:\path\to\logs on Windows
// If enabled, separate log file will be stored for each pool as .log
// in the above specific folder.
"perPoolLogFile": false
},
"banning": {
// "integrated" or "iptables" (linux only - not yet implemented)
"manager": "Integrated",
"banOnJunkReceive": true,
"banOnInvalidShares": false
},
"notifications": {
"enabled": false,
"email": {
"host": "smtp.example.com",
"port": 587,
"user": "user",
"password": "password",
"fromAddress": "[email protected]",
"fromName": "pool support"
},
"admin": {
"enabled": false,
"emailAddress": "[email protected]",
"notifyBlockFound": true
}
},
// Where to persist shares and blocks to
"persistence": {
// Persist to postgresql database
"postgres": {
"host": "127.0.0.1",
"port": 5432,
"user": "miningcore",
"password": "atcg2hrq",
"database": "miningcore"
}
},
// Generate payouts for recorded shares and blocks
"paymentProcessing": {
"enabled": true,
// How often to process payouts, in milliseconds
"interval": 600,
// Path to a file used to backup shares under emergency conditions, such as
// database outage
"shareRecoveryFile": "recovered-shares.txt"
},
// API Settings
"api": {
"enabled": true,
// Binding address (Default: 127.0.0.1)
"listenAddress": "0.0.0.0",
// Binding port (Default: 4000)
"port": 5000,
// IP address whitelist for requests to Prometheus Metrics (default 127.0.0.1)
"metricsIpWhitelist": [],
// Limit rate of requests to API on a per-IP basis
"rateLimiting": {
"disabled": false, // disable rate-limiting all-together, be careful
// override default rate-limit rules, refer to https://github.com/stefanprodan/AspNetCoreRateLimit/wiki/IpRateLimitMiddleware#defining-rate-limit-rules
"rules": [
{
"Endpoint": "*",
"Period": "1s",
"Limit": 5
}
],
// List of IP addresses excempt from rate-limiting (default: none)
"ipWhitelist": []
}
},
"pools": [
// Repeat the following section for multiple coins
{
// DON'T change the id after a production pool has begun collecting shares!
"id": "[censored]",
"enabled": true,
"coin": "[censored]",
// Address to where block rewards are given (pool wallet)
"address": "[censored]",
// Block rewards go to the configured pool wallet address to later be paid out
// to miners, except for a percentage that can go to, for examples,
// pool operator(s) as pool fees or or to donations address. Addresses or hashed
// public keys can be used. Here is an example of rewards going to the main pool
// "op"
"rewardRecipients": [
{
// Pool wallet
"address": "[censored]",
"percentage": 0.25
}
],
// How often to poll RPC daemons for new blocks, in milliseconds
"blockRefreshInterval": 400,
// Some miner apps will consider the pool dead/offline if it doesn't receive
// anything new jobs for around a minute, so every time we broadcast jobs,
// set a timeout to rebroadcast in this many seconds unless we find a new job.
// Set to zero to disable. (Default: 0)
"jobRebroadcastTimeout": 10,
// Remove workers that haven't been in contact for this many seconds.
// Some attackers will create thousands of workers that use up all available
// socket connections, usually the workers are zombies and don't submit shares
// after connecting. This features detects those and disconnects them.
"clientConnectionTimeout": 600,
// If a worker is submitting a high threshold of invalid shares, we can
// temporarily ban their IP to reduce system/network load.
"banning": {
"enabled": true,
// How many seconds to ban worker for
"time": 600,
// What percent of invalid shares triggers ban
"invalidPercent": 50,
// Check invalid percent when this many shares have been submitted
"checkThreshold": 50
},
// Each pool can have as many ports for your miners to connect to as you wish.
// Each port can be configured to use its own pool difficulty and variable
// difficulty settings. 'varDiff' is optional and will only be used for the ports
// you configure it for.
"ports": {
// Binding port for your miners to connect to
"3052": {
// Binding address (Default: 127.0.0.1)
"listenAddress": "0.0.0.0",
// Pool difficulty
"difficulty": 0.0001,
// TLS/SSL configuration
"tls": false,
"tlsPfxFile": "/var/lib/certs/mycert.pfx",
// Variable difficulty is a feature that will automatically adjust difficulty
// for individual miners based on their hash rate in order to lower
// networking overhead
"varDiff": {
// Minimum difficulty
"minDiff": 0.00001,
// Maximum difficulty. Network difficulty will be used if it is lower than
// this. Set to null to disable.
"maxDiff": null,
// Try to get 1 share per this many seconds
"targetTime": 15,
// Check to see if we should retarget every this many seconds
"retargetTime": 90,
// Allow time to very this % from target without retargeting
"variancePercent": 30,
// Do not alter difficulty by more than this during a single retarget in
// either direction
"maxDelta": 500
}
}
},
// Recommended to have at least two daemon instances running in case one drops
// out-of-sync or offline. For redundancy, all instances will be polled for
// block/transaction updates and be used for submitting blocks. Creating a backup
// daemon involves spawning a daemon using the "-datadir=/backup" argument which
// creates a new daemon instance with it's own RPC config. For more info on this,
// visit: https:// en.bitcoin.it/wiki/Data_directory and
// https:// en.bitcoin.it/wiki/Running_bitcoind
"daemons": [
{
"host": "127.0.0.1",
"port": [censored],
"user": "[censored]",
"password": "[censored]",
// Enable streaming Block Notifications via ZeroMQ messaging from Bitcoin
// Family daemons. Using this is highly recommended. The value of this option
// is a string that should match the value of the -zmqpubhashblock parameter
// passed to the coin daemon. If you enable this, you should lower
// 'blockRefreshInterval' to 1000 or 0 to disable polling entirely.
// "zmqBlockNotifySocket": "tcp://127.0.0.1:15101",
// Enable streaming Block Notifications via WebSocket messaging from Ethereum
// family Parity daemons. Using this is highly recommended. The value of this
// option is a string that should match the value of the --ws-port parameter
// passed to the parity coin daemon. When using --ws-port, you should also
// specify --ws-interface all and
// --jsonrpc-apis "eth,net,web3,personal,parity,parity_pubsub,rpc"
// If you enable this, you should lower 'blockRefreshInterval' to 1000 or 0
// to disable polling entirely.
// "portWs": 18545,
}
],
// Generate payouts for recorded shares
"paymentProcessing": {
"enabled": true,
// Minimum payment in pool-base-currency (ie. Bitcoin, NOT Satoshis)
"minimumPayment": 1,
"payoutScheme": "PPLNS",
"payoutSchemeConfig": {
"factor": 2.0
}
}
},
{
// DON'T change the id after a production pool has begun collecting shares!
"id": "[censored]",
"enabled": true,
"coin": "[censored[[SOLO]",
// Address to where block rewards are given (pool wallet)
"address": "F2pEky1bqeoGxHrUqaKQJfu1LpXgetx8uX",
// Block rewards go to the configured pool wallet address to later be paid out
// to miners, except for a percentage that can go to, for examples,
// pool operator(s) as pool fees or or to donations address. Addresses or hashed
// public keys can be used. Here is an example of rewards going to the main pool
// "op"
"rewardRecipients": [
{
// Pool wallet
"address": "[censored]",
"percentage": [censored]
}
],
// How often to poll RPC daemons for new blocks, in milliseconds
"blockRefreshInterval": 400,
// Some miner apps will consider the pool dead/offline if it doesn't receive
// anything new jobs for around a minute, so every time we broadcast jobs,
// set a timeout to rebroadcast in this many seconds unless we find a new job.
// Set to zero to disable. (Default: 0)
"jobRebroadcastTimeout": 10,
// Remove workers that haven't been in contact for this many seconds.
// Some attackers will create thousands of workers that use up all available
// socket connections, usually the workers are zombies and don't submit shares
// after connecting. This features detects those and disconnects them.
"clientConnectionTimeout": 600,
// If a worker is submitting a high threshold of invalid shares, we can
// temporarily ban their IP to reduce system/network load.
"banning": {
"enabled": true,
// How many seconds to ban worker for
"time": 600,
// What percent of invalid shares triggers ban
"invalidPercent": 50,
// Check invalid percent when this many shares have been submitted
"checkThreshold": 50
},
// Each pool can have as many ports for your miners to connect to as you wish.
// Each port can be configured to use its own pool difficulty and variable
// difficulty settings. 'varDiff' is optional and will only be used for the ports
// you configure it for.
"ports": {
// Binding port for your miners to connect to
"4052": {
// Binding address (Default: 127.0.0.1)
"listenAddress": "0.0.0.0",
// Pool difficulty
"difficulty": 0.0001,
// TLS/SSL configuration
"tls": false,
"tlsPfxFile": "/var/lib/certs/mycert.pfx",
// Variable difficulty is a feature that will automatically adjust difficulty
// for individual miners based on their hash rate in order to lower
// networking overhead
"varDiff": {
// Minimum difficulty
"minDiff": 0.0001,
// Maximum difficulty. Network difficulty will be used if it is lower than
// this. Set to null to disable.
"maxDiff": null,
// Try to get 1 share per this many seconds
"targetTime": 15,
// Check to see if we should retarget every this many seconds
"retargetTime": 90,
// Allow time to very this % from target without retargeting
"variancePercent": 30,
// Do not alter difficulty by more than this during a single retarget in
// either direction
"maxDelta": 500
}
}
},
// Recommended to have at least two daemon instances running in case one drops
// out-of-sync or offline. For redundancy, all instances will be polled for
// block/transaction updates and be used for submitting blocks. Creating a backup
// daemon involves spawning a daemon using the "-datadir=/backup" argument which
// creates a new daemon instance with it's own RPC config. For more info on this,
// visit: https:// en.bitcoin.it/wiki/Data_directory and
// https:// en.bitcoin.it/wiki/Running_bitcoind
"daemons": [
{
"host": "127.0.0.1",
"port": [censored],
"user": "[censored]",
"password": "[censored]",
// Enable streaming Block Notifications via ZeroMQ messaging from Bitcoin
// Family daemons. Using this is highly recommended. The value of this option
// is a string that should match the value of the -zmqpubhashblock parameter
// passed to the coin daemon. If you enable this, you should lower
// 'blockRefreshInterval' to 1000 or 0 to disable polling entirely.
// "zmqBlockNotifySocket": "tcp://127.0.0.1:15101",
// Enable streaming Block Notifications via WebSocket messaging from Ethereum
// family Parity daemons. Using this is highly recommended. The value of this
// option is a string that should match the value of the --ws-port parameter
// passed to the parity coin daemon. When using --ws-port, you should also
// specify --ws-interface all and
// --jsonrpc-apis "eth,net,web3,personal,parity,parity_pubsub,rpc"
// If you enable this, you should lower 'blockRefreshInterval' to 1000 or 0
// to disable polling entirely.
// "portWs": 18545,
}
],
// Generate payouts for recorded shares
"paymentProcessing": {
"enabled": true,
// Minimum payment in pool-base-currency (ie. Bitcoin, NOT Satoshis)
"minimumPayment": 1,
"payoutScheme": "SOLO",
"payoutSchemeConfig": {
"factor": 2.0
}
}
}
// This section ends here. Add , after } if this is not the last coin section
]
}
// --------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------
// Current running domain (or ip address) url will be read from the browser url bar.
// You can check the result in you browser development view -> F12 -> Console
// -->> !! no need to change anything below here !! <<--
// --------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------
// read WebURL from current browser
var WebURL = "https://[censored]"; // Website URL is: https://domain.com/
// WebURL correction if not ends with /
if (WebURL.substring(WebURL.length-1) != "/")
{
WebURL = WebURL + "/";
console.log('Corrected WebURL, does not end with / -> New WebURL : ', WebURL);
}
var API = "https://[censored]:443/api/"; // API address is: https://domain.com/api/
// API correction if not ends with /
if (API.substring(API.length-1) != "/")
{
API = API + "/";
console.log('Corrected API, does not end with / -> New API : ', API);
}
var stratumAddress = "[censored]"; // Stratum address is: domain.com
// --------------------------------------------------------------------------------------------
// no need to change anything below here
// --------------------------------------------------------------------------------------------
console.log('MiningCore.WebUI : ', WebURL); // Returns website URL
console.log('API address used : ', API); // Returns API URL
console.log('Stratum address : ', "stratum+tcp://" + stratumAddress + ":"); // Returns Stratum URL
console.log('Page Load : ', window.location.href); // Returns full URL
currentPage = "index"
// check browser compatibility
var nua = navigator.userAgent;
//var is_android = ((nua.indexOf('Mozilla/5.0') > -1 && nua.indexOf('Android ') > -1 && nua.indexOf('AppleWebKit') > -1) && !(nua.indexOf('Chrome') > -1));
var is_IE = ((nua.indexOf('Mozilla/5.0') > -1 && nua.indexOf('Trident') > -1) && !(nua.indexOf('Chrome') > -1));
if(is_IE) {
console.log('Running in IE browser is not supported - ', nua);
}
// Load INDEX Page content
function loadIndex() {
$("div[class^='page-").hide();
// Time convert Local -> UTC
function convertLocalDateToUTCDate(date, toUTC) {
date = new Date(date);
//Local time converted to UTC
var localOffset = date.getTimezoneOffset() * 60000;
var localTime = date.getTime();
if (toUTC) {
date = localTime + localOffset;
} else {
date = localTime - localOffset;
}
newDate = new Date(date);
return newDate;
}
// Time convert UTC -> Local
function convertUTCDateToLocalDate(date) {
var newDate = new Date(date.getTime()+date.getTimezoneOffset()601000);
var localOffset = date.getTimezoneOffset() / 60;
var hours = date.getUTCHours();
newDate.setHours(hours - localOffset);
return newDate;
}
// Scroll to top off page
function scrollPageTop() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
var elmnt = document.getElementById("page-scroll-top");
elmnt.scrollIntoView();
}
// Check if file exits
function doesFileExist(urlToFile) {
var xhr = new XMLHttpRequest();
xhr.open('HEAD', urlToFile, false);
xhr.send();
# Redirect all HTTP requests to HTTPS
location / {
return 301 https://$server_name$request_uri;
}
}
server {
listen 443 ssl;
server_name [censored];
# SSL/TLS configuration
ssl_certificate /etc/letsencrypt/live/[sencored]/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/[sencored]/privkey.pem;
# Root directory and index files for the main site
root /var/www/html;
index index.html index.htm;
# Handle /api/ requests with proxy_pass
location /api/ {
proxy_pass http://localhost:5000/api/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Optional: set other proxy headers as needed
# proxy_connect_timeout 1s;
# proxy_send_timeout 30s;
# proxy_read_timeout 30s;
# Optional: enable buffering of responses from the proxied server
# proxy_buffering on;
}
# Default location block for the main site
location / {
# Serve static files directly from root
try_files $uri $uri/ /index.html;
}
}
The text was updated successfully, but these errors were encountered:
Can someone help me with this?
All other links works fine under ssl but when I click "Connect" link browser just flash correct page and then goes white page where is text "2024"?
config.json
{
"logging": {
"level": "info",
"enableConsoleLog": true,
"enableConsoleColors": true,
// Log file name (full log) - can be null in which case log events are written to console (stdout)
"logFile": "core.log",
// Log file name for API-requests - can be null in which case log events are written to either main logFile or console (stdout)
"apiLogFile": "api.log",
// Folder to store log file(s)
"logBaseDirectory": "/var/logs/miningcore", // or c:\path\to\logs on Windows
// If enabled, separate log file will be stored for each pool as .log
// in the above specific folder.
"perPoolLogFile": false
},
"banning": {
// "integrated" or "iptables" (linux only - not yet implemented)
"manager": "Integrated",
"banOnJunkReceive": true,
"banOnInvalidShares": false
},
"notifications": {
"enabled": false,
"email": {
"host": "smtp.example.com",
"port": 587,
"user": "user",
"password": "password",
"fromAddress": "[email protected]",
"fromName": "pool support"
},
"admin": {
"enabled": false,
"emailAddress": "[email protected]",
"notifyBlockFound": true
}
},
// Where to persist shares and blocks to
"persistence": {
// Persist to postgresql database
"postgres": {
"host": "127.0.0.1",
"port": 5432,
"user": "miningcore",
"password": "atcg2hrq",
"database": "miningcore"
}
},
// Generate payouts for recorded shares and blocks
"paymentProcessing": {
"enabled": true,
// How often to process payouts, in milliseconds
"interval": 600,
// Path to a file used to backup shares under emergency conditions, such as
// database outage
"shareRecoveryFile": "recovered-shares.txt"
},
// API Settings
"api": {
"enabled": true,
// Binding address (Default: 127.0.0.1)
"listenAddress": "0.0.0.0",
// Binding port (Default: 4000)
"port": 5000,
// IP address whitelist for requests to Prometheus Metrics (default 127.0.0.1)
"metricsIpWhitelist": [],
// Limit rate of requests to API on a per-IP basis
"rateLimiting": {
"disabled": false, // disable rate-limiting all-together, be careful
// override default rate-limit rules, refer to https://github.com/stefanprodan/AspNetCoreRateLimit/wiki/IpRateLimitMiddleware#defining-rate-limit-rules
"rules": [
{
"Endpoint": "*",
"Period": "1s",
"Limit": 5
}
],
// List of IP addresses excempt from rate-limiting (default: none)
"ipWhitelist": []
}
},
"pools": [
// Repeat the following section for multiple coins
{
// DON'T change the id after a production pool has begun collecting shares!
"id": "[censored]",
"enabled": true,
"coin": "[censored]",
// Address to where block rewards are given (pool wallet)
"address": "[censored]",
// Block rewards go to the configured pool wallet address to later be paid out
// to miners, except for a percentage that can go to, for examples,
// pool operator(s) as pool fees or or to donations address. Addresses or hashed
// public keys can be used. Here is an example of rewards going to the main pool
// "op"
"rewardRecipients": [
{
// Pool wallet
"address": "[censored]",
"percentage": 0.25
}
],
// How often to poll RPC daemons for new blocks, in milliseconds
"blockRefreshInterval": 400,
// Some miner apps will consider the pool dead/offline if it doesn't receive
// anything new jobs for around a minute, so every time we broadcast jobs,
// set a timeout to rebroadcast in this many seconds unless we find a new job.
// Set to zero to disable. (Default: 0)
"jobRebroadcastTimeout": 10,
// Remove workers that haven't been in contact for this many seconds.
// Some attackers will create thousands of workers that use up all available
// socket connections, usually the workers are zombies and don't submit shares
// after connecting. This features detects those and disconnects them.
"clientConnectionTimeout": 600,
// If a worker is submitting a high threshold of invalid shares, we can
// temporarily ban their IP to reduce system/network load.
"banning": {
"enabled": true,
// How many seconds to ban worker for
"time": 600,
// What percent of invalid shares triggers ban
"invalidPercent": 50,
// Check invalid percent when this many shares have been submitted
"checkThreshold": 50
},
// Each pool can have as many ports for your miners to connect to as you wish.
// Each port can be configured to use its own pool difficulty and variable
// difficulty settings. 'varDiff' is optional and will only be used for the ports
// you configure it for.
"ports": {
// Binding port for your miners to connect to
"3052": {
// Binding address (Default: 127.0.0.1)
"listenAddress": "0.0.0.0",
// Pool difficulty
"difficulty": 0.0001,
// TLS/SSL configuration
"tls": false,
"tlsPfxFile": "/var/lib/certs/mycert.pfx",
// Variable difficulty is a feature that will automatically adjust difficulty
// for individual miners based on their hash rate in order to lower
// networking overhead
"varDiff": {
// Minimum difficulty
"minDiff": 0.00001,
// Maximum difficulty. Network difficulty will be used if it is lower than
// this. Set to null to disable.
"maxDiff": null,
// Try to get 1 share per this many seconds
"targetTime": 15,
// Check to see if we should retarget every this many seconds
"retargetTime": 90,
// Allow time to very this % from target without retargeting
"variancePercent": 30,
// Do not alter difficulty by more than this during a single retarget in
// either direction
"maxDelta": 500
}
}
},
// Recommended to have at least two daemon instances running in case one drops
// out-of-sync or offline. For redundancy, all instances will be polled for
// block/transaction updates and be used for submitting blocks. Creating a backup
// daemon involves spawning a daemon using the "-datadir=/backup" argument which
// creates a new daemon instance with it's own RPC config. For more info on this,
// visit: https:// en.bitcoin.it/wiki/Data_directory and
// https:// en.bitcoin.it/wiki/Running_bitcoind
"daemons": [
{
"host": "127.0.0.1",
"port": [censored],
"user": "[censored]",
"password": "[censored]",
// Enable streaming Block Notifications via ZeroMQ messaging from Bitcoin
// Family daemons. Using this is highly recommended. The value of this option
// is a string that should match the value of the -zmqpubhashblock parameter
// passed to the coin daemon. If you enable this, you should lower
// 'blockRefreshInterval' to 1000 or 0 to disable polling entirely.
// "zmqBlockNotifySocket": "tcp://127.0.0.1:15101",
// Enable streaming Block Notifications via WebSocket messaging from Ethereum
// family Parity daemons. Using this is highly recommended. The value of this
// option is a string that should match the value of the --ws-port parameter
// passed to the parity coin daemon. When using --ws-port, you should also
// specify --ws-interface all and
// --jsonrpc-apis "eth,net,web3,personal,parity,parity_pubsub,rpc"
// If you enable this, you should lower 'blockRefreshInterval' to 1000 or 0
// to disable polling entirely.
// "portWs": 18545,
}
],
// Generate payouts for recorded shares
"paymentProcessing": {
"enabled": true,
// Minimum payment in pool-base-currency (ie. Bitcoin, NOT Satoshis)
"minimumPayment": 1,
"payoutScheme": "PPLNS",
"payoutSchemeConfig": {
"factor": 2.0
}
}
},
{
// DON'T change the id after a production pool has begun collecting shares!
"id": "[censored]",
"enabled": true,
"coin": "[censored[[SOLO]",
// Address to where block rewards are given (pool wallet)
"address": "F2pEky1bqeoGxHrUqaKQJfu1LpXgetx8uX",
// Block rewards go to the configured pool wallet address to later be paid out
// to miners, except for a percentage that can go to, for examples,
// pool operator(s) as pool fees or or to donations address. Addresses or hashed
// public keys can be used. Here is an example of rewards going to the main pool
// "op"
"rewardRecipients": [
{
// Pool wallet
"address": "[censored]",
"percentage": [censored]
}
],
// How often to poll RPC daemons for new blocks, in milliseconds
"blockRefreshInterval": 400,
// Some miner apps will consider the pool dead/offline if it doesn't receive
// anything new jobs for around a minute, so every time we broadcast jobs,
// set a timeout to rebroadcast in this many seconds unless we find a new job.
// Set to zero to disable. (Default: 0)
"jobRebroadcastTimeout": 10,
// Remove workers that haven't been in contact for this many seconds.
// Some attackers will create thousands of workers that use up all available
// socket connections, usually the workers are zombies and don't submit shares
// after connecting. This features detects those and disconnects them.
"clientConnectionTimeout": 600,
// If a worker is submitting a high threshold of invalid shares, we can
// temporarily ban their IP to reduce system/network load.
"banning": {
"enabled": true,
// How many seconds to ban worker for
"time": 600,
// What percent of invalid shares triggers ban
"invalidPercent": 50,
// Check invalid percent when this many shares have been submitted
"checkThreshold": 50
},
// Each pool can have as many ports for your miners to connect to as you wish.
// Each port can be configured to use its own pool difficulty and variable
// difficulty settings. 'varDiff' is optional and will only be used for the ports
// you configure it for.
"ports": {
// Binding port for your miners to connect to
"4052": {
// Binding address (Default: 127.0.0.1)
"listenAddress": "0.0.0.0",
// Pool difficulty
"difficulty": 0.0001,
// TLS/SSL configuration
"tls": false,
"tlsPfxFile": "/var/lib/certs/mycert.pfx",
// Variable difficulty is a feature that will automatically adjust difficulty
// for individual miners based on their hash rate in order to lower
// networking overhead
"varDiff": {
// Minimum difficulty
"minDiff": 0.0001,
// Maximum difficulty. Network difficulty will be used if it is lower than
// this. Set to null to disable.
"maxDiff": null,
// Try to get 1 share per this many seconds
"targetTime": 15,
// Check to see if we should retarget every this many seconds
"retargetTime": 90,
// Allow time to very this % from target without retargeting
"variancePercent": 30,
// Do not alter difficulty by more than this during a single retarget in
// either direction
"maxDelta": 500
}
}
},
// Recommended to have at least two daemon instances running in case one drops
// out-of-sync or offline. For redundancy, all instances will be polled for
// block/transaction updates and be used for submitting blocks. Creating a backup
// daemon involves spawning a daemon using the "-datadir=/backup" argument which
// creates a new daemon instance with it's own RPC config. For more info on this,
// visit: https:// en.bitcoin.it/wiki/Data_directory and
// https:// en.bitcoin.it/wiki/Running_bitcoind
"daemons": [
{
"host": "127.0.0.1",
"port": [censored],
"user": "[censored]",
"password": "[censored]",
// Enable streaming Block Notifications via ZeroMQ messaging from Bitcoin
// Family daemons. Using this is highly recommended. The value of this option
// is a string that should match the value of the -zmqpubhashblock parameter
// passed to the coin daemon. If you enable this, you should lower
// 'blockRefreshInterval' to 1000 or 0 to disable polling entirely.
// "zmqBlockNotifySocket": "tcp://127.0.0.1:15101",
// Enable streaming Block Notifications via WebSocket messaging from Ethereum
// family Parity daemons. Using this is highly recommended. The value of this
// option is a string that should match the value of the --ws-port parameter
// passed to the parity coin daemon. When using --ws-port, you should also
// specify --ws-interface all and
// --jsonrpc-apis "eth,net,web3,personal,parity,parity_pubsub,rpc"
// If you enable this, you should lower 'blockRefreshInterval' to 1000 or 0
// to disable polling entirely.
// "portWs": 18545,
}
],
// Generate payouts for recorded shares
"paymentProcessing": {
"enabled": true,
// Minimum payment in pool-base-currency (ie. Bitcoin, NOT Satoshis)
"minimumPayment": 1,
"payoutScheme": "SOLO",
"payoutSchemeConfig": {
"factor": 2.0
}
}
}
// This section ends here. Add
,
after}
if this is not the last coin section]
}
miningcore.js
/*!
*/
// --------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------
// Current running domain (or ip address) url will be read from the browser url bar.
// You can check the result in you browser development view -> F12 -> Console
// -->> !! no need to change anything below here !! <<--
// --------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------
// read WebURL from current browser
var WebURL = "https://[censored]"; // Website URL is: https://domain.com/
// WebURL correction if not ends with /
if (WebURL.substring(WebURL.length-1) != "/")
{
WebURL = WebURL + "/";
console.log('Corrected WebURL, does not end with / -> New WebURL : ', WebURL);
}
var API = "https://[censored]:443/api/"; // API address is: https://domain.com/api/
// API correction if not ends with /
if (API.substring(API.length-1) != "/")
{
API = API + "/";
console.log('Corrected API, does not end with / -> New API : ', API);
}
var stratumAddress = "[censored]"; // Stratum address is: domain.com
// --------------------------------------------------------------------------------------------
// no need to change anything below here
// --------------------------------------------------------------------------------------------
console.log('MiningCore.WebUI : ', WebURL); // Returns website URL
console.log('API address used : ', API); // Returns API URL
console.log('Stratum address : ', "stratum+tcp://" + stratumAddress + ":"); // Returns Stratum URL
console.log('Page Load : ', window.location.href); // Returns full URL
currentPage = "index"
// check browser compatibility
var nua = navigator.userAgent;
//var is_android = ((nua.indexOf('Mozilla/5.0') > -1 && nua.indexOf('Android ') > -1 && nua.indexOf('AppleWebKit') > -1) && !(nua.indexOf('Chrome') > -1));
var is_IE = ((nua.indexOf('Mozilla/5.0') > -1 && nua.indexOf('Trident') > -1) && !(nua.indexOf('Chrome') > -1));
if(is_IE) {
console.log('Running in IE browser is not supported - ', nua);
}
// Load INDEX Page content
function loadIndex() {
$("div[class^='page-").hide();
$(".page").hide();
//$(".page-header").show();
$(".page-wrapper").show();
$(".page-footer").show();
var hashList = window.location.hash.split(/[#/?=]/);
//var fullHash = document.URL.substr(document.URL.indexOf('#')+1); //IE
// example: #vtc/dashboard?address=VttsC2.....LXk9NJU
currentPool = hashList[1];
currentPage = hashList[2];
currentAddress = hashList[3];
if (currentPool && !currentPage)
{
currentPage ="stats"
}
else if(!currentPool && !currentPage)
{
currentPage ="index";
}
if (currentPool && currentPage) {
loadNavigation();
$(".main-index").hide();
$(".main-pool").show();
$(".page-" + currentPage).show();
$(".main-sidebar").show();
} else {
$(".main-index").show();
$(".main-pool").hide();
$(".page-index").show();
$(".main-sidebar").hide();
}
if (currentPool) {
$("li[class^='nav-']").removeClass("active");
} else {
loadHomePage();
}
scrollPageTop();
}
// Load HOME page content
function loadHomePage() {
console.log('Loading home page content');
return $.ajax(API + "pools")
.done(function(data) {
const poolCoinCardTemplate = $(".index-coin-card-template").html();
//const poolCoinTableTemplate = ""; //$(".index-coin-table-template").html();
}
// Load STATS page content
function loadStatsPage() {
//clearInterval();
setInterval(
(function load() {
loadStatsData();
return load;
})(),
60000
);
setInterval(
(function load() {
loadStatsChart();
return load;
})(),
600000
);
}
// Load DASHBOARD page content
function loadDashboardPage() {
function render() {
//clearInterval();
setInterval(
(function load() {
loadDashboardData($("#walletAddress").val());
loadDashboardWorkerList($("#walletAddress").val());
loadDashboardChart($("#walletAddress").val());
return load;
})(),
60000
);
}
var walletQueryString = window.location.hash.split(/[#/?]/)[3];
if (walletQueryString) {
var wallet = window.location.hash.split(/[#/?]/)[3].replace("address=", "");
if (wallet) {
$(walletAddress).val(wallet);
localStorage.setItem(currentPool + "-walletAddress", wallet);
render();
}
}
if (localStorage[currentPool + "-walletAddress"]) {
$("#walletAddress").val(localStorage[currentPool + "-walletAddress"]);
}
}
// Load MINERS page content
function loadMinersPage() {
return $.ajax(API + "pools/" + currentPool + "/miners?page=0&pagesize=20")
.done(function(data) {
var minerList = "";
if (data.length > 0) {
$.each(data, function(index, value) {
minerList += "";
//minerList += "" + value.miner + "";
minerList += '' + value.miner.substring(0, 12) + ' … ' + value.miner.substring(value.miner.length - 12) + '';
//minerList += '' + value.miner.substring(0, 12) + ' … ' + value.miner.substring(value.miner.length - 12) + '';
minerList += "" + _formatter(value.hashrate, 5, "H/s") + "";
minerList += "" + _formatter(value.sharesPerSecond, 5, "S/s") + "";
minerList += "";
});
} else {
minerList += 'No miner connected';
}
$("#minerList").html(minerList);
})
.fail(function() {
$.notify(
{
message: "Error: No response from API.
(loadMinersList)"
},
{
type: "danger",
timer: 3000
}
);
});
}
// Load BLOCKS page content
function loadBlocksPage() {
return $.ajax(API + "pools/" + currentPool + "/blocks?page=0&pageSize=100")
.done(function(data) {
var blockList = "";
if (data.length > 0) {
$.each(data, function(index, value) {
var createDate = convertLocalDateToUTCDate(new Date(value.created),false);
var effort = Math.round(value.effort * 100);
var effortClass = "";
if (effort < 30) {
effortClass = "effort1";
} else if (effort < 80) {
effortClass = "effort2";
} else if (effort < 110) {
effortClass = "effort3";
} else {
effortClass = "effort4";
}
}
// Load PAYMENTS page content
function loadPaymentsPage() {
return $.ajax(API + "pools/" + currentPool + "/payments?page=0&pageSize=500")
.done(function(data) {
var paymentList = "";
if (data.length > 0) {
$.each(data, function(index, value) {
var createDate = convertLocalDateToUTCDate(new Date(value.created),false);
paymentList += '';
paymentList += "" + createDate + "";
paymentList += '' + value.address.substring(0, 12) + ' … ' + value.address.substring(value.address.length - 12) + '';
paymentList += '' + _formatter(value.amount, 5, '') + '';
paymentList += '' + value.transactionConfirmationData.substring(0, 16) + ' … ' + value.transactionConfirmationData.substring(value.transactionConfirmationData.length - 16) + ' ';
paymentList += '';
});
} else {
paymentList += 'No payments found yet';
}
$("#paymentList").html(paymentList);
})
.fail(function() {
$.notify(
{
message: "Error: No response from API.
(loadPaymentsList)"
},
{
type: "danger",
timer: 3000
}
);
});
}
// Load CONNECTION page content
function loadConnectPage() {
return $.ajax(API + "pools")
.done(function(data) {
var connectPoolConfig = "";
$.each(data.pools, function(index, value) {
if (currentPool === value.id) {
}
// Dashboard - load wallet stats
function loadWallet() {
console.log( 'Loading wallet address:',$("#walletAddress").val() );
if ($("#walletAddress").val().length > 0) {
localStorage.setItem(currentPool + "-walletAddress", $("#walletAddress").val() );
}
var coin = window.location.hash.split(/[#/?]/)[1];
var currentPage = window.location.hash.split(/[#/?]/)[2] || "stats";
window.location.href = "#" + currentPool + "/" + currentPage + "?address=" + $("#walletAddress").val();
}
// General formatter function
function _formatter(value, decimal, unit) {
if (value === 0) {
return "0 " + unit;
} else {
var si = [
{ value: 1, symbol: "" },
{ value: 1e3, symbol: "k" },
{ value: 1e6, symbol: "M" },
{ value: 1e9, symbol: "G" },
{ value: 1e12, symbol: "T" },
{ value: 1e15, symbol: "P" },
{ value: 1e18, symbol: "E" },
{ value: 1e21, symbol: "Z" },
{ value: 1e24, symbol: "Y" }
];
for (var i = si.length - 1; i > 0; i--) {
if (value >= si[i].value) {
break;
}
}
return ((value / si[i].value).toFixed(decimal).replace(/.0+$|(.[0-9]*[1-9])0+$/, "$1") + " " + si[i].symbol + unit);
}
}
// Time convert Local -> UTC
function convertLocalDateToUTCDate(date, toUTC) {
date = new Date(date);
//Local time converted to UTC
var localOffset = date.getTimezoneOffset() * 60000;
var localTime = date.getTime();
if (toUTC) {
date = localTime + localOffset;
} else {
date = localTime - localOffset;
}
newDate = new Date(date);
return newDate;
}
// Time convert UTC -> Local
function convertUTCDateToLocalDate(date) {
var newDate = new Date(date.getTime()+date.getTimezoneOffset()601000);
var localOffset = date.getTimezoneOffset() / 60;
var hours = date.getUTCHours();
newDate.setHours(hours - localOffset);
return newDate;
}
// Scroll to top off page
function scrollPageTop() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
var elmnt = document.getElementById("page-scroll-top");
elmnt.scrollIntoView();
}
// Check if file exits
function doesFileExist(urlToFile) {
var xhr = new XMLHttpRequest();
xhr.open('HEAD', urlToFile, false);
xhr.send();
}
// STATS page data
function loadStatsData() {
return $.ajax(API + "pools")
.done(function(data) {
$.each(data.pools, function(index, value) {
if (currentPool === value.id) {
}
// STATS page charts
function loadStatsChart() {
return $.ajax(API + "pools/" + currentPool + "/performance")
.done(function(data) {
labels = [];
}
// DASHBOARD page data
function loadDashboardData(walletAddress) {
return $.ajax(API + "pools/" + currentPool + "/miners/" + walletAddress)
.done(function(data) {
$("#pendingShares").text(_formatter(data.pendingShares, 0, ""));
var workerHashRate = 0;
if (data.performance) {
$.each(data.performance.workers, function(index, value) {
workerHashRate += value.hashrate;
});
}
$("#minerHashRate").text(_formatter(workerHashRate, 5, "H/s"));
$("#pendingBalance").text(_formatter(data.pendingBalance, 5, ""));
$("#paidBalance").text(_formatter(data.todayPaid, 5, ""));
$("#lifetimeBalance").text(_formatter(data.pendingBalance + data.totalPaid, 5, "")
);
})
.fail(function() {
$.notify(
{
message: "Error: No response from API.
(loadDashboardData)"
},
{
type: "danger",
timer: 3000
}
);
});
}
// DASHBOARD page Miner table
function loadDashboardWorkerList(walletAddress) {
return $.ajax(API + "pools/" + currentPool + "/miners/" + walletAddress)
.done(function(data) {
var workerList = "";
if (data.performance) {
var workerCount = 0;
$.each(data.performance.workers, function(index, value) {
workerCount++;
workerList += "";
workerList += "" + workerCount + "";
if (index.length === 0) {
workerList += "Unnamed";
} else {
workerList += "" + index + "";
}
workerList += "" + _formatter(value.hashrate, 5, "H/s") + "";
workerList +=
"" + _formatter(value.sharesPerSecond, 5, "S/s") + "";
workerList += "";
});
} else {
workerList += 'None';
}
$("#workerCount").text(workerCount);
$("#workerList").html(workerList);
})
.fail(function() {
$.notify(
{
message: "Error: No response from API.
(loadDashboardWorkerList)"
},
{
type: "danger",
timer: 3000
}
);
});
}
// DASHBOARD page chart
function loadDashboardChart(walletAddress) {
return $.ajax(API + "pools/" + currentPool + "/miners/" + walletAddress + "/performance")
.done(function(data) {
}
// Generate Coin based sidebar
function loadNavigation() {
return $.ajax(API + "pools")
.done(function(data) {
var coinLogo = "";
var coinName = "";
var poolList = "
";- ";
" + value.coin.type; ";
";
";$.each(data.pools, function(index, value) {
poolList += "
poolList += " "
poolList += "
poolList += " ";
poolList += "
if (currentPool === value.id) {
coinLogo = "
coinName = value.coin.name;
if (typeof coinName === "undefined" || coinName === null) {
coinName = value.coin.type;
}
}
});
poolList += "
}
Nginx Config
server {
listen 80;
server_name [censored];
}
server {
listen 443 ssl;
server_name [censored];
}
The text was updated successfully, but these errors were encountered: