Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix miscellaneous typos and documentation #6

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 43 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,50 @@
# Stratum Proxy
# Stratum Proxy for CryptoNight

* Accumulates the miners.
* Supports auto complexity for miners.
* Configuring the pools in the Web panel.

![img](https://github.com/JerryWm/JerryWm.github.io/raw/master/_resources/imgs/stratum_proxy/img1.png)
### Requirements:
Mining programs that connect to this proxy must have nicehash nonce support and enable it
* `--nicehash` or `"nicehash": true` for XMRig
* `"nicehash_nonce": true,` for xmr-stak

![img](https://github.com/JerryWm/JerryWm.github.io/raw/master/_resources/imgs/stratum_proxy/img2.png)

![img](https://github.com/JerryWm/JerryWm.github.io/raw/master/_resources/imgs/stratum_proxy/img3.png)
### Features:
* Centralized pool and wallet management at proxy for easy switching/failover
* Accumulates all workers (miners) power for higher difficulty between the proxy and pool. Only valid shares of eligible difficulty are sent back to the pool
* Individualized auto-difficulty for lower difficulty negotiation to each worker
* SSL/TLS compatible for pool connection and worker connections
* Web panel:
* __View of individual Workers__
* View of Pool connection(s)
* View of Jobs (blocks) received by pool including time spent working, hashes, accepted/rejected shares
* View of Shares solved by miners including which worker solved it
* View of Console from proxy program
* Configuration of pool(s)

![img](https://github.com/JerryWm/JerryWm.github.io/raw/master/_resources/imgs/stratum_proxy/img4.png)

![img](https://github.com/JerryWm/JerryWm.github.io/raw/master/_resources/imgs/stratum_proxy/img5.png)
### Usage:
1. Edit config.json to change ports or difficulty if needed
2. Launch startup.exe
```.\startup.exe```
3. Connect to web portal in a browser (default on port 8000). Default login password (Auth key) is in config.json


### Screenshots (click to enlarge):

* Workers tab
![img](https://github.com/JerryWm/JerryWm.github.io/raw/master/_resources/imgs/stratum_proxy/img2.png "Workers tab")

* Pools tab
![img](https://github.com/JerryWm/JerryWm.github.io/raw/master/_resources/imgs/stratum_proxy/img3.png "Pools tab")

* Jobs tab
![img](https://github.com/JerryWm/JerryWm.github.io/raw/master/_resources/imgs/stratum_proxy/img4.png "Jobs tab")

* Shares tab
![img](https://github.com/JerryWm/JerryWm.github.io/raw/master/_resources/imgs/stratum_proxy/img5.png "Shares tab")

* Console tab
![img](https://github.com/JerryWm/JerryWm.github.io/raw/master/_resources/imgs/stratum_proxy/img6.png)

* Settings tab (pool configuration)
![img](https://github.com/JerryWm/JerryWm.github.io/raw/master/_resources/imgs/stratum_proxy/img1.png "Settings tab" )

![img](https://github.com/JerryWm/JerryWm.github.io/raw/master/_resources/imgs/stratum_proxy/img6.png)
22 changes: 11 additions & 11 deletions src/app/StratumClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ class StratumClient {
let obj = this.expectedResult[i];

if ( obj.startTime + obj.timeoutMiliSec < ctms ) {
this.logger.error("Poole did not send the result. Timeout error");
this.disconnect("Poole did not send the result. Timeout error");
this.logger.error("Pool did not send the result. Timeout error");
this.disconnect("Pool did not send the result. Timeout error");
return;
}
}
Expand Down Expand Up @@ -178,8 +178,8 @@ class StratumClient {
pass : this.pool.pool_password,
}, (obj) => {
if ( obj.error ) {
this.logger.error('Poole sent a bug "'+(obj.error.message?obj.error.message:'')+'"');
this.disconnect('Poole sent a bug "'+(obj.error.message?obj.error.message:'')+'"');
this.logger.error('Pool sent a bug "'+(obj.error.message?obj.error.message:'')+'"');
this.disconnect('Pool sent a bug "'+(obj.error.message?obj.error.message:'')+'"');
return;
}

Expand All @@ -195,8 +195,8 @@ class StratumClient {

this.keepaliveSIM.on(this.doPing.bind(this));
} else {
this.logger.error('Poole sent a invalid message');
this.disconnect('Poole sent a invalid message');
this.logger.error('Pool sent a invalid message');
this.disconnect('Pool sent a invalid message');
return;
}

Expand Down Expand Up @@ -284,8 +284,8 @@ class StratumClient {
recvFrameObject(obj) {
//this.logger.notice("recv...: " + JSON.stringify(obj))
if ( typeof obj !== 'object' ) {
this.logger.error('Poole sent invalid raw json');
this.disconnect('Poole sent invalid raw json');
this.logger.error('Pool sent invalid raw json');
this.disconnect('Pool sent invalid raw json');
return;
}

Expand All @@ -307,7 +307,7 @@ class StratumClient {
}

if ( obj.error ) {
this.logger.warning('Poole sent a bug "'+(obj.error.message?obj.error.message:'')+'"');
this.logger.warning('Pool sent a bug "'+(obj.error.message?obj.error.message:'')+'"');
return;
}

Expand Down Expand Up @@ -402,7 +402,7 @@ class StratumClient {
if ( obj.error ) {
this.rejected_share_count++;

this.logger.warning('Poole sent a bug "'+(obj.error.message?obj.error.message:'')+'"');
this.logger.warning('Pool sent a bug "'+(obj.error.message?obj.error.message:'')+'"');
this.events.emit(this.prefix + "rejected_share", this, share, (obj.error.message?obj.error.message:''));
return;
}
Expand Down Expand Up @@ -443,4 +443,4 @@ class StratumClient {

}

module.exports = StratumClient;
module.exports = StratumClient;
4 changes: 2 additions & 2 deletions src/app/web/public/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<head>

<title>Jerry Stratum Proxy Cryptonigth</title>
<title>Jerry Stratum Proxy CryptoNight</title>

<script src="lib/jquery/jquery-3.2.1.min.js"></script>

Expand Down Expand Up @@ -375,4 +375,4 @@ <h5 class="modal-title">Restart...</h5>



</body>
</body>
27 changes: 19 additions & 8 deletions src/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{
/*
Stratum ports which workers can connect to. Multiple can be setup for different ports, difficulty, or SSL/TLS

Options:
bind_address - the interface IP (0.0.0.0 for all) and port for workers to connect to
share_time - the average target time for worker finding a share proxy will try to maintain
start_difficulty - the default difficulty proxy start negotiation with worker at
min_difficulty - the lowest difficulty proxy will allow for worker. Set according to the slowest worker.
ssl - require SSL/TLS for workers on given port
*/
stratum_servers: [

{
Expand Down Expand Up @@ -28,18 +37,20 @@

],

/*
Web server for managing proxy

Options:
enable - whether or not to enable web portal
bind_address - the interface IP (0.0.0.0 for all) and port to server web page
auth_key - login key used for access to web page
open_browser - launch browser window to web page when proxy program is started
*/
web_server: {
// enable
enable: true,

// bind web server address
bind_address: "0.0.0.0:8000",

// secret key
auth_key: "admin",

// open browser
open_browser: false,
},

}
}