Bitcoin Forum

Alternate cryptocurrencies => Service Discussion (Altcoins) => Topic started by: fudnet on October 13, 2017, 12:30:24 AM



Title: Stratum Proxy With Modification Abilities
Post by: fudnet on October 13, 2017, 12:30:24 AM
I'm looking for a stratum proxy that will allow me to not only redirect where clients are connecting (pool), but also modify the parameters they are submitting such as username and password fields as well. Within stratum protocol, as viewed from Wireshark capture, it appears I want to modify the mining.submit and mining.authorize parameters as they pass through the proxy. Any known software that will accomplish this? It would make switching large numbers of mining clients much easier from a central location should the need to switch pools (already possible) or auth credentials change. Any ideas welcome!


Title: Re: Stratum Proxy With Modification Abilities
Post by: fudnet on October 13, 2017, 03:25:02 AM
No idea why this was moved from the technical discussion board, but OK. To clarify, I'm looking for software to accomplish the stated goals, I will run it on my own infrastructure. Open source preferred, but a commercial product is not out of the question either.


Title: Re: Stratum Proxy With Modification Abilities
Post by: TillKoeln on October 13, 2017, 08:07:37 AM
https://github.com/Stratehm/stratum-proxy (https://github.com/Stratehm/stratum-proxy)




as example .  here is some config file.   but i think that you search for something like that.
Code:
{
  "logDirectory" : "",
  "logLevel" : "INFO",
  "disableLogAppend": false,
  "stratumListenPort" : 3333,
  "stratumListenAddress" : "0.0.0.0",
  "disableStratum": false,
  "getworkListenPort" : 8332,
  "getworkListenAddress" : "0.0.0.0",
  "disableGetwork": false,
  "apiListenPort" : 8888,
  "apiListenAddress" : "0.0.0.0",
  "disableApi": false,
  "poolConnectionRetryDelay" : 5,
  "poolReconnectStabilityPeriod" : 5,
  "poolNoNotifyTimeout" : 240,
  "rejectReconnectOnDifferentHost" : false,
  "poolHashrateSamplingPeriod" : 600,
  "userHashrateSamplingPeriod" : 600,
  "connectionHashrateSamplingPeriod" : 600,
  "isScrypt" : false,
  "databaseDirectory": "",
  "hashrateDatabaseSamplingPeriod": 60,
  "hashrateDatabaseHistoryDepth": 7,
  "noMidstate": false,
  "apiLogLevel": "INFO",
  "validateGetworkShares": false, // Validate the shares submitted by Getwork workers before submitting the shares to the pool. Only works for SHA256 and Scrypt.
  "poolSwitchingStrategy": "priorityFailover",
  "weightedRoundRobinRoundDuration": 60,
  "apiUser": "",
  "apiPassword": "",
  "apiReadOnlyAccessEnabled": false, // If an apiUser is set and this option is true, the read-only API methods are publicly accessible. The displayed GUI will be read-only and login will be required to access to admin features (modify/create/delete pools, ban users...)
  // The apiEnableSsl should be set to true or left commented if an apiUser is specified. If the apiEnableSsl option is not set, ssl is enabled when apiUser is set else it is disabled.
  //"apiEnableSsl": false,
  "logRealShareDifficulty": false, // Take care, it is CPU intensive and it works only for SHA256 and Scrypt coins.
  "workerNumberLimit": 256, // Only 1, 256 and 65536 values are supported.
  "ipVersion": "auto", // Valid values: auto, v4, v6. Force the use of the IP protocol version.
  "suggestedPoolDifficulty": 0.01, // Suggest this difficulty to the pool. The pool may ignore the suggested difficulty. (if not compatible or for any other reasons)
  "pools" : [ {
    "name" : "Nicehash X11",
    "host" : "stratum.nicehash.com:3336",
    "user" : "19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi",
    "password" : "d=0.02;p=0.24",
    "enableExtranonceSubscribe" : true,
    "appendWorkerNames" : false,
    "workerNameSeparator" : ".",
    "useWorkerPassword" : false,
    "weight" : 9,
    "isEnabled": true
  }, {
    "name" : "Wafflepool X11",
    "host" : "eu.wafflepool.com:3331",
    "user" : "19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi",
    "password" : "d=0.008",
    "enableExtranonceSubscribe" : false,
    "appendWorkerNames" : true,
    "workerNameSeparator" : "_",
    "useWorkerPassword" : false,
    "weight" : 1,
    "isEnabled": true
  } ]
}


Title: Re: Stratum Proxy With Modification Abilities
Post by: fudnet on October 13, 2017, 01:18:07 PM
Fantastic, that appears to be exactly what I am looking for! I did find it previously, but missed the stratum-stratum operation, thought it was only a stratum-getwork proxy. Thank you!


Title: Re: Stratum Proxy With Modification Abilities
Post by: TillKoeln on October 13, 2017, 02:16:25 PM
;-)

good to hear, that it solve your request.