Skip to content
This repository has been archived by the owner on Aug 30, 2020. It is now read-only.

Commit

Permalink
Reject connections from xmr-node-proxy
Browse files Browse the repository at this point in the history
xmr-node-proxy is not supported and crashes with an error when it
connects to pool that does not support it. This makes it crash in a
cleaner way.

Fixes: GH-6
  • Loading branch information
00-matt committed Jan 22, 2020
1 parent deea35d commit b592ef5
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -56,7 +56,10 @@ private void onLogin(ChannelHandlerContext ctx, StratumRequest request) {
final String agent;
if (params.containsKey("agent")) {
agent = (String) params.get("agent");
// TODO: Check for xmr-node-proxy (tell them to go away).
if (agent.startsWith("xmr-node-proxy")) {
replyWithError(ctx, request.getId(), new StratumError(-1, "xmr-node-proxy is not supported"));
return;
}
} else {
agent = null;
}
Expand Down

0 comments on commit b592ef5

Please sign in to comment.