Skip to content

Commit a70faa6

Browse files
Remote console for additional miners on same network.
1 parent d08c0c2 commit a70faa6

File tree

10 files changed

+467
-125
lines changed

10 files changed

+467
-125
lines changed

MinerControl/MainWindow.Designer.cs

Lines changed: 161 additions & 72 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MinerControl/MainWindow.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.ComponentModel;
44
using System.Diagnostics;
55
using System.Linq;
6+
using System.Net;
67
using System.Reflection;
78
using System.Windows.Forms;
89
using MinerControl.PriceEntries;
@@ -24,6 +25,7 @@ private bool IsMinimizedToTray
2425
public MainWindow()
2526
{
2627
_engine.WriteConsoleAction = WriteConsole;
28+
_engine.WriteRemoteAction = WriteRemote;
2729

2830
InitializeComponent();
2931
}
@@ -56,6 +58,9 @@ private void MainWindow_Shown(object sender, EventArgs e)
5658

5759
lblCurrencySymbol.Text = string.Empty; // Avoid flashing template value when starting
5860

61+
if (!_engine.RemoteReceive)
62+
tabPage.TabPages.Remove(tabRemote);
63+
5964
UpdateButtons();
6065
RunCycle();
6166
UpdateGrid(true);
@@ -258,5 +263,24 @@ private void WriteConsole(string text)
258263
}
259264
));
260265
}
266+
267+
SlidingBuffer<string> _remoteBuffer = new SlidingBuffer<string>(200);
268+
269+
private void WriteRemote(IPAddress source, string text)
270+
{
271+
Invoke(new MethodInvoker(
272+
delegate
273+
{
274+
_remoteBuffer.Add(string.Format("[{0}] {1}", source, text));
275+
276+
textRemote.Lines = _remoteBuffer.ToArray();
277+
textRemote.Focus();
278+
textRemote.SelectionStart = textRemote.Text.Length;
279+
textRemote.SelectionLength = 0;
280+
textRemote.ScrollToCaret();
281+
textRemote.Refresh();
282+
}
283+
));
284+
}
261285
}
262286
}

MinerControl/MainWindow.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6360,7 +6360,7 @@
63606360
<value>True</value>
63616361
</metadata>
63626362
<metadata name="tmrExchangeUpdate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
6363-
<value>380, 22</value>
6363+
<value>391, 20</value>
63646364
</metadata>
63656365
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
63666366
<value>

MinerControl/MinerControl.conf

