README upd

This commit is contained in:
aceberg 2024-08-31 03:47:46 +07:00
parent 3aa63fef82
commit 62302d19fa
3 changed files with 55 additions and 19 deletions

View file

@ -11,10 +11,11 @@
Lightweight network IP scanner with web GUI
> [!WARNING]
> This README is about version 2.0. Version 1.0 can be found in this brunch: [v1](https://github.com/aceberg/WatchYourLAN/tree/v1)
> [!BREAKING CHANGES]
> Version 2.0 is not compatible with v1.0. For now v2.0 docker images will be released under `v2` tag. It will be tagged `latest` in a few weeks (probably, in October), to give everyone enough time for a smooth migration.
> This is version 2.0. Version 1.0 can be found in this brunch: [v1](https://github.com/aceberg/WatchYourLAN/tree/v1)
>
> <span style="font-size:1.5em;color:orange">Breaking Changes</span>
>
> Version 2.0 is not compatible with v1.0. For now v2.0 docker images will be released under `v2` tag. It will be tagged `latest` in a few weeks (probably, in October).
![Screenshot_1](https://raw.githubusercontent.com/aceberg/WatchYourLAN/main/assets/Screenshot_1.png)
@ -147,6 +148,14 @@ Or use [docker-compose](docker-compose-local.yml)
</details>
## API
<details>
<summary>Expand</summary>
Moved to [docs/API.md](./docs/API.md)
</details>
## Thanks
<details>
<summary>Expand</summary>

42
docs/API.md Normal file
View file

@ -0,0 +1,42 @@
## API
```http
GET /api/all
```
Returns all hosts in `json`.
```http
GET /api/history/*mac
```
Returns all History. If `mac` is not empty, returns only history of a device with this `mac`.
```http
GET /api/host/:id
```
Returns host with this `id` in `json`.
```http
GET /api/port/:addr/:port
```
Gets state of one `port` of `addr`. Returns `true` if port is open or `false` otherwise.
<details>
<summary>Request example</summary>
```bash
curl http://0.0.0.0:8840/api/port/192.168.2.2/8844
```
</details><br>
```http
GET /api/edit/:id/:name/*known
```
Edit host with ID `id`. Can change `name`. `known` is optional, when set to `toggle` will change Known state.
```http
GET /api/host/del/:id
```
Remove host with ID `id`.

View file

@ -1,15 +0,0 @@
# How to encrypt password with bcrypt?
It is not safe to store password unencrypted, so this app uses `bcrypt` encryption. There are several ways to encrypt your password.
## 1. Set password through web GUI
Then the app will encrypt it for you.
## 2. Encrypt password yourself
On Linux encryption can be done with `htpasswd` command:
```sh
htpasswd -nbBC 10 USER YourSecretPassword | sed 's/USER://'
```
## 3. Encrypt password online
There are online tools for `bcrypt` encryption.