Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

В качестве клиента VPN используется OpenVPN. Для включения в работу необходимо загрузить файлы ключей и сертификатов, настроить клиент VPN, настроить работу Used VPN client is OpenVPN. For inclusion in work it is necessary to load files of keys and certificates, to adjust the client VPN, to adjust work of Watchdog Ping.

Wathdog Ping обеспечивает проверку доступности сети и при сбоях должен реагировать проводя переподключение клиента VPN, и если нужно, переподключение соединения LTE и пересброс модема.Для загрузки файлов ключей используются следующие URIprovides a network availability check and, if it fails, responds by reconnecting the VPN client, and if necessary, reconnecting the LTE connection and resetting the modem.

The following URIs are used to load key files:

  • upload-vpn-crt.htm - сертификат клиентаclient certificate;
  • upload-vpn-ca.htm - сертификат ЦСCA certificate;
  • upload-vpn-key.htm - ключ клиентаclient key.


Для настройки клиента VPN используется запрос с To configure the VPN client, use a query with querytype = setvpn, с полямиwith fields:

  • enable - включение/отключение клиентаenabling / disabling the client;

  • iface - интерфейс через который работает клиент, может быть the interface through which the client works, can be "ethernet" или or "modem";

  • gateway - имя или адрес сервера VPNname or address of the VPN server;

  • port - порт сервера port of the VPN server, числовое значениеnumeric value;

  • auth_type - тип авторизации клиента на сервере, может быть следующим (пока поддерживается только type of client authorization on the server, can be the following (currently only PASS_TLS is supported):
    • TLS - сертификаты  certificates (TLS);
    • PASS - парольpassword;
    • PASS_TLS - пароль и сертификаты  password and certificates (TLS).
  • user - имя пользователя, может быть пустымusername, can be empty;
  • pass - пароль пользователя, может быть пустымuser password, may be empty;
  • cipher_type - режим шифрования (пока только the encryption mode (currently only AES-256-CBC);
  • hmac_type - аутентификация HMAC (пока только  HMAC authentication (currently only SHA512);
  • verify_type - способ проверки сертификата сервера (пока поддерживается только way to verify the server certificate (so long as only "name" is supported, по имениby name);
  • verify_str - строка по которой сличается сертификат сервера, вводится пользователем произвольноthe string on which the server certificate is collated is entered by the user at will;
  • dns1 - адрес сервера DNS server address 1, может быть пустымcan be empty;
  • dns2 - адрес сервера DNS server address 2, может быть пустым.

...

  • can be empty.

To read the VPN client settings, use the query with querytype = getvpn, ответ содержит следующие поляthe response contains the following fields:

  • status - характеризует текущее состояние клиентаcharacterizes the current state of the client;
  • connect_time - время в формате UnixTimeStamp показывающее момент соединенияtime in UnixTimeStamp format showing the moment of connection, "0" если нет данныхif there is no data;
  • enable - включен или отключен клиентenabled or disabled client;
  • iface - интерфей через который работает клиетн (the interface through which the client works, can be "ethernet" или or "modem");
  • gateway - имя или адрес сервера VPNname or address of the VPN server;
  • port - порт сервера port of the VPN server, числовое значениеnumeric value;
  • auth_type - тип авторизации клиента на сервереtype of client authorization on the server;
  • user - имя пользователя, может быть пустымusername, can be empty;
  • pass - пароль пользователя, может быть пустымuser password, may be empty;
  • cipher_type - режим шифрования (пока только the encryption mode (currently only AES-256-CBC);
  • hmac_type - аутентификация HMAC (пока только  HMAC authentication (currently only SHA512);
  • verify_type - способ проверки сертификата сервераway to verify the server certificate (so long as only "name" is supported, by name);
  • verify_str - строка по которой сличается сертификат сервераthe string on which the server certificate is collated is entered by the user at will;
  • dns1 - адрес сервера DNS server address 1, может быть пустымcan be empty;
  • dns2 - адрес сервера DNS server address 2, может быть пустымcan be empty.

Для настройки To configure Watchdog Ping используется запрос с , use a query with querytype = setwdogping, с полямиwith fields:

  • enable - включение enabling / отключениеdisabling;

  • ping_addr - адрес для пингаping address;

  • ping_time - периодичность пинга, в секундах, от 10 секунд до 5 минутping frequency, in seconds, from 10 seconds to 5 minutes;
  • ping_errors1 - количество ошибок для первого действия, если 0 то не используетсяthe number of errors for the first action, if 0 is not used;
  • ping_errors2 - количество ошибок для второго действия, если 0 то не используетсяthe number of errors for the second action, if 0 is not used;
  • ping_errors3 - количество ошибок для третьего действия, если 0 то не используется.

...

  • the number of errors for the third action, if 0 is not used.

Actions that are performed when the number of errors is reached:

  • ping_errors1 - пересброс соединения reboot the VPN connection;
  • ping_errors2 - пересброс соединения по модему LTE и соединения VPNtransfer of connection via LTE modem and VPN connection;
  • ping_errors3 - пересброс модема и всех соединений, счет ошибок начинается заново.

...

  • reset the modem and all connections, the error count starts anew.

To read the Watchdog Ping parameters, use the query with querytype = getwdogping, the response contains the following fields:

  • enable - включение enabling / отключениеdisabling;
  • ping_addr - адрес для пинга ping address;
  • ping_time - периодичность пинга, в секундах ping frequency, in seconds;
  • ping_errors1 - количество ошибок для первого действия - пересброс соединения VPN the number of errors for the first action - reboot the VPN connection;
  • ping_errors2 - количество ошибок для второго действия - пересброс соединения по модему LTE и соединения VPN the number of errors for the second action - transfer of connection via LTE modem and VPN connection;
  • ping_errors3 - количество ошибок для третьего действия - пересброс модема и всех соединений the number of errors for the third action - reset the modem and all connections.