Lines changed: 49 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,21 @@
1313
"minerkillmode": 1,
1414
"traymode": 1,
1515
"donationpercentage": 2,
16-
"donationfrequency": 240
16+
"donationfrequency": 240,
17+
"remotesend": true,
18+
"remotereceive": true
1719
},
1820
"algorithms": [
19-
{ "name": "x11", "hashrate": 5251, "power": 49, "aparam1": "TestMiner.exe", "aparam2": "-a x11" },
20-
{ "name": "x13", "hashrate": 4024, "power": 49, "aparam1": "TestMiner.exe", "aparam2": "-a x13" },
21-
{ "name": "x14", "hashrate": 4024, "power": 52, "aparam1": "TestMiner.exe", "aparam2": "-a x14" },
22-
{ "name": "x15", "hashrate": 3270, "power": 52, "aparam1": "TestMiner.exe", "aparam2": "-a x15" },
23-
{ "name": "quark", "hashrate": 7000, "power": 54, "aparam1": "TestMiner.exe", "aparam2": "-a quark" },
24-
{ "name": "nist5", "hashrate": 15682, "power": 54, "aparam1": "TestMiner.exe", "aparam2": "-a nist5" },
25-
{ "name": "scrypt", "hashrate": 540, "power": 60, "aparam1": "cmd.exe", "aparam2": "/c test-run.bat -a scrypt -batch" },
26-
{ "name": "scryptn", "hashrate": 253, "power": 60, "aparam1": "cmd.exe", "aparam2": "/c test-run.bat -a scryptn -batch" },
27-
{ "name": "keccak", "hashrate": 34000, "power": 50, "aparam1": "TestMiner.exe", "aparam2": "-a keccak" },
28-
{ "name": "sha256", "hashrate": 10000, "power": 50, "aparam1": "cmd.exe", "aparam2": "/c test-run.bat -a sha256 -batch" }
21+
{ "name": "x11", "hashrate": 5251, "power": 49, "aparam1": "", "aparam2": "TestMiner.exe", "aparam3": "-a x11" },
22+
{ "name": "x13", "hashrate": 4024, "power": 49, "aparam1": "", "aparam2": "TestMiner.exe", "aparam3": "-a x13" },
23+
{ "name": "x14", "hashrate": 4024, "power": 52, "aparam1": "", "aparam2": "TestMiner.exe", "aparam3": "-a x14" },
24+
{ "name": "x15", "hashrate": 3270, "power": 52, "aparam1": "", "aparam2": "TestMiner.exe", "aparam3": "-a x15" },
25+
{ "name": "quark", "hashrate": 7000, "power": 54, "aparam1": "", "aparam2": "TestMiner.exe", "aparam3": "-a quark" },
26+
{ "name": "nist5", "hashrate": 15682, "power": 54, "aparam1": "", "aparam2": "TestMiner.exe", "aparam3": "-a nist5" },
27+
{ "name": "scrypt", "hashrate": 540, "power": 60, "aparam1": "c:\\windows\\system32", "aparam2": "cmd.exe", "aparam3": "/c test-run.bat -a scrypt -batch" },
28+
{ "name": "scryptn", "hashrate": 253, "power": 60, "aparam1": "c:\\windows\\system32", "aparam2": "cmd.exe", "aparam3": "/c test-run.bat -a scryptn -batch" },
29+
{ "name": "keccak", "hashrate": 34000, "power": 50, "aparam1": "", "aparam2": "TestMiner.exe", "aparam3": "-a keccak" },
30+
{ "name": "sha256", "hashrate": 10000, "power": 50, "aparam1": "c:\\windows\\system32", "aparam2": "cmd.exe", "aparam3": "/c test-run.bat -a sha256 -batch" }
2931
],
3032
"nicehash": {
3133
"account": "1PMj3nrVq5CH4TXdJSnHHLPdvcXinjG72y",
@@ -34,14 +36,14 @@
3436
"sparam2": "-p x",
3537
"weight": 0.90,
3638
"algos": [
37-
{ "algo": "x11", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3336 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
38-
{ "algo": "x13", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3337 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
39-
{ "algo": "x15", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3339 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
40-
{ "algo": "scrypt", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3333 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
41-
{ "algo": "scryptn", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3335 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
42-
{ "algo": "keccak", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3338 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
43-
{ "algo": "nist5", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3340 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
44-
{ "algo": "sha256", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3332 -u _ACCOUNT_._WORKER_ _SPARAM2_", "usewindow": true }
39+
{ "algo": "x11", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3336 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
40+
{ "algo": "x13", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3337 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
41+
{ "algo": "x15", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3339 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
42+
{ "algo": "scrypt", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3333 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
43+
{ "algo": "scryptn", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3335 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
44+
{ "algo": "keccak", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3338 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
45+
{ "algo": "nist5", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3340 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
46+
{ "algo": "sha256", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3332 -u _ACCOUNT_._WORKER_ _SPARAM2_", "usewindow": true }
4547
]
4648
},
4749
"westhash": {
@@ -50,13 +52,13 @@
5052
"sparam1": "-o stratum+tcp://stratum.westhash.com",
5153
"sparam2": "-p x",
5254
"algos": [
53-
{ "algo": "x11", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3336 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
54-
{ "algo": "x13", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3337 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
55-
{ "algo": "x15", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3339 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
56-
{ "algo": "scrypt", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3333 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
57-
{ "algo": "scryptn", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3335 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
58-
{ "algo": "keccak", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3338 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
59-
{ "algo": "nist5", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3340 -u _ACCOUNT_._WORKER_ _SPARAM2_" }
55+
{ "algo": "x11", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3336 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
56+
{ "algo": "x13", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3337 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
57+
{ "algo": "x15", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3339 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
58+
{ "algo": "scrypt", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3333 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
59+
{ "algo": "scryptn", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3335 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
60+
{ "algo": "keccak", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3338 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
61+
{ "algo": "nist5", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3340 -u _ACCOUNT_._WORKER_ _SPARAM2_" }
6062
]
6163
},
6264
"trademybit": {
@@ -66,26 +68,26 @@
6668
"sparam1": "-o stratum+tcp://east01.us.trademybit.com",
6769
"sparam2": "-p x",
6870
"algos": [
69-
{ "algo": "x11", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:4440 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
70-
{ "algo": "x13", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:5550 _ACCOUNT_._WORKER_ _SPARAM2_" },
71-
{ "algo": "x15", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:6660 _ACCOUNT_._WORKER_ _SPARAM2_" },
72-
{ "algo": "nist5", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:7770 _ACCOUNT_._WORKER_ _SPARAM2_" },
73-
{ "algo": "scrypt", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3330 _ACCOUNT_._WORKER_ _SPARAM2_" },
74-
{ "algo": "scryptn", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:2220 _ACCOUNT_._WORKER_ _SPARAM2_" }
71+
{ "algo": "x11", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:4440 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
72+
{ "algo": "x13", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:5550 _ACCOUNT_._WORKER_ _SPARAM2_" },
73+
{ "algo": "x15", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:6660 _ACCOUNT_._WORKER_ _SPARAM2_" },
74+
{ "algo": "nist5", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:7770 _ACCOUNT_._WORKER_ _SPARAM2_" },
75+
{ "algo": "scrypt", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3330 _ACCOUNT_._WORKER_ _SPARAM2_" },
76+
{ "algo": "scryptn", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:2220 _ACCOUNT_._WORKER_ _SPARAM2_" }
7577
]
7678
},
7779
"yaamp": {
7880
"account": "1PMj3nrVq5CH4TXdJSnHHLPdvcXinjG72y",
7981
"sparam1": "-o stratum+tcp://yaamp.com",
8082
"sparam2": "-p x",
8183
"algos": [
82-
{ "algo": "x11", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3533 -u _ACCOUNT_ _SPARAM2_" },
83-
{ "algo": "x13", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3633 _ACCOUNT_ _SPARAM2_" },
84-
{ "algo": "x14", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3933 _ACCOUNT_ _SPARAM2_" },
85-
{ "algo": "x15", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3733 _ACCOUNT_ _SPARAM2_" },
86-
{ "algo": "quark", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:4033 _ACCOUNT_ _SPARAM2_" },
87-
{ "algo": "nist5", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3833 _ACCOUNT_ _SPARAM2_" },
88-
{ "algo": "scrypt", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3433 _ACCOUNT_ _SPARAM2_" }
84+
{ "algo": "x11", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3533 -u _ACCOUNT_ _SPARAM2_" },
85+
{ "algo": "x13", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3633 _ACCOUNT_ _SPARAM2_" },
86+
{ "algo": "x14", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3933 _ACCOUNT_ _SPARAM2_" },
87+
{ "algo": "x15", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3733 _ACCOUNT_ _SPARAM2_" },
88+
{ "algo": "quark", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:4033 _ACCOUNT_ _SPARAM2_" },
89+
{ "algo": "nist5", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3833 _ACCOUNT_ _SPARAM2_" },
90+
{ "algo": "scrypt", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3433 _ACCOUNT_ _SPARAM2_" }
8991
]
9092
},
9193
"wafflepool": {
@@ -94,10 +96,10 @@
9496
"sparam1": "-o stratum+tcp://useast.wafflepool.com",
9597
"sparam2": "-p x",
9698
"algos": [
97-
{ "algo": "x11", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3331 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
98-
{ "algo": "x13", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3330 _ACCOUNT_._WORKER_ _SPARAM2_" },
99-
{ "algo": "scrypt", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3333 _ACCOUNT_._WORKER_ _SPARAM2_" },
100-
{ "algo": "scryptn", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ _SPARAM1_:3332 _ACCOUNT_._WORKER_ _SPARAM2_" }
99+
{ "algo": "x11", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3331 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
100+
{ "algo": "x13", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3330 _ACCOUNT_._WORKER_ _SPARAM2_" },
101+
{ "algo": "scrypt", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3333 _ACCOUNT_._WORKER_ _SPARAM2_" },
102+
{ "algo": "scryptn", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ _SPARAM1_:3332 _ACCOUNT_._WORKER_ _SPARAM2_" }
101103
]
102104
},
103105
"ltcrabbit": {
@@ -106,14 +108,14 @@
106108
"worker": "1",
107109
"sparam2": "-p x",
108110
"algos": [
109-
{ "algo": "x11", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ -o stratum+tcp://x11.ltcrabbit.com:3332 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
110-
{ "algo": "scrypt", "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ -o stratum+tcp://scrypt.ltcrabbit.com:3333 _ACCOUNT_._WORKER_ _SPARAM2_" }
111+
{ "algo": "x11", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ -o stratum+tcp://x11.ltcrabbit.com:3332 -u _ACCOUNT_._WORKER_ _SPARAM2_" },
112+
{ "algo": "scrypt", "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ -o stratum+tcp://scrypt.ltcrabbit.com:3333 _ACCOUNT_._WORKER_ _SPARAM2_" }
111113
]
112114
},
113115
"manual": {
114116
"account": "myaccount",
115117
"algos": [
116-
{ "algo": "scrypt", "price": 0.0100, "fee": 3.0, "folder": "", "command": "_APARAM1_", "arguments": "_APARAM2_ -o manual.com:1 _ACCOUNT_ -p x" }
118+
{ "algo": "scrypt", "price": 0.0100, "fee": 3.0, "folder": "_APARAM1_", "command": "_APARAM2_", "arguments": "_APARAM3_ -o manual.com:1 _ACCOUNT_ -p x" }
117119
]
118120
}
119-
}
121+
}

MinerControl/MinerControl.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@
7474
<Compile Include="Services\NiceHashServiceBase.cs" />
7575
<Compile Include="PriceEntries\PriceEntryBase.cs" />
7676
<Compile Include="Services\WafflePoolService.cs" />
77+
<Compile Include="Utility\Multicast\MulticastDataReceivedEventArgs.cs" />
78+
<Compile Include="Utility\Multicast\MulticastReceiver.cs" />
79+
<Compile Include="Utility\Multicast\MulticastSender.cs" />
7780
<Compile Include="Utility\ProcessUtil.cs" />
7881
<Compile Include="Program.cs" />
7982
<Compile Include="Properties\AssemblyInfo.cs" />

0 commit comments

Comments
 (0)