Conecting Hydra-CLI to a password protect redis se

2019-08-17 08:24发布

I am trying to use Hydra-CLI on a node.js local system, while connecting to a redis db that is hosted on redislabs. Howver, the redislabs db requires a password and I can't seem to find any configuration for password in the Hydra-CLI configuration options.

I can connect to the database using hydra-express with a password set in the config.json hydra object.

{
  "environment": "development",
  "hydra": {
    "serviceName": "hydraApp",
    "serviceIP": "",
    "servicePort": 3000,
    "serviceType": "sending back simple response to server",
    "serviceDescription": "Simple messaging between server and service",
    "redis": {
      "url": <redislabs db url>,
      "port": <port>,
      "db": 0,
      "password": <password>
    }
  }
}

But i would like to experiment with the hydra-cli to learn more about how it works and i get stuck on this.

Thanks!

1条回答
祖国的老花朵
2楼-- · 2019-08-17 08:35

Updating with solution:

So I ended just cloning the github project of hydra-cli after going through their code. There's simply no password set in the configuration, thus there's no way to solve it without changing some code.

I have made the adjustments needed and sent a pull-request. Now the prompt asks the user for an option password and can connect to a password protected redis database.

If you see this and need the solution asap i here is a link to my branch of the code so you can copy it until the request is approved and the hydra-cli npm is updated.

https://github.com/aviyacohen/hydra-cli

You will need to find the hydra-cli.js file on your local system (as it is installed globally) and just copy paste my code into it instead of the one there now. The changes are minor you can compare files first if you want to check out what i did, it was just adding a couple of lines to incorporate a password in the redis data.

查看更多
登录 后发表回答