docs(readme) add auth info (#219)

This commit is contained in:
coderaiser 2019-05-28 18:50:29 +03:00
parent 24aa355ed0
commit 71ce9fea5a

18
HELP.md
View file

@ -707,10 +707,6 @@ app.use(prefix, cloudcmd({
server.listen(port);
```
Now you're ready to go!
### Authorization
If you want to enable authorization, you can pass credentials to Cloud Commander with a config. To generate a password, you can install `criton` with `npm i criton --save`, and use it (or any other way) to generate a hash of a password.
```js
@ -734,6 +730,20 @@ const config = {
}
```
Now you're ready to go!
## Authorization
`~/.cloudcmd.json` contains [password hash](https://github.com/coderaiser/cloudcmd/blob/v11.8.3/json/config.json#L5) because of security reason, if someone steal your config, he wouldn't know your password, because hash is [very strong](https://github.com/coderaiser/cloudcmd/blob/v11.8.3/json/config.json#L6) and can be customized.
You should never write your password as plain text to `~/.cloudcmd.json`, you can generate password using `cloudcmd` itself:
```
cloudcmd --username name --password password --auth --save --no-server
```
This command will create hash of your password and write it to `~/.cloudcmd.json`.
Server
---------------
Standard practices dictate that no non-root process get to talk to the internet on a port less than 1024. Despite this, **I suggest you start Cloud Commander as a non-root process**. How can we get around this limitation? There's a couple of fast & easy ways. One of them is port forwarding: