Update README
This commit is contained in:
parent
6c31c391cf
commit
311b0cd444
69
README.md
69
README.md
@ -1,2 +1,69 @@
|
||||
# multiwan_informer
|
||||
# MultiWan Informer
|
||||

|
||||

|
||||
|
||||
Language: [Русский](./README_RU.md) | [English](./README.md)
|
||||
|
||||
## What is this program created for?
|
||||
|
||||
This program is necessary for those who need to monitor the connection of several network cards to the network, thanks to this program you will be able to receive notifications in a telegram about disconnecting or connecting the network on a specific network card
|
||||
|
||||
## Screenshots
|
||||
|
||||

|
||||
|
||||
## How to setup?
|
||||
|
||||
To get started, download the assembly artifact, then configure your parameters in the file ```conf.json```
|
||||
|
||||
### Settings
|
||||
|
||||
<details>
|
||||
<summary>Config example</summary>
|
||||
|
||||
```json
|
||||
{
|
||||
"Interfaces": [{
|
||||
"DisplayName": "MainInterface",
|
||||
"IpOrInterfaceName": "enp2s0"
|
||||
},
|
||||
{
|
||||
"DisplayName": "SecondInterface",
|
||||
"IpOrInterfaceName": "enp3s0"
|
||||
}
|
||||
],
|
||||
"WaitTimeSec": 15,
|
||||
"PingAddr": "8.8.8.8",
|
||||
"TelegramConf": {
|
||||
"BotToken": "Token",
|
||||
"ChatID": "Id",
|
||||
"SendSilent": "false"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Parameters
|
||||
|
||||
* `Interfaces` - array of interfaces
|
||||
* `DisplayName` - the name displayed in the notification
|
||||
* `IpOrInterfaceName` - name or own IP address of the interface
|
||||
* `WaitTimeSec` - how many seconds to wait before a successful ping (```ping -w```)
|
||||
* `PingAddr` - which address to ping (preferably not a domain)
|
||||
* `TelegramConf` - bot telegram settings
|
||||
* `BotToken` - Telegram bot token ([get it here](https://t.me/BotFather/))
|
||||
* `ChatID` - telegram user/channel id ([get it here](https://t.me/chatIDrobot/))
|
||||
* `SendSilent` - send messages without sound
|
||||
|
||||
## Build
|
||||
|
||||
Build for your system:
|
||||
</br>```build -o ./build/multiwan_informer ./src/main.go```
|
||||
|
||||
Build example for MIPS:
|
||||
</br>```GOOS=linux GOARCH=mipsle GOMIPS=softfloat go build -o ./build/multiwan_informer_mipsle ./src/main.go```
|
||||
|
||||
## License
|
||||
|
||||
Distributed under the GPLv3 License. See [`LICENSE`](./LICENSE) for more information.
|
||||
|
69
README_RU.md
Normal file
69
README_RU.md
Normal file
@ -0,0 +1,69 @@
|
||||
# MultiWan Informer
|
||||

|
||||

|
||||
|
||||
Язык: [Русский](./README_RU.md) | [English](./README.md)
|
||||
|
||||
## Для чего эта программа?
|
||||
|
||||
Эта программа нужна тем кому нужно следить за подключением к сети нескольких сетевых карт, благодаря этой программе вы сможете получать уведомления в телеграмме об отключении или подключении сети на определённой сетевой карте
|
||||
|
||||
## Скриншоты
|
||||
|
||||

|
||||
|
||||
## Как настроить?
|
||||
|
||||
Для начала скачайте артефакт сборки, после чего настрйоки ваши параметры в файле ```conf.json```
|
||||
|
||||
### Настройка
|
||||
|
||||
<details>
|
||||
<summary>Пример конфига</summary>
|
||||
|
||||
```json
|
||||
{
|
||||
"Interfaces": [{
|
||||
"DisplayName": "MainInterface",
|
||||
"IpOrInterfaceName": "enp2s0"
|
||||
},
|
||||
{
|
||||
"DisplayName": "SecondInterface",
|
||||
"IpOrInterfaceName": "enp3s0"
|
||||
}
|
||||
],
|
||||
"WaitTimeSec": 15,
|
||||
"PingAddr": "8.8.8.8",
|
||||
"TelegramConf": {
|
||||
"BotToken": "Token",
|
||||
"ChatID": "Id",
|
||||
"SendSilent": "false"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Параметры
|
||||
|
||||
* `Interfaces` - массив интерфейсов
|
||||
* `DisplayName` - имя выводимое в уведомлении
|
||||
* `IpOrInterfaceName` - название или собственный IP адрес интерфейса
|
||||
* `WaitTimeSec` - сколько секунд ожидать до успешного пинга (```ping -w```)
|
||||
* `PingAddr` - какой адрес пинговать (желательно не домен)
|
||||
* `TelegramConf` - настройки телеграм бота
|
||||
* `BotToken` - токен бота ([получать тут](https://t.me/BotFather/))
|
||||
* `ChatID` - id чата ([узнать](https://t.me/chatIDrobot/))
|
||||
* `SendSilent` - отправлять сообщения без звука
|
||||
|
||||
## Сборка
|
||||
|
||||
Cборка под вашу систему:
|
||||
</br>```build -o ./build/multiwan_informer ./src/main.go```
|
||||
|
||||
Пример сборки под MIPS:
|
||||
</br>```GOOS=linux GOARCH=mipsle GOMIPS=softfloat go build -o ./build/multiwan_informer_mipsle ./src/main.go```
|
||||
|
||||
## Лицензия
|
||||
|
||||
Распространяется под лицензией GPLv3. Дополнительные сведения смотрите в файле [`LICENSE`](./LICENSE).
|
BIN
img/telegram.png
Normal file
BIN
img/telegram.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
Loading…
x
Reference in New Issue
Block a user