diff --git a/README.md b/README.md index 509f094..1c9e63e 100644 --- a/README.md +++ b/README.md @@ -1 +1,44 @@ -RepeaterWatchdog \ No newline at end of file + +# RepeaterWatchdog +### By M0XDR +## Introduction +Repeater watcher performs ICMP ping commands at set intervals and kills and restarts a process if failures reach a specified threshold. I use this for virtual hosted Wires-X machines that accept incoming USB/IP connections from on-prem RaspberryPis that are connected to HRI200 interface boxes. This means that we do not need Windows PC devices at remote repeater sites. + +The intention is that these machines connect via VPN to the internet which solves issues with CGNAT. This utility will test connectivity to multiple public DNS providers and restart a specified process (with the provided command line arguments) if a specified failure threshold is reached. + +## Command Line +``` +Usage: + RepeaterWatchdog ... [options] + +Arguments: + The arguments which will be passed to the restarted process. + +Options: + -p, --process The process to kill and restart. [default: OpenVPNConnect] + -d, --destinations One or more destination IP or addresses to ping. [default: + 1.1.1.1|8.8.8.8|208.67.222.222] + -i, --interval The number of seconds between ping tests. [default: 15] + -f, --failures The number consecutive failures before restarting. [default: 5] + -t, --timeout The ping timeout in seconds. [default: 3] + --version Show version information + -?, -h, --help Show help and usage information +``` +### Example StartWiresX.bat batch file +``` +@echo off +echo Waiting 60 seconds to ensure USB devices are connected... +timeout /t 60 +echo Starting Wires-X +start C:\Radio\YAESUMUSEN\WIRES-X\YmLAN.exe /new +echo Starting VPN +qprocess "OpenVPNConnect.exe" > NULL +if %ERRORLEVEL% EQU 1 ( + echo VPN NOT Running. Starting... + "C:\Program Files\OpenVPN Connect\OpenVPNConnect.exe" --opened-at-login --minimize +) else ( + echo VPN running. No need to start. +) +echo Starting network watchdog +start C:\Radio\Watchdog\RepeaterWatchdog.exe --opened-at-login --minimize --connect-shortcut=1649759676236 +